diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/SiteRecoveryManager.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/SiteRecoveryManager.java deleted file mode 100644 index 4c9d39ac532b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/SiteRecoveryManager.java +++ /dev/null @@ -1,725 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.SiteRecoveryManagementClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.MigrationRecoveryPointsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.OperationsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.RecoveryPointsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationAlertSettingsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationAppliancesImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationEligibilityResultsOperationsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationEventsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationFabricsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationJobsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationLogicalNetworksImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationMigrationItemsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationNetworkMappingsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationNetworksImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationPoliciesImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationProtectableItemsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationProtectedItemsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationProtectionContainerMappingsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationProtectionContainersImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationProtectionIntentsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationRecoveryPlansImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationRecoveryServicesProvidersImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationVaultHealthsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationVaultSettingsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationvCentersImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.SiteRecoveryManagementClientBuilder; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.StorageClassificationMappingsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.StorageClassificationsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.SupportedOperatingSystemsOperationsImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.implementation.TargetComputeSizesImpl; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPoints; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Operations; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPoints; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationAlertSettings; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationAppliances; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationEligibilityResultsOperations; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationEvents; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationFabrics; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationJobs; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationLogicalNetworks; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationMigrationItems; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationNetworkMappings; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationNetworks; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationPolicies; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectableItems; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItems; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionContainerMappings; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionContainers; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntents; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationRecoveryPlans; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationRecoveryServicesProviders; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationVaultHealths; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationVaultSettings; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationvCenters; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappings; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassifications; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOperatingSystemsOperations; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TargetComputeSizes; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * Entry point to SiteRecoveryManager. - */ -public final class SiteRecoveryManager { - private Operations operations; - - private ReplicationAlertSettings replicationAlertSettings; - - private ReplicationAppliances replicationAppliances; - - private ReplicationEligibilityResultsOperations replicationEligibilityResultsOperations; - - private ReplicationEvents replicationEvents; - - private ReplicationFabrics replicationFabrics; - - private ReplicationLogicalNetworks replicationLogicalNetworks; - - private ReplicationNetworks replicationNetworks; - - private ReplicationNetworkMappings replicationNetworkMappings; - - private ReplicationProtectionContainers replicationProtectionContainers; - - private ReplicationMigrationItems replicationMigrationItems; - - private MigrationRecoveryPoints migrationRecoveryPoints; - - private ReplicationProtectableItems replicationProtectableItems; - - private ReplicationProtectedItems replicationProtectedItems; - - private RecoveryPoints recoveryPoints; - - private TargetComputeSizes targetComputeSizes; - - private ReplicationProtectionContainerMappings replicationProtectionContainerMappings; - - private ReplicationRecoveryServicesProviders replicationRecoveryServicesProviders; - - private StorageClassifications storageClassifications; - - private StorageClassificationMappings storageClassificationMappings; - - private ReplicationvCenters replicationvCenters; - - private ReplicationJobs replicationJobs; - - private ReplicationPolicies replicationPolicies; - - private ReplicationProtectionIntents replicationProtectionIntents; - - private ReplicationRecoveryPlans replicationRecoveryPlans; - - private SupportedOperatingSystemsOperations supportedOperatingSystemsOperations; - - private ReplicationVaultHealths replicationVaultHealths; - - private ReplicationVaultSettings replicationVaultSettings; - - private final SiteRecoveryManagementClient clientObject; - - private SiteRecoveryManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new SiteRecoveryManagementClientBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of SiteRecovery service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the SiteRecovery service API instance. - */ - public static SiteRecoveryManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of SiteRecovery service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the SiteRecovery service API instance. - */ - public static SiteRecoveryManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new SiteRecoveryManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create SiteRecoveryManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new SiteRecoveryManager.Configurable(); - } - - /** - * The Configurable allowing configurations to be set. - */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - *

- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of SiteRecovery service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the SiteRecovery service API instance. - */ - public SiteRecoveryManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.recoveryservicessiterecovery") - .append("/") - .append("1.2.0"); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new SiteRecoveryManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of ReplicationAlertSettings. It manages Alert. - * - * @return Resource collection API of ReplicationAlertSettings. - */ - public ReplicationAlertSettings replicationAlertSettings() { - if (this.replicationAlertSettings == null) { - this.replicationAlertSettings - = new ReplicationAlertSettingsImpl(clientObject.getReplicationAlertSettings(), this); - } - return replicationAlertSettings; - } - - /** - * Gets the resource collection API of ReplicationAppliances. - * - * @return Resource collection API of ReplicationAppliances. - */ - public ReplicationAppliances replicationAppliances() { - if (this.replicationAppliances == null) { - this.replicationAppliances = new ReplicationAppliancesImpl(clientObject.getReplicationAppliances(), this); - } - return replicationAppliances; - } - - /** - * Gets the resource collection API of ReplicationEligibilityResultsOperations. - * - * @return Resource collection API of ReplicationEligibilityResultsOperations. - */ - public ReplicationEligibilityResultsOperations replicationEligibilityResultsOperations() { - if (this.replicationEligibilityResultsOperations == null) { - this.replicationEligibilityResultsOperations = new ReplicationEligibilityResultsOperationsImpl( - clientObject.getReplicationEligibilityResultsOperations(), this); - } - return replicationEligibilityResultsOperations; - } - - /** - * Gets the resource collection API of ReplicationEvents. - * - * @return Resource collection API of ReplicationEvents. - */ - public ReplicationEvents replicationEvents() { - if (this.replicationEvents == null) { - this.replicationEvents = new ReplicationEventsImpl(clientObject.getReplicationEvents(), this); - } - return replicationEvents; - } - - /** - * Gets the resource collection API of ReplicationFabrics. It manages Fabric. - * - * @return Resource collection API of ReplicationFabrics. - */ - public ReplicationFabrics replicationFabrics() { - if (this.replicationFabrics == null) { - this.replicationFabrics = new ReplicationFabricsImpl(clientObject.getReplicationFabrics(), this); - } - return replicationFabrics; - } - - /** - * Gets the resource collection API of ReplicationLogicalNetworks. - * - * @return Resource collection API of ReplicationLogicalNetworks. - */ - public ReplicationLogicalNetworks replicationLogicalNetworks() { - if (this.replicationLogicalNetworks == null) { - this.replicationLogicalNetworks - = new ReplicationLogicalNetworksImpl(clientObject.getReplicationLogicalNetworks(), this); - } - return replicationLogicalNetworks; - } - - /** - * Gets the resource collection API of ReplicationNetworks. - * - * @return Resource collection API of ReplicationNetworks. - */ - public ReplicationNetworks replicationNetworks() { - if (this.replicationNetworks == null) { - this.replicationNetworks = new ReplicationNetworksImpl(clientObject.getReplicationNetworks(), this); - } - return replicationNetworks; - } - - /** - * Gets the resource collection API of ReplicationNetworkMappings. It manages NetworkMapping. - * - * @return Resource collection API of ReplicationNetworkMappings. - */ - public ReplicationNetworkMappings replicationNetworkMappings() { - if (this.replicationNetworkMappings == null) { - this.replicationNetworkMappings - = new ReplicationNetworkMappingsImpl(clientObject.getReplicationNetworkMappings(), this); - } - return replicationNetworkMappings; - } - - /** - * Gets the resource collection API of ReplicationProtectionContainers. It manages ProtectionContainer. - * - * @return Resource collection API of ReplicationProtectionContainers. - */ - public ReplicationProtectionContainers replicationProtectionContainers() { - if (this.replicationProtectionContainers == null) { - this.replicationProtectionContainers - = new ReplicationProtectionContainersImpl(clientObject.getReplicationProtectionContainers(), this); - } - return replicationProtectionContainers; - } - - /** - * Gets the resource collection API of ReplicationMigrationItems. It manages MigrationItem. - * - * @return Resource collection API of ReplicationMigrationItems. - */ - public ReplicationMigrationItems replicationMigrationItems() { - if (this.replicationMigrationItems == null) { - this.replicationMigrationItems - = new ReplicationMigrationItemsImpl(clientObject.getReplicationMigrationItems(), this); - } - return replicationMigrationItems; - } - - /** - * Gets the resource collection API of MigrationRecoveryPoints. - * - * @return Resource collection API of MigrationRecoveryPoints. - */ - public MigrationRecoveryPoints migrationRecoveryPoints() { - if (this.migrationRecoveryPoints == null) { - this.migrationRecoveryPoints - = new MigrationRecoveryPointsImpl(clientObject.getMigrationRecoveryPoints(), this); - } - return migrationRecoveryPoints; - } - - /** - * Gets the resource collection API of ReplicationProtectableItems. - * - * @return Resource collection API of ReplicationProtectableItems. - */ - public ReplicationProtectableItems replicationProtectableItems() { - if (this.replicationProtectableItems == null) { - this.replicationProtectableItems - = new ReplicationProtectableItemsImpl(clientObject.getReplicationProtectableItems(), this); - } - return replicationProtectableItems; - } - - /** - * Gets the resource collection API of ReplicationProtectedItems. It manages ReplicationProtectedItem. - * - * @return Resource collection API of ReplicationProtectedItems. - */ - public ReplicationProtectedItems replicationProtectedItems() { - if (this.replicationProtectedItems == null) { - this.replicationProtectedItems - = new ReplicationProtectedItemsImpl(clientObject.getReplicationProtectedItems(), this); - } - return replicationProtectedItems; - } - - /** - * Gets the resource collection API of RecoveryPoints. - * - * @return Resource collection API of RecoveryPoints. - */ - public RecoveryPoints recoveryPoints() { - if (this.recoveryPoints == null) { - this.recoveryPoints = new RecoveryPointsImpl(clientObject.getRecoveryPoints(), this); - } - return recoveryPoints; - } - - /** - * Gets the resource collection API of TargetComputeSizes. - * - * @return Resource collection API of TargetComputeSizes. - */ - public TargetComputeSizes targetComputeSizes() { - if (this.targetComputeSizes == null) { - this.targetComputeSizes = new TargetComputeSizesImpl(clientObject.getTargetComputeSizes(), this); - } - return targetComputeSizes; - } - - /** - * Gets the resource collection API of ReplicationProtectionContainerMappings. It manages - * ProtectionContainerMapping. - * - * @return Resource collection API of ReplicationProtectionContainerMappings. - */ - public ReplicationProtectionContainerMappings replicationProtectionContainerMappings() { - if (this.replicationProtectionContainerMappings == null) { - this.replicationProtectionContainerMappings = new ReplicationProtectionContainerMappingsImpl( - clientObject.getReplicationProtectionContainerMappings(), this); - } - return replicationProtectionContainerMappings; - } - - /** - * Gets the resource collection API of ReplicationRecoveryServicesProviders. It manages RecoveryServicesProvider. - * - * @return Resource collection API of ReplicationRecoveryServicesProviders. - */ - public ReplicationRecoveryServicesProviders replicationRecoveryServicesProviders() { - if (this.replicationRecoveryServicesProviders == null) { - this.replicationRecoveryServicesProviders = new ReplicationRecoveryServicesProvidersImpl( - clientObject.getReplicationRecoveryServicesProviders(), this); - } - return replicationRecoveryServicesProviders; - } - - /** - * Gets the resource collection API of StorageClassifications. - * - * @return Resource collection API of StorageClassifications. - */ - public StorageClassifications storageClassifications() { - if (this.storageClassifications == null) { - this.storageClassifications - = new StorageClassificationsImpl(clientObject.getStorageClassifications(), this); - } - return storageClassifications; - } - - /** - * Gets the resource collection API of StorageClassificationMappings. It manages StorageClassificationMapping. - * - * @return Resource collection API of StorageClassificationMappings. - */ - public StorageClassificationMappings storageClassificationMappings() { - if (this.storageClassificationMappings == null) { - this.storageClassificationMappings - = new StorageClassificationMappingsImpl(clientObject.getStorageClassificationMappings(), this); - } - return storageClassificationMappings; - } - - /** - * Gets the resource collection API of ReplicationvCenters. It manages VCenter. - * - * @return Resource collection API of ReplicationvCenters. - */ - public ReplicationvCenters replicationvCenters() { - if (this.replicationvCenters == null) { - this.replicationvCenters = new ReplicationvCentersImpl(clientObject.getReplicationvCenters(), this); - } - return replicationvCenters; - } - - /** - * Gets the resource collection API of ReplicationJobs. - * - * @return Resource collection API of ReplicationJobs. - */ - public ReplicationJobs replicationJobs() { - if (this.replicationJobs == null) { - this.replicationJobs = new ReplicationJobsImpl(clientObject.getReplicationJobs(), this); - } - return replicationJobs; - } - - /** - * Gets the resource collection API of ReplicationPolicies. It manages Policy. - * - * @return Resource collection API of ReplicationPolicies. - */ - public ReplicationPolicies replicationPolicies() { - if (this.replicationPolicies == null) { - this.replicationPolicies = new ReplicationPoliciesImpl(clientObject.getReplicationPolicies(), this); - } - return replicationPolicies; - } - - /** - * Gets the resource collection API of ReplicationProtectionIntents. It manages ReplicationProtectionIntent. - * - * @return Resource collection API of ReplicationProtectionIntents. - */ - public ReplicationProtectionIntents replicationProtectionIntents() { - if (this.replicationProtectionIntents == null) { - this.replicationProtectionIntents - = new ReplicationProtectionIntentsImpl(clientObject.getReplicationProtectionIntents(), this); - } - return replicationProtectionIntents; - } - - /** - * Gets the resource collection API of ReplicationRecoveryPlans. It manages RecoveryPlan. - * - * @return Resource collection API of ReplicationRecoveryPlans. - */ - public ReplicationRecoveryPlans replicationRecoveryPlans() { - if (this.replicationRecoveryPlans == null) { - this.replicationRecoveryPlans - = new ReplicationRecoveryPlansImpl(clientObject.getReplicationRecoveryPlans(), this); - } - return replicationRecoveryPlans; - } - - /** - * Gets the resource collection API of SupportedOperatingSystemsOperations. - * - * @return Resource collection API of SupportedOperatingSystemsOperations. - */ - public SupportedOperatingSystemsOperations supportedOperatingSystemsOperations() { - if (this.supportedOperatingSystemsOperations == null) { - this.supportedOperatingSystemsOperations = new SupportedOperatingSystemsOperationsImpl( - clientObject.getSupportedOperatingSystemsOperations(), this); - } - return supportedOperatingSystemsOperations; - } - - /** - * Gets the resource collection API of ReplicationVaultHealths. - * - * @return Resource collection API of ReplicationVaultHealths. - */ - public ReplicationVaultHealths replicationVaultHealths() { - if (this.replicationVaultHealths == null) { - this.replicationVaultHealths - = new ReplicationVaultHealthsImpl(clientObject.getReplicationVaultHealths(), this); - } - return replicationVaultHealths; - } - - /** - * Gets the resource collection API of ReplicationVaultSettings. It manages VaultSetting. - * - * @return Resource collection API of ReplicationVaultSettings. - */ - public ReplicationVaultSettings replicationVaultSettings() { - if (this.replicationVaultSettings == null) { - this.replicationVaultSettings - = new ReplicationVaultSettingsImpl(clientObject.getReplicationVaultSettings(), this); - } - return replicationVaultSettings; - } - - /** - * Gets wrapped service client SiteRecoveryManagementClient providing direct access to the underlying auto-generated - * API implementation, based on Azure REST API. - * - * @return Wrapped service client SiteRecoveryManagementClient. - */ - public SiteRecoveryManagementClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/MigrationRecoveryPointsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/MigrationRecoveryPointsClient.java deleted file mode 100644 index 0a44744cc17f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/MigrationRecoveryPointsClient.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationRecoveryPointInner; - -/** - * An instance of this class provides access to all the operations defined in MigrationRecoveryPointsClient. - */ -public interface MigrationRecoveryPointsClient { - /** - * Gets the recovery points for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the recovery points for a migration item as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationMigrationItems(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName); - - /** - * Gets the recovery points for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the recovery points for a migration item as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationMigrationItems(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - Context context); - - /** - * Gets a recovery point for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrationRecoveryPointName The migration recovery point name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recovery point for a migration item along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, String migrationRecoveryPointName, - Context context); - - /** - * Gets a recovery point for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrationRecoveryPointName The migration recovery point name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recovery point for a migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationRecoveryPointInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, String migrationRecoveryPointName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/OperationsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/OperationsClient.java deleted file mode 100644 index 7888f26baa10..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/OperationsClient.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.OperationsDiscoveryInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * Returns the list of available operations. - * - * Operation to return the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Returns the list of available operations. - * - * Operation to return the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/RecoveryPointsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/RecoveryPointsClient.java deleted file mode 100644 index 148dec55e1c4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/RecoveryPointsClient.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPointInner; - -/** - * An instance of this class provides access to all the operations defined in RecoveryPointsClient. - */ -public interface RecoveryPointsClient { - /** - * Gets the list of recovery points for a replication protected item. - * - * Lists the available recovery points for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of recovery point details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationProtectedItems(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName); - - /** - * Gets the list of recovery points for a replication protected item. - * - * Lists the available recovery points for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of recovery point details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationProtectedItems(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context); - - /** - * Gets a recovery point. - * - * Get the details of specified recovery point. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param recoveryPointName The recovery point name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of specified recovery point along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName, Context context); - - /** - * Gets a recovery point. - * - * Get the details of specified recovery point. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param recoveryPointName The recovery point name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of specified recovery point. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPointInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationAlertSettingsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationAlertSettingsClient.java deleted file mode 100644 index ec0b3cf51c50..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationAlertSettingsClient.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.AlertInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigureAlertRequest; - -/** - * An instance of this class provides access to all the operations defined in ReplicationAlertSettingsClient. - */ -public interface ReplicationAlertSettingsClient { - /** - * Gets the list of configured email notification(alert) configurations. - * - * Gets the list of email notification(alert) configurations for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of email notification(alert) configurations for the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of configured email notification(alert) configurations. - * - * Gets the list of email notification(alert) configurations for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of email notification(alert) configurations for the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets an email notification(alert) configuration. - * - * Gets the details of the specified email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified email notification(alert) configuration along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String alertSettingName, - Context context); - - /** - * Gets an email notification(alert) configuration. - * - * Gets the details of the specified email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified email notification(alert) configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AlertInner get(String resourceName, String resourceGroupName, String alertSettingName); - - /** - * Configures email notifications for this vault. - * - * Create or update an email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification(alert) configuration. - * @param request The input to configure the email notification(alert). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Alert class along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse(String resourceName, String resourceGroupName, String alertSettingName, - ConfigureAlertRequest request, Context context); - - /** - * Configures email notifications for this vault. - * - * Create or update an email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification(alert) configuration. - * @param request The input to configure the email notification(alert). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Alert class. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AlertInner create(String resourceName, String resourceGroupName, String alertSettingName, - ConfigureAlertRequest request); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationAppliancesClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationAppliancesClient.java deleted file mode 100644 index b42de98f1162..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationAppliancesClient.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationApplianceInner; - -/** - * An instance of this class provides access to all the operations defined in ReplicationAppliancesClient. - */ -public interface ReplicationAppliancesClient { - /** - * Gets the list of appliances. - * - * Gets the list of Azure Site Recovery appliances for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery appliances for the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of appliances. - * - * Gets the list of Azure Site Recovery appliances for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery appliances for the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, String filter, - Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationEligibilityResultsOperationsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationEligibilityResultsOperationsClient.java deleted file mode 100644 index 090a9a022f40..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationEligibilityResultsOperationsClient.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsCollectionInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsInner; - -/** - * An instance of this class provides access to all the operations defined in - * ReplicationEligibilityResultsOperationsClient. - */ -public interface ReplicationEligibilityResultsOperationsClient { - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results collection response model along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, - String virtualMachineName, Context context); - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results collection response model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationEligibilityResultsCollectionInner list(String resourceGroupName, String virtualMachineName); - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results response model along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String virtualMachineName, - Context context); - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results response model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationEligibilityResultsInner get(String resourceGroupName, String virtualMachineName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationEventsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationEventsClient.java deleted file mode 100644 index 6f8a5808b613..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationEventsClient.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.EventInner; - -/** - * An instance of this class provides access to all the operations defined in ReplicationEventsClient. - */ -public interface ReplicationEventsClient { - /** - * Gets the list of Azure Site Recovery events. - * - * Gets the list of Azure Site Recovery events for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery events for the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of Azure Site Recovery events. - * - * Gets the list of Azure Site Recovery events for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery events for the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, String filter, Context context); - - /** - * Get the details of an Azure Site recovery event. - * - * The operation to get the details of an Azure Site recovery event. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param eventName The name of the Azure Site Recovery event. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Event class along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String eventName, - Context context); - - /** - * Get the details of an Azure Site recovery event. - * - * The operation to get the details of an Azure Site recovery event. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param eventName The name of the Azure Site Recovery event. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Event class. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EventInner get(String resourceName, String resourceGroupName, String eventName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationFabricsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationFabricsClient.java deleted file mode 100644 index c7eefa8f738a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationFabricsClient.java +++ /dev/null @@ -1,632 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.FabricInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricCreationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverProcessServerRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RenewCertificateInput; - -/** - * An instance of this class provides access to all the operations defined in ReplicationFabricsClient. - */ -public interface ReplicationFabricsClient { - /** - * Gets the list of ASR fabrics. - * - * Gets a list of the Azure Site Recovery fabrics in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the Azure Site Recovery fabrics in the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of ASR fabrics. - * - * Gets a list of the Azure Site Recovery fabrics in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the Azure Site Recovery fabrics in the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the details of an ASR fabric. - * - * Gets the details of an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery fabric along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String filter, Context context); - - /** - * Gets the details of an ASR fabric. - * - * Gets the details of an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery fabric. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FabricInner get(String resourceName, String resourceGroupName, String fabricName); - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FabricInner> beginCreate(String resourceName, String resourceGroupName, - String fabricName, FabricCreationInput input); - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FabricInner> beginCreate(String resourceName, String resourceGroupName, - String fabricName, FabricCreationInput input, Context context); - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FabricInner create(String resourceName, String resourceGroupName, String fabricName, FabricCreationInput input); - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FabricInner create(String resourceName, String resourceGroupName, String fabricName, FabricCreationInput input, - Context context); - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, String fabricName); - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, String fabricName, - Context context); - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void purge(String resourceName, String resourceGroupName, String fabricName); - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void purge(String resourceName, String resourceGroupName, String fabricName, Context context); - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FabricInner> beginCheckConsistency(String resourceName, - String resourceGroupName, String fabricName); - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FabricInner> beginCheckConsistency(String resourceName, - String resourceGroupName, String fabricName, Context context); - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FabricInner checkConsistency(String resourceName, String resourceGroupName, String fabricName); - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FabricInner checkConsistency(String resourceName, String resourceGroupName, String fabricName, Context context); - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginMigrateToAad(String resourceName, String resourceGroupName, - String fabricName); - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginMigrateToAad(String resourceName, String resourceGroupName, - String fabricName, Context context); - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void migrateToAad(String resourceName, String resourceGroupName, String fabricName); - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void migrateToAad(String resourceName, String resourceGroupName, String fabricName, Context context); - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FabricInner> beginReassociateGateway(String resourceName, - String resourceGroupName, String fabricName, FailoverProcessServerRequest failoverProcessServerRequest); - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FabricInner> beginReassociateGateway(String resourceName, - String resourceGroupName, String fabricName, FailoverProcessServerRequest failoverProcessServerRequest, - Context context); - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FabricInner reassociateGateway(String resourceName, String resourceGroupName, String fabricName, - FailoverProcessServerRequest failoverProcessServerRequest); - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FabricInner reassociateGateway(String resourceName, String resourceGroupName, String fabricName, - FailoverProcessServerRequest failoverProcessServerRequest, Context context); - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName); - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - Context context); - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName); - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, Context context); - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FabricInner> beginRenewCertificate(String resourceName, - String resourceGroupName, String fabricName, RenewCertificateInput renewCertificate); - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FabricInner> beginRenewCertificate(String resourceName, - String resourceGroupName, String fabricName, RenewCertificateInput renewCertificate, Context context); - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FabricInner renewCertificate(String resourceName, String resourceGroupName, String fabricName, - RenewCertificateInput renewCertificate); - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FabricInner renewCertificate(String resourceName, String resourceGroupName, String fabricName, - RenewCertificateInput renewCertificate, Context context); - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRemoveInfra(String resourceGroupName, String resourceName, - String fabricName); - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRemoveInfra(String resourceGroupName, String resourceName, - String fabricName, Context context); - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void removeInfra(String resourceGroupName, String resourceName, String fabricName); - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void removeInfra(String resourceGroupName, String resourceName, String fabricName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationJobsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationJobsClient.java deleted file mode 100644 index 0aa8f2d1cff5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationJobsClient.java +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.JobInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobQueryParameter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeJobParams; - -/** - * An instance of this class provides access to all the operations defined in ReplicationJobsClient. - */ -public interface ReplicationJobsClient { - /** - * Gets the list of jobs. - * - * Gets the list of Azure Site Recovery Jobs for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery Jobs for the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of jobs. - * - * Gets the list of Azure Site Recovery Jobs for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery Jobs for the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, String filter, Context context); - - /** - * Gets the job details. - * - * Get the details of an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String jobName, Context context); - - /** - * Gets the job details. - * - * Get the details of an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner get(String resourceName, String resourceGroupName, String jobName); - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginCancel(String resourceName, String resourceGroupName, - String jobName); - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginCancel(String resourceName, String resourceGroupName, - String jobName, Context context); - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner cancel(String resourceName, String resourceGroupName, String jobName); - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner cancel(String resourceName, String resourceGroupName, String jobName, Context context); - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginRestart(String resourceName, String resourceGroupName, - String jobName); - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginRestart(String resourceName, String resourceGroupName, - String jobName, Context context); - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner restart(String resourceName, String resourceGroupName, String jobName); - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner restart(String resourceName, String resourceGroupName, String jobName, Context context); - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginResume(String resourceName, String resourceGroupName, - String jobName, ResumeJobParams resumeJobParams); - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginResume(String resourceName, String resourceGroupName, - String jobName, ResumeJobParams resumeJobParams, Context context); - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner resume(String resourceName, String resourceGroupName, String jobName, ResumeJobParams resumeJobParams); - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner resume(String resourceName, String resourceGroupName, String jobName, ResumeJobParams resumeJobParams, - Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginExport(String resourceName, String resourceGroupName, - JobQueryParameter jobQueryParameter); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginExport(String resourceName, String resourceGroupName, - JobQueryParameter jobQueryParameter, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner export(String resourceName, String resourceGroupName, JobQueryParameter jobQueryParameter); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner export(String resourceName, String resourceGroupName, JobQueryParameter jobQueryParameter, - Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationLogicalNetworksClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationLogicalNetworksClient.java deleted file mode 100644 index 3b5960c6c42c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationLogicalNetworksClient.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.LogicalNetworkInner; - -/** - * An instance of this class provides access to all the operations defined in ReplicationLogicalNetworksClient. - */ -public interface ReplicationLogicalNetworksClient { - /** - * Gets the list of logical networks under a fabric. - * - * Lists all the logical networks of the Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of logical networks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName); - - /** - * Gets the list of logical networks under a fabric. - * - * Lists all the logical networks of the Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of logical networks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context); - - /** - * Gets a logical network with specified server id and logical network name. - * - * Gets the details of a logical network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param logicalNetworkName Logical network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a logical network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String logicalNetworkName, Context context); - - /** - * Gets a logical network with specified server id and logical network name. - * - * Gets the details of a logical network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param logicalNetworkName Logical network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a logical network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LogicalNetworkInner get(String resourceName, String resourceGroupName, String fabricName, - String logicalNetworkName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationMigrationItemsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationMigrationItemsClient.java deleted file mode 100644 index 76896ba821e5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationMigrationItemsClient.java +++ /dev/null @@ -1,889 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableMigrationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PauseReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResyncInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMigrationItemInput; - -/** - * An instance of this class provides access to all the operations defined in ReplicationMigrationItemsClient. - */ -public interface ReplicationMigrationItemsClient { - /** - * Gets the list of migration items in the protection container. - * - * Gets the list of ASR migration items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR migration items in the protection container as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName); - - /** - * Gets the list of migration items in the protection container. - * - * Gets the list of ASR migration items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR migration items in the protection container as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String skipToken, String takeToken, - String filter, Context context); - - /** - * Gets the details of a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a migration item along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, Context context); - - /** - * Gets the details of a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName); - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginCreate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - EnableMigrationInput input); - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginCreate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - EnableMigrationInput input, Context context); - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, EnableMigrationInput input); - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, EnableMigrationInput input, Context context); - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName); - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param deleteOption The delete option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, String deleteOption, Context context); - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName); - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param deleteOption The delete option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName, String deleteOption, Context context); - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginUpdate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - UpdateMigrationItemInput input); - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginUpdate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - UpdateMigrationItemInput input, Context context); - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner update(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, UpdateMigrationItemInput input); - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner update(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, UpdateMigrationItemInput input, Context context); - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginMigrate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - MigrateInput migrateInput); - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginMigrate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - MigrateInput migrateInput, Context context); - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner migrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, MigrateInput migrateInput); - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner migrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, MigrateInput migrateInput, Context context); - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginPauseReplication(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - PauseReplicationInput pauseReplicationInput); - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginPauseReplication(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - PauseReplicationInput pauseReplicationInput, Context context); - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner pauseReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, PauseReplicationInput pauseReplicationInput); - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner pauseReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, PauseReplicationInput pauseReplicationInput, - Context context); - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginResumeReplication(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - ResumeReplicationInput resumeReplicationInput); - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginResumeReplication(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - ResumeReplicationInput resumeReplicationInput, Context context); - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner resumeReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResumeReplicationInput resumeReplicationInput); - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner resumeReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResumeReplicationInput resumeReplicationInput, - Context context); - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginResync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - ResyncInput input); - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginResync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - ResyncInput input, Context context); - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner resync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResyncInput input); - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner resync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResyncInput input, Context context); - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginTestMigrate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateInput testMigrateInput); - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginTestMigrate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateInput testMigrateInput, Context context); - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner testMigrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateInput testMigrateInput); - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner testMigrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateInput testMigrateInput, Context context); - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginTestMigrateCleanup(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateCleanupInput testMigrateCleanupInput); - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrationItemInner> beginTestMigrateCleanup(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateCleanupInput testMigrateCleanupInput, Context context); - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner testMigrateCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateCleanupInput testMigrateCleanupInput); - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationItemInner testMigrateCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateCleanupInput testMigrateCleanupInput, - Context context); - - /** - * Gets the list of migration items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of migration items in the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of migration items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of migration items in the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, String skipToken, - String takeToken, String filter, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationNetworkMappingsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationNetworkMappingsClient.java deleted file mode 100644 index 18b892f65f81..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationNetworkMappingsClient.java +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateNetworkMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateNetworkMappingInput; - -/** - * An instance of this class provides access to all the operations defined in ReplicationNetworkMappingsClient. - */ -public interface ReplicationNetworkMappingsClient { - /** - * Gets all the network mappings under a network. - * - * Lists all ASR network mappings for the specified network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationNetworks(String resourceName, String resourceGroupName, - String fabricName, String networkName); - - /** - * Gets all the network mappings under a network. - * - * Lists all ASR network mappings for the specified network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationNetworks(String resourceName, String resourceGroupName, - String fabricName, String networkName, Context context); - - /** - * Gets network mapping by name. - * - * Gets the details of an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR network mapping along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName, Context context); - - /** - * Gets network mapping by name. - * - * Gets the details of an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR network mapping. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkMappingInner get(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName); - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network Mapping model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkMappingInner> beginCreate(String resourceName, - String resourceGroupName, String fabricName, String networkName, String networkMappingName, - CreateNetworkMappingInput input); - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network Mapping model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkMappingInner> beginCreate(String resourceName, - String resourceGroupName, String fabricName, String networkName, String networkMappingName, - CreateNetworkMappingInput input, Context context); - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkMappingInner create(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName, CreateNetworkMappingInput input); - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkMappingInner create(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName, CreateNetworkMappingInput input, Context context); - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName); - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName ARM Resource Name for network mapping. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName, Context context); - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName); - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName ARM Resource Name for network mapping. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName, Context context); - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network Mapping model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkMappingInner> beginUpdate(String resourceName, - String resourceGroupName, String fabricName, String networkName, String networkMappingName, - UpdateNetworkMappingInput input); - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network Mapping model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkMappingInner> beginUpdate(String resourceName, - String resourceGroupName, String fabricName, String networkName, String networkMappingName, - UpdateNetworkMappingInput input, Context context); - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkMappingInner update(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName, UpdateNetworkMappingInput input); - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkMappingInner update(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName, UpdateNetworkMappingInput input, Context context); - - /** - * Gets all the network mappings under a vault. - * - * Lists all ASR network mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets all the network mappings under a vault. - * - * Lists all ASR network mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationNetworksClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationNetworksClient.java deleted file mode 100644 index 38d7ba4592c2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationNetworksClient.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkInner; - -/** - * An instance of this class provides access to all the operations defined in ReplicationNetworksClient. - */ -public interface ReplicationNetworksClient { - /** - * Gets the list of networks under a fabric. - * - * Lists the networks available for a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName); - - /** - * Gets the list of networks under a fabric. - * - * Lists the networks available for a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context); - - /** - * Gets a network with specified server id and network name. - * - * Gets the details of a network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param networkName Primary network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String networkName, Context context); - - /** - * Gets a network with specified server id and network name. - * - * Gets the details of a network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param networkName Primary network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkInner get(String resourceName, String resourceGroupName, String fabricName, String networkName); - - /** - * Gets the list of networks. View-only API. - * - * Lists the networks available in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of networks. View-only API. - * - * Lists the networks available in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationPoliciesClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationPoliciesClient.java deleted file mode 100644 index 9e6035c53142..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationPoliciesClient.java +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.PolicyInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreatePolicyInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdatePolicyInput; - -/** - * An instance of this class provides access to all the operations defined in ReplicationPoliciesClient. - */ -public interface ReplicationPoliciesClient { - /** - * Gets the list of replication policies. - * - * Lists the replication policies for a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Profile Collection details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of replication policies. - * - * Lists the replication policies for a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Profile Collection details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the requested policy. - * - * Gets the details of a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a replication policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String policyName, - Context context); - - /** - * Gets the requested policy. - * - * Gets the details of a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a replication policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PolicyInner get(String resourceName, String resourceGroupName, String policyName); - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection profile details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PolicyInner> beginCreate(String resourceName, String resourceGroupName, - String policyName, CreatePolicyInput input); - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection profile details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PolicyInner> beginCreate(String resourceName, String resourceGroupName, - String policyName, CreatePolicyInput input, Context context); - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PolicyInner create(String resourceName, String resourceGroupName, String policyName, CreatePolicyInput input); - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PolicyInner create(String resourceName, String resourceGroupName, String policyName, CreatePolicyInput input, - Context context); - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String policyName); - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String policyName, - Context context); - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String policyName); - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String policyName, Context context); - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection profile details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PolicyInner> beginUpdate(String resourceName, String resourceGroupName, - String policyName, UpdatePolicyInput input); - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection profile details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PolicyInner> beginUpdate(String resourceName, String resourceGroupName, - String policyName, UpdatePolicyInput input, Context context); - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PolicyInner update(String resourceName, String resourceGroupName, String policyName, UpdatePolicyInput input); - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PolicyInner update(String resourceName, String resourceGroupName, String policyName, UpdatePolicyInput input, - Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectableItemsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectableItemsClient.java deleted file mode 100644 index 9a3e2dfcf910..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectableItemsClient.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectableItemInner; - -/** - * An instance of this class provides access to all the operations defined in ReplicationProtectableItemsClient. - */ -public interface ReplicationProtectableItemsClient { - /** - * Gets the list of protectable items. - * - * Lists the protectable items in a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName); - - /** - * Gets the list of protectable items. - * - * Lists the protectable items in a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param filter OData filter options. - * @param take take OData query parameter. - * @param skipToken skipToken OData query parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String filter, String take, - String skipToken, Context context); - - /** - * Gets the details of a protectable item. - * - * The operation to get the details of a protectable item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param protectableItemName Protectable item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String protectableItemName, Context context); - - /** - * Gets the details of a protectable item. - * - * The operation to get the details of a protectable item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param protectableItemName Protectable item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectableItemInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String protectableItemName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectedItemsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectedItemsClient.java deleted file mode 100644 index 7e88401da201..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectedItemsClient.java +++ /dev/null @@ -1,1757 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectedItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplyRecoveryPointInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReverseReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateApplianceForReplicationProtectedItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMobilityServiceRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemInput; - -/** - * An instance of this class provides access to all the operations defined in ReplicationProtectedItemsClient. - */ -public interface ReplicationProtectedItemsClient { - /** - * Gets the list of Replication protected items. - * - * Gets the list of ASR replication protected items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the protection container as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName); - - /** - * Gets the list of Replication protected items. - * - * Gets the list of ASR replication protected items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the protection container as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, Context context); - - /** - * Gets the details of a Replication protected item. - * - * Gets the details of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protected item along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context); - - /** - * Gets the details of a Replication protected item. - * - * Gets the details of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName); - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, EnableProtectionInput input); - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, EnableProtectionInput input, Context context); - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, EnableProtectionInput input); - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, EnableProtectionInput input, - Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, Context context); - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginUpdate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput); - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginUpdate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput, Context context); - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner update(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateReplicationProtectedItemInput updateProtectionInput); - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner update(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateReplicationProtectedItemInput updateProtectionInput, Context context); - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginAddDisks( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, AddDisksInput addDisksInput); - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginAddDisks( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, AddDisksInput addDisksInput, Context context); - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner addDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, AddDisksInput addDisksInput); - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner addDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, AddDisksInput addDisksInput, - Context context); - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginApplyRecoveryPoint( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, ApplyRecoveryPointInput applyRecoveryPointInput); - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginApplyRecoveryPoint( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, ApplyRecoveryPointInput applyRecoveryPointInput, Context context); - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner applyRecoveryPoint(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput); - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner applyRecoveryPoint(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput, Context context); - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginFailoverCancel( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName); - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginFailoverCancel( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, Context context); - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner failoverCancel(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName); - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner failoverCancel(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context); - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginFailoverCommit( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName); - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginFailoverCommit( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, Context context); - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner failoverCommit(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName); - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner failoverCommit(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context); - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginPlannedFailover( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, PlannedFailoverInput failoverInput); - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginPlannedFailover( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, PlannedFailoverInput failoverInput, Context context); - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner plannedFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInput failoverInput); - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner plannedFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInput failoverInput, - Context context); - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - DisableProtectionInput disableProtectionInput); - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - DisableProtectionInput disableProtectionInput, Context context); - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, DisableProtectionInput disableProtectionInput); - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, DisableProtectionInput disableProtectionInput, Context context); - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginRemoveDisks( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, RemoveDisksInput removeDisksInput); - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginRemoveDisks( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, RemoveDisksInput removeDisksInput, Context context); - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner removeDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, RemoveDisksInput removeDisksInput); - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner removeDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, RemoveDisksInput removeDisksInput, - Context context); - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginRepairReplication( - String resourceName, String resourceGroupName, 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the container. - * @param replicatedProtectedItemName The name of the replication protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginRepairReplication( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, Context context); - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner repairReplication(String resourceName, String resourceGroupName, 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the container. - * @param replicatedProtectedItemName The name of the replication protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner repairReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context); - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginReprotect( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, ReverseReplicationInput reprotectInput); - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginReprotect( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, ReverseReplicationInput reprotectInput, Context context); - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner reprotect(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInput reprotectInput); - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner reprotect(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInput reprotectInput, - Context context); - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginResolveHealthErrors( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, ResolveHealthInput resolveHealthInput); - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginResolveHealthErrors( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, ResolveHealthInput resolveHealthInput, Context context); - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner resolveHealthErrors(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ResolveHealthInput resolveHealthInput); - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner resolveHealthErrors(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ResolveHealthInput resolveHealthInput, - Context context); - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginSwitchProvider( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, SwitchProviderInput switchProviderInput); - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginSwitchProvider( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, SwitchProviderInput switchProviderInput, Context context); - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner switchProvider(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, SwitchProviderInput switchProviderInput); - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner switchProvider(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, SwitchProviderInput switchProviderInput, - Context context); - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginTestFailover( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, TestFailoverInput testfailoverInput); - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginTestFailover( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, TestFailoverInput testfailoverInput, Context context); - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner testFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverInput testfailoverInput); - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner testFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverInput testfailoverInput, - Context context); - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginTestFailoverCleanup( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput); - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginTestFailoverCleanup( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput, Context context); - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner testFailoverCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput); - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner testFailoverCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput, - Context context); - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginUnplannedFailover( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UnplannedFailoverInput failoverInput); - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginUnplannedFailover( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UnplannedFailoverInput failoverInput, Context context); - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner unplannedFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInput failoverInput); - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner unplannedFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInput failoverInput, - Context context); - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginUpdateAppliance( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput); - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginUpdateAppliance( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput, - Context context); - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner updateAppliance(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput); - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner updateAppliance(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginUpdateMobilityService( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UpdateMobilityServiceRequest updateMobilityServiceRequest); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationProtectedItemInner> beginUpdateMobilityService( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UpdateMobilityServiceRequest updateMobilityServiceRequest, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner updateMobilityService(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectedItemInner updateMobilityService(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest, Context context); - - /** - * Gets the list of replication protected items. - * - * Gets the list of ASR replication protected items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of replication protected items. - * - * Gets the list of ASR replication protected items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, String skipToken, - String filter, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectionContainerMappingsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectionContainerMappingsClient.java deleted file mode 100644 index 1803e3473fa0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectionContainerMappingsClient.java +++ /dev/null @@ -1,457 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveProtectionContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateProtectionContainerMappingInput; - -/** - * An instance of this class provides access to all the operations defined in - * ReplicationProtectionContainerMappingsClient. - */ -public interface ReplicationProtectionContainerMappingsClient { - /** - * Gets the list of protection container mappings for a protection container. - * - * Lists the protection container mappings for a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName); - - /** - * Gets the list of protection container mappings for a protection container. - * - * Lists the protection container mappings for a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, Context context); - - /** - * Gets a protection container mapping. - * - * Gets the details of a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection Container mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container mapping along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, Context context); - - /** - * Gets a protection container mapping. - * - * Gets the details of a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection Container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container mapping. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectionContainerMappingInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName); - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProtectionContainerMappingInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, CreateProtectionContainerMappingInput creationInput); - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProtectionContainerMappingInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, CreateProtectionContainerMappingInput creationInput, Context context); - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectionContainerMappingInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, CreateProtectionContainerMappingInput creationInput); - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectionContainerMappingInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, CreateProtectionContainerMappingInput creationInput, - Context context); - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName); - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, Context context); - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName); - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, Context context); - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProtectionContainerMappingInner> beginUpdate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, UpdateProtectionContainerMappingInput updateInput); - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProtectionContainerMappingInner> beginUpdate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, UpdateProtectionContainerMappingInput updateInput, Context context); - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectionContainerMappingInner update(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, UpdateProtectionContainerMappingInput updateInput); - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectionContainerMappingInner update(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, UpdateProtectionContainerMappingInput updateInput, - Context context); - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInput removalInput); - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInput removalInput, - Context context); - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, RemoveProtectionContainerMappingInput removalInput); - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, RemoveProtectionContainerMappingInput removalInput, Context context); - - /** - * Gets the list of all protection container mappings in a vault. - * - * Lists the protection container mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of all protection container mappings in a vault. - * - * Lists the protection container mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectionContainersClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectionContainersClient.java deleted file mode 100644 index 4d6262469e68..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectionContainersClient.java +++ /dev/null @@ -1,436 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiscoverProtectableItemRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionInput; - -/** - * An instance of this class provides access to all the operations defined in ReplicationProtectionContainersClient. - */ -public interface ReplicationProtectionContainersClient { - /** - * Gets the list of protection container for a fabric. - * - * Lists the protection containers in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName); - - /** - * Gets the list of protection container for a fabric. - * - * Lists the protection containers in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context); - - /** - * Gets the protection container details. - * - * Gets the details of a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, Context context); - - /** - * Gets the protection container details. - * - * Gets the details of a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectionContainerInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName); - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProtectionContainerInner> beginCreate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - CreateProtectionContainerInput creationInput); - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProtectionContainerInner> beginCreate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - CreateProtectionContainerInput creationInput, Context context); - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectionContainerInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, CreateProtectionContainerInput creationInput); - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectionContainerInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, CreateProtectionContainerInput creationInput, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProtectionContainerInner> beginDiscoverProtectableItem( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - DiscoverProtectableItemRequest discoverProtectableItemRequest); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProtectionContainerInner> beginDiscoverProtectableItem( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - DiscoverProtectableItemRequest discoverProtectableItemRequest, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectionContainerInner discoverProtectableItem(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectionContainerInner discoverProtectableItem(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest, Context context); - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName); - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, Context context); - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName); - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProtectionContainerInner> beginSwitchProtection( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - SwitchProtectionInput switchInput); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProtectionContainerInner> beginSwitchProtection( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - SwitchProtectionInput switchInput, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectionContainerInner switchProtection(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, SwitchProtectionInput switchInput); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProtectionContainerInner switchProtection(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, SwitchProtectionInput switchInput, Context context); - - /** - * Gets the list of all protection containers in a vault. - * - * Lists the protection containers in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of all protection containers in a vault. - * - * Lists the protection containers in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectionIntentsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectionIntentsClient.java deleted file mode 100644 index 290d6a9e6aa3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationProtectionIntentsClient.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectionIntentInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentInput; - -/** - * An instance of this class provides access to all the operations defined in ReplicationProtectionIntentsClient. - */ -public interface ReplicationProtectionIntentsClient { - /** - * Gets the list of replication protection intent objects. - * - * Gets the list of ASR replication protection intent objects in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protection intent objects in the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of replication protection intent objects. - * - * Gets the list of ASR replication protection intent objects in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protection intent objects in the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, - String skipToken, String takeToken, Context context); - - /** - * Gets the details of a Replication protection intent item. - * - * Gets the details of an ASR replication protection intent. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName Replication protection intent name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protection intent along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, - String intentObjectName, Context context); - - /** - * Gets the details of a Replication protection intent item. - * - * Gets the details of an ASR replication protection intent. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName Replication protection intent name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protection intent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectionIntentInner get(String resourceName, String resourceGroupName, String intentObjectName); - - /** - * Create protection intent Resource. - * - * The operation to create an ASR replication protection intent item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName A name for the replication protection item. - * @param input Create Protection Intent Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protection intent along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse(String resourceName, String resourceGroupName, - String intentObjectName, CreateProtectionIntentInput input, Context context); - - /** - * Create protection intent Resource. - * - * The operation to create an ASR replication protection intent item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName A name for the replication protection item. - * @param input Create Protection Intent Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protection intent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationProtectionIntentInner create(String resourceName, String resourceGroupName, String intentObjectName, - CreateProtectionIntentInput input); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationRecoveryPlansClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationRecoveryPlansClient.java deleted file mode 100644 index a42695108cb3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationRecoveryPlansClient.java +++ /dev/null @@ -1,807 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPlanInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateRecoveryPlanInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateRecoveryPlanInput; - -/** - * An instance of this class provides access to all the operations defined in ReplicationRecoveryPlansClient. - */ -public interface ReplicationRecoveryPlansClient { - /** - * Gets the list of recovery plans. - * - * Lists the recovery plans in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan collection details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of recovery plans. - * - * Lists the recovery plans in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan collection details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the requested recovery plan. - * - * Gets the details of the recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Name of the recovery plan. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the recovery plan along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context); - - /** - * Gets the requested recovery plan. - * - * Gets the details of the recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Name of the recovery plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the recovery plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner get(String resourceName, String resourceGroupName, String recoveryPlanName); - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginCreate(String resourceName, - String resourceGroupName, String recoveryPlanName, CreateRecoveryPlanInput input); - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginCreate(String resourceName, - String resourceGroupName, String recoveryPlanName, CreateRecoveryPlanInput input, Context context); - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner create(String resourceName, String resourceGroupName, String recoveryPlanName, - CreateRecoveryPlanInput input); - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner create(String resourceName, String resourceGroupName, String recoveryPlanName, - CreateRecoveryPlanInput input, Context context); - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String recoveryPlanName); - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String recoveryPlanName, Context context); - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String recoveryPlanName); - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String recoveryPlanName, Context context); - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginUpdate(String resourceName, - String resourceGroupName, String recoveryPlanName, UpdateRecoveryPlanInput input); - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginUpdate(String resourceName, - String resourceGroupName, String recoveryPlanName, UpdateRecoveryPlanInput input, Context context); - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner update(String resourceName, String resourceGroupName, String recoveryPlanName, - UpdateRecoveryPlanInput input); - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner update(String resourceName, String resourceGroupName, String recoveryPlanName, - UpdateRecoveryPlanInput input, Context context); - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginFailoverCancel(String resourceName, - String resourceGroupName, String recoveryPlanName); - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginFailoverCancel(String resourceName, - String resourceGroupName, String recoveryPlanName, Context context); - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner failoverCancel(String resourceName, String resourceGroupName, String recoveryPlanName); - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner failoverCancel(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context); - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginFailoverCommit(String resourceName, - String resourceGroupName, String recoveryPlanName); - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginFailoverCommit(String resourceName, - String resourceGroupName, String recoveryPlanName, Context context); - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner failoverCommit(String resourceName, String resourceGroupName, String recoveryPlanName); - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner failoverCommit(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context); - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginPlannedFailover(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanPlannedFailoverInput input); - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginPlannedFailover(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanPlannedFailoverInput input, Context context); - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner plannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanPlannedFailoverInput input); - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner plannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanPlannedFailoverInput input, Context context); - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginReprotect(String resourceName, - String resourceGroupName, String recoveryPlanName); - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginReprotect(String resourceName, - String resourceGroupName, String recoveryPlanName, Context context); - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner reprotect(String resourceName, String resourceGroupName, String recoveryPlanName); - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner reprotect(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context); - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginTestFailover(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverInput input); - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginTestFailover(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverInput input, Context context); - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner testFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverInput input); - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner testFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverInput input, Context context); - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginTestFailoverCleanup(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input); - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginTestFailoverCleanup(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input, Context context); - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner testFailoverCleanup(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverCleanupInput input); - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner testFailoverCleanup(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverCleanupInput input, Context context); - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginUnplannedFailover(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanUnplannedFailoverInput input); - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryPlanInner> beginUnplannedFailover(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanUnplannedFailoverInput input, Context context); - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner unplannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanUnplannedFailoverInput input); - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPlanInner unplannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanUnplannedFailoverInput input, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationRecoveryServicesProvidersClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationRecoveryServicesProvidersClient.java deleted file mode 100644 index 51dd08c2c0a1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationRecoveryServicesProvidersClient.java +++ /dev/null @@ -1,426 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryServicesProviderInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddRecoveryServicesProviderInput; - -/** - * An instance of this class provides access to all the operations defined in - * ReplicationRecoveryServicesProvidersClient. - */ -public interface ReplicationRecoveryServicesProvidersClient { - /** - * Gets the list of registered recovery services providers for the fabric. - * - * Lists the registered recovery services providers for the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName); - - /** - * Gets the list of registered recovery services providers for the fabric. - * - * Lists the registered recovery services providers for the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context); - - /** - * Gets the details of a recovery services provider. - * - * Gets the details of registered recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of registered recovery services provider along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String providerName, Context context); - - /** - * Gets the details of a recovery services provider. - * - * Gets the details of registered recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of registered recovery services provider. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryServicesProviderInner get(String resourceName, String resourceGroupName, String fabricName, - String providerName); - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of provider details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryServicesProviderInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String providerName, - AddRecoveryServicesProviderInput addProviderInput); - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of provider details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryServicesProviderInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String providerName, - AddRecoveryServicesProviderInput addProviderInput, Context context); - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryServicesProviderInner create(String resourceName, String resourceGroupName, String fabricName, - String providerName, AddRecoveryServicesProviderInput addProviderInput); - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryServicesProviderInner create(String resourceName, String resourceGroupName, String fabricName, - String providerName, AddRecoveryServicesProviderInput addProviderInput, Context context); - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, String fabricName, - String providerName); - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, String fabricName, - String providerName, Context context); - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void purge(String resourceName, String resourceGroupName, String fabricName, String providerName); - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void purge(String resourceName, String resourceGroupName, String fabricName, String providerName, Context context); - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of provider details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryServicesProviderInner> - beginRefreshProvider(String resourceName, String resourceGroupName, String fabricName, String providerName); - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of provider details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RecoveryServicesProviderInner> beginRefreshProvider( - String resourceName, String resourceGroupName, String fabricName, String providerName, Context context); - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryServicesProviderInner refreshProvider(String resourceName, String resourceGroupName, String fabricName, - String providerName); - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryServicesProviderInner refreshProvider(String resourceName, String resourceGroupName, String fabricName, - String providerName, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String providerName, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String providerName, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationVaultHealthsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationVaultHealthsClient.java deleted file mode 100644 index ca2941bea2f2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationVaultHealthsClient.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultHealthDetailsInner; - -/** - * An instance of this class provides access to all the operations defined in ReplicationVaultHealthsClient. - */ -public interface ReplicationVaultHealthsClient { - /** - * Gets the health summary for the vault. - * - * Gets the health details of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the health details of the vault along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the health summary for the vault. - * - * Gets the health details of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the health details of the vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VaultHealthDetailsInner get(String resourceName, String resourceGroupName); - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vault health details definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VaultHealthDetailsInner> beginRefresh(String resourceName, - String resourceGroupName); - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vault health details definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VaultHealthDetailsInner> beginRefresh(String resourceName, - String resourceGroupName, Context context); - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault health details definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VaultHealthDetailsInner refresh(String resourceName, String resourceGroupName); - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault health details definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VaultHealthDetailsInner refresh(String resourceName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationVaultSettingsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationVaultSettingsClient.java deleted file mode 100644 index 4c0825344888..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationVaultSettingsClient.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultSettingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingCreationInput; - -/** - * An instance of this class provides access to all the operations defined in ReplicationVaultSettingsClient. - */ -public interface ReplicationVaultSettingsClient { - /** - * Gets the list of vault setting. - * - * Gets the list of vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of vault setting as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of vault setting. - * - * Gets the list of vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of vault setting as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the vault setting. - * - * Gets the vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the vault setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String vaultSettingName, - Context context); - - /** - * Gets the vault setting. - * - * Gets the vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the vault setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VaultSettingInner get(String resourceName, String resourceGroupName, String vaultSettingName); - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vault setting. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VaultSettingInner> beginCreate(String resourceName, - String resourceGroupName, String vaultSettingName, VaultSettingCreationInput input); - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vault setting. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VaultSettingInner> beginCreate(String resourceName, - String resourceGroupName, String vaultSettingName, VaultSettingCreationInput input, Context context); - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VaultSettingInner create(String resourceName, String resourceGroupName, String vaultSettingName, - VaultSettingCreationInput input); - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VaultSettingInner create(String resourceName, String resourceGroupName, String vaultSettingName, - VaultSettingCreationInput input, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationvCentersClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationvCentersClient.java deleted file mode 100644 index 8a401dd57504..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/ReplicationvCentersClient.java +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VCenterInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddVCenterRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateVCenterRequest; - -/** - * An instance of this class provides access to all the operations defined in ReplicationvCentersClient. - */ -public interface ReplicationvCentersClient { - /** - * Gets the list of vCenter registered under a fabric. - * - * Lists the vCenter servers registered in a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName); - - /** - * Gets the list of vCenter registered under a fabric. - * - * Lists the vCenter servers registered in a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context); - - /** - * Gets the details of a vCenter. - * - * Gets the details of a registered vCenter server(Add vCenter server). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a registered vCenter server(Add vCenter server) along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String vcenterName, Context context); - - /** - * Gets the details of a vCenter. - * - * Gets the details of a registered vCenter server(Add vCenter server). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a registered vCenter server(Add vCenter server). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VCenterInner get(String resourceName, String resourceGroupName, String fabricName, String vcenterName); - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vCenter definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VCenterInner> beginCreate(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, AddVCenterRequest addVCenterRequest); - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vCenter definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VCenterInner> beginCreate(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, AddVCenterRequest addVCenterRequest, Context context); - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VCenterInner create(String resourceName, String resourceGroupName, String fabricName, String vcenterName, - AddVCenterRequest addVCenterRequest); - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VCenterInner create(String resourceName, String resourceGroupName, String fabricName, String vcenterName, - AddVCenterRequest addVCenterRequest, Context context); - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String vcenterName); - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String vcenterName, Context context); - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String vcenterName); - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String vcenterName, Context context); - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vCenter definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VCenterInner> beginUpdate(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, UpdateVCenterRequest updateVCenterRequest); - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vCenter definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VCenterInner> beginUpdate(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, UpdateVCenterRequest updateVCenterRequest, Context context); - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VCenterInner update(String resourceName, String resourceGroupName, String fabricName, String vcenterName, - UpdateVCenterRequest updateVCenterRequest); - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VCenterInner update(String resourceName, String resourceGroupName, String fabricName, String vcenterName, - UpdateVCenterRequest updateVCenterRequest, Context context); - - /** - * Gets the list of vCenter registered under the vault. - * - * Lists the vCenter servers registered in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of vCenter registered under the vault. - * - * Lists the vCenter servers registered in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/SiteRecoveryManagementClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/SiteRecoveryManagementClient.java deleted file mode 100644 index 10f9fd06bb48..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/SiteRecoveryManagementClient.java +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for SiteRecoveryManagementClient class. - */ -public interface SiteRecoveryManagementClient { - /** - * Gets The subscription Id. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the ReplicationAlertSettingsClient object to access its operations. - * - * @return the ReplicationAlertSettingsClient object. - */ - ReplicationAlertSettingsClient getReplicationAlertSettings(); - - /** - * Gets the ReplicationAppliancesClient object to access its operations. - * - * @return the ReplicationAppliancesClient object. - */ - ReplicationAppliancesClient getReplicationAppliances(); - - /** - * Gets the ReplicationEligibilityResultsOperationsClient object to access its operations. - * - * @return the ReplicationEligibilityResultsOperationsClient object. - */ - ReplicationEligibilityResultsOperationsClient getReplicationEligibilityResultsOperations(); - - /** - * Gets the ReplicationEventsClient object to access its operations. - * - * @return the ReplicationEventsClient object. - */ - ReplicationEventsClient getReplicationEvents(); - - /** - * Gets the ReplicationFabricsClient object to access its operations. - * - * @return the ReplicationFabricsClient object. - */ - ReplicationFabricsClient getReplicationFabrics(); - - /** - * Gets the ReplicationLogicalNetworksClient object to access its operations. - * - * @return the ReplicationLogicalNetworksClient object. - */ - ReplicationLogicalNetworksClient getReplicationLogicalNetworks(); - - /** - * Gets the ReplicationNetworksClient object to access its operations. - * - * @return the ReplicationNetworksClient object. - */ - ReplicationNetworksClient getReplicationNetworks(); - - /** - * Gets the ReplicationNetworkMappingsClient object to access its operations. - * - * @return the ReplicationNetworkMappingsClient object. - */ - ReplicationNetworkMappingsClient getReplicationNetworkMappings(); - - /** - * Gets the ReplicationProtectionContainersClient object to access its operations. - * - * @return the ReplicationProtectionContainersClient object. - */ - ReplicationProtectionContainersClient getReplicationProtectionContainers(); - - /** - * Gets the ReplicationMigrationItemsClient object to access its operations. - * - * @return the ReplicationMigrationItemsClient object. - */ - ReplicationMigrationItemsClient getReplicationMigrationItems(); - - /** - * Gets the MigrationRecoveryPointsClient object to access its operations. - * - * @return the MigrationRecoveryPointsClient object. - */ - MigrationRecoveryPointsClient getMigrationRecoveryPoints(); - - /** - * Gets the ReplicationProtectableItemsClient object to access its operations. - * - * @return the ReplicationProtectableItemsClient object. - */ - ReplicationProtectableItemsClient getReplicationProtectableItems(); - - /** - * Gets the ReplicationProtectedItemsClient object to access its operations. - * - * @return the ReplicationProtectedItemsClient object. - */ - ReplicationProtectedItemsClient getReplicationProtectedItems(); - - /** - * Gets the RecoveryPointsClient object to access its operations. - * - * @return the RecoveryPointsClient object. - */ - RecoveryPointsClient getRecoveryPoints(); - - /** - * Gets the TargetComputeSizesClient object to access its operations. - * - * @return the TargetComputeSizesClient object. - */ - TargetComputeSizesClient getTargetComputeSizes(); - - /** - * Gets the ReplicationProtectionContainerMappingsClient object to access its operations. - * - * @return the ReplicationProtectionContainerMappingsClient object. - */ - ReplicationProtectionContainerMappingsClient getReplicationProtectionContainerMappings(); - - /** - * Gets the ReplicationRecoveryServicesProvidersClient object to access its operations. - * - * @return the ReplicationRecoveryServicesProvidersClient object. - */ - ReplicationRecoveryServicesProvidersClient getReplicationRecoveryServicesProviders(); - - /** - * Gets the StorageClassificationsClient object to access its operations. - * - * @return the StorageClassificationsClient object. - */ - StorageClassificationsClient getStorageClassifications(); - - /** - * Gets the StorageClassificationMappingsClient object to access its operations. - * - * @return the StorageClassificationMappingsClient object. - */ - StorageClassificationMappingsClient getStorageClassificationMappings(); - - /** - * Gets the ReplicationvCentersClient object to access its operations. - * - * @return the ReplicationvCentersClient object. - */ - ReplicationvCentersClient getReplicationvCenters(); - - /** - * Gets the ReplicationJobsClient object to access its operations. - * - * @return the ReplicationJobsClient object. - */ - ReplicationJobsClient getReplicationJobs(); - - /** - * Gets the ReplicationPoliciesClient object to access its operations. - * - * @return the ReplicationPoliciesClient object. - */ - ReplicationPoliciesClient getReplicationPolicies(); - - /** - * Gets the ReplicationProtectionIntentsClient object to access its operations. - * - * @return the ReplicationProtectionIntentsClient object. - */ - ReplicationProtectionIntentsClient getReplicationProtectionIntents(); - - /** - * Gets the ReplicationRecoveryPlansClient object to access its operations. - * - * @return the ReplicationRecoveryPlansClient object. - */ - ReplicationRecoveryPlansClient getReplicationRecoveryPlans(); - - /** - * Gets the SupportedOperatingSystemsOperationsClient object to access its operations. - * - * @return the SupportedOperatingSystemsOperationsClient object. - */ - SupportedOperatingSystemsOperationsClient getSupportedOperatingSystemsOperations(); - - /** - * Gets the ReplicationVaultHealthsClient object to access its operations. - * - * @return the ReplicationVaultHealthsClient object. - */ - ReplicationVaultHealthsClient getReplicationVaultHealths(); - - /** - * Gets the ReplicationVaultSettingsClient object to access its operations. - * - * @return the ReplicationVaultSettingsClient object. - */ - ReplicationVaultSettingsClient getReplicationVaultSettings(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/StorageClassificationMappingsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/StorageClassificationMappingsClient.java deleted file mode 100644 index ecf3081e146a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/StorageClassificationMappingsClient.java +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappingInput; - -/** - * An instance of this class provides access to all the operations defined in StorageClassificationMappingsClient. - */ -public interface StorageClassificationMappingsClient { - /** - * Gets the list of storage classification mappings objects under a storage. - * - * Lists the storage classification mappings for the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationStorageClassifications(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName); - - /** - * Gets the list of storage classification mappings objects under a storage. - * - * Lists the storage classification mappings for the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationStorageClassifications(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName, Context context); - - /** - * Gets the details of a storage classification mapping. - * - * Gets the details of the specified storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification mapping along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName, Context context); - - /** - * Gets the details of a storage classification mapping. - * - * Gets the details of the specified storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification mapping. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - StorageClassificationMappingInner get(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName); - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of storage mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, StorageClassificationMappingInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String storageClassificationName, - String storageClassificationMappingName, StorageClassificationMappingInput pairingInput); - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of storage mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, StorageClassificationMappingInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String storageClassificationName, - String storageClassificationMappingName, StorageClassificationMappingInput pairingInput, Context context); - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage mapping object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - StorageClassificationMappingInner create(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName, - StorageClassificationMappingInput pairingInput); - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage mapping object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - StorageClassificationMappingInner create(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName, - StorageClassificationMappingInput pairingInput, Context context); - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName); - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName, Context context); - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String storageClassificationName, - String storageClassificationMappingName); - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceName, String resourceGroupName, String fabricName, String storageClassificationName, - String storageClassificationMappingName, Context context); - - /** - * Gets the list of storage classification mappings objects under a vault. - * - * Lists the storage classification mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of storage classification mappings objects under a vault. - * - * Lists the storage classification mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, - Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/StorageClassificationsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/StorageClassificationsClient.java deleted file mode 100644 index 0fa6042a9e38..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/StorageClassificationsClient.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationInner; - -/** - * An instance of this class provides access to all the operations defined in StorageClassificationsClient. - */ -public interface StorageClassificationsClient { - /** - * Gets the list of storage classification objects under a fabric. - * - * Lists the storage classifications available in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Site name of interest. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName); - - /** - * Gets the list of storage classification objects under a fabric. - * - * Lists the storage classifications available in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Site name of interest. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context); - - /** - * Gets the details of a storage classification. - * - * Gets the details of the specified storage classification. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, Context context); - - /** - * Gets the details of a storage classification. - * - * Gets the details of the specified storage classification. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - StorageClassificationInner get(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName); - - /** - * Gets the list of storage classification objects under a vault. - * - * Lists the storage classifications in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of storage classification objects under a vault. - * - * Lists the storage classifications in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/SupportedOperatingSystemsOperationsClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/SupportedOperatingSystemsOperationsClient.java deleted file mode 100644 index 9429601b95a1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/SupportedOperatingSystemsOperationsClient.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.SupportedOperatingSystemsInner; - -/** - * An instance of this class provides access to all the operations defined in SupportedOperatingSystemsOperationsClient. - */ -public interface SupportedOperatingSystemsOperationsClient { - /** - * Gets the data of supported operating systems by SRS. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param instanceType The instance type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the data of supported operating systems by SRS along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceName, String resourceGroupName, - String instanceType, Context context); - - /** - * Gets the data of supported operating systems by SRS. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the data of supported operating systems by SRS. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SupportedOperatingSystemsInner get(String resourceName, String resourceGroupName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/TargetComputeSizesClient.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/TargetComputeSizesClient.java deleted file mode 100644 index c19347900a8e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/TargetComputeSizesClient.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.TargetComputeSizeInner; - -/** - * An instance of this class provides access to all the operations defined in TargetComputeSizesClient. - */ -public interface TargetComputeSizesClient { - /** - * Gets the list of target compute sizes for the replication protected item. - * - * Lists the available target compute sizes for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return target compute size collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationProtectedItems(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName); - - /** - * Gets the list of target compute sizes for the replication protected item. - * - * Lists the available target compute sizes for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return target compute size collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByReplicationProtectedItems(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/AlertInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/AlertInner.java deleted file mode 100644 index da773adadadd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/AlertInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AlertProperties; -import java.io.IOException; - -/** - * Implements the Alert class. - */ -@Fluent -public final class AlertInner extends ProxyResource { - /* - * Alert related data. - */ - private AlertProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of AlertInner class. - */ - public AlertInner() { - } - - /** - * Get the properties property: Alert related data. - * - * @return the properties value. - */ - public AlertProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the AlertInner object itself. - */ - public AlertInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AlertInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AlertInner if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AlertInner. - */ - public static AlertInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AlertInner deserializedAlertInner = new AlertInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedAlertInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAlertInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedAlertInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedAlertInner.properties = AlertProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedAlertInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAlertInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/EventInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/EventInner.java deleted file mode 100644 index fe83f98dd9a2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/EventInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EventProperties; -import java.io.IOException; - -/** - * Implements the Event class. - */ -@Fluent -public final class EventInner extends ProxyResource { - /* - * Event related data. - */ - private EventProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of EventInner class. - */ - public EventInner() { - } - - /** - * Get the properties property: Event related data. - * - * @return the properties value. - */ - public EventProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the EventInner object itself. - */ - public EventInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EventInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EventInner if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EventInner. - */ - public static EventInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EventInner deserializedEventInner = new EventInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEventInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEventInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEventInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEventInner.properties = EventProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedEventInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEventInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/FabricInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/FabricInner.java deleted file mode 100644 index 01840e8df99b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/FabricInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricProperties; -import java.io.IOException; - -/** - * Fabric definition. - */ -@Fluent -public final class FabricInner extends ProxyResource { - /* - * Fabric related data. - */ - private FabricProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of FabricInner class. - */ - public FabricInner() { - } - - /** - * Get the properties property: Fabric related data. - * - * @return the properties value. - */ - public FabricProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the FabricInner object itself. - */ - public FabricInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FabricInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FabricInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FabricInner. - */ - public static FabricInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FabricInner deserializedFabricInner = new FabricInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedFabricInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedFabricInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedFabricInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedFabricInner.properties = FabricProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedFabricInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFabricInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/JobInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/JobInner.java deleted file mode 100644 index 0f0d68c7cfb0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/JobInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobProperties; -import java.io.IOException; - -/** - * Job details. - */ -@Fluent -public final class JobInner extends ProxyResource { - /* - * The custom data. - */ - private JobProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of JobInner class. - */ - public JobInner() { - } - - /** - * Get the properties property: The custom data. - * - * @return the properties value. - */ - public JobProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the JobInner object itself. - */ - public JobInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobInner if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JobInner. - */ - public static JobInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobInner deserializedJobInner = new JobInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedJobInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedJobInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedJobInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedJobInner.properties = JobProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedJobInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/LogicalNetworkInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/LogicalNetworkInner.java deleted file mode 100644 index 03dfdb80c3e2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/LogicalNetworkInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LogicalNetworkProperties; -import java.io.IOException; - -/** - * Logical network data model. - */ -@Fluent -public final class LogicalNetworkInner extends ProxyResource { - /* - * The Logical Network Properties. - */ - private LogicalNetworkProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of LogicalNetworkInner class. - */ - public LogicalNetworkInner() { - } - - /** - * Get the properties property: The Logical Network Properties. - * - * @return the properties value. - */ - public LogicalNetworkProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the LogicalNetworkInner object itself. - */ - public LogicalNetworkInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LogicalNetworkInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LogicalNetworkInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LogicalNetworkInner. - */ - public static LogicalNetworkInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LogicalNetworkInner deserializedLogicalNetworkInner = new LogicalNetworkInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedLogicalNetworkInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedLogicalNetworkInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedLogicalNetworkInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedLogicalNetworkInner.properties = LogicalNetworkProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedLogicalNetworkInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedLogicalNetworkInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/MigrationItemInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/MigrationItemInner.java deleted file mode 100644 index 5b20e9e77996..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/MigrationItemInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationItemProperties; -import java.io.IOException; - -/** - * Migration item. - */ -@Fluent -public final class MigrationItemInner extends ProxyResource { - /* - * The migration item properties. - */ - private MigrationItemProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of MigrationItemInner class. - */ - public MigrationItemInner() { - } - - /** - * Get the properties property: The migration item properties. - * - * @return the properties value. - */ - public MigrationItemProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The migration item properties. - * - * @param properties the properties value to set. - * @return the MigrationItemInner object itself. - */ - public MigrationItemInner withProperties(MigrationItemProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the MigrationItemInner object itself. - */ - public MigrationItemInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MigrationItemInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MigrationItemInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MigrationItemInner. - */ - public static MigrationItemInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MigrationItemInner deserializedMigrationItemInner = new MigrationItemInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedMigrationItemInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedMigrationItemInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedMigrationItemInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedMigrationItemInner.properties = MigrationItemProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedMigrationItemInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMigrationItemInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/MigrationRecoveryPointInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/MigrationRecoveryPointInner.java deleted file mode 100644 index ee29b2960f37..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/MigrationRecoveryPointInner.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPointProperties; -import java.io.IOException; - -/** - * Recovery point for a migration item. - */ -@Fluent -public final class MigrationRecoveryPointInner extends ProxyResource { - /* - * Recovery point properties. - */ - private MigrationRecoveryPointProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of MigrationRecoveryPointInner class. - */ - public MigrationRecoveryPointInner() { - } - - /** - * Get the properties property: Recovery point properties. - * - * @return the properties value. - */ - public MigrationRecoveryPointProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Recovery point properties. - * - * @param properties the properties value to set. - * @return the MigrationRecoveryPointInner object itself. - */ - public MigrationRecoveryPointInner withProperties(MigrationRecoveryPointProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the MigrationRecoveryPointInner object itself. - */ - public MigrationRecoveryPointInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MigrationRecoveryPointInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MigrationRecoveryPointInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MigrationRecoveryPointInner. - */ - public static MigrationRecoveryPointInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MigrationRecoveryPointInner deserializedMigrationRecoveryPointInner = new MigrationRecoveryPointInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedMigrationRecoveryPointInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedMigrationRecoveryPointInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedMigrationRecoveryPointInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedMigrationRecoveryPointInner.properties - = MigrationRecoveryPointProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedMigrationRecoveryPointInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMigrationRecoveryPointInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/NetworkInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/NetworkInner.java deleted file mode 100644 index 70e445bc9a2c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/NetworkInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkProperties; -import java.io.IOException; - -/** - * Network model. - */ -@Fluent -public final class NetworkInner extends ProxyResource { - /* - * The Network Properties. - */ - private NetworkProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of NetworkInner class. - */ - public NetworkInner() { - } - - /** - * Get the properties property: The Network Properties. - * - * @return the properties value. - */ - public NetworkProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the NetworkInner object itself. - */ - public NetworkInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NetworkInner. - */ - public static NetworkInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkInner deserializedNetworkInner = new NetworkInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedNetworkInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedNetworkInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedNetworkInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedNetworkInner.properties = NetworkProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedNetworkInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/NetworkMappingInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/NetworkMappingInner.java deleted file mode 100644 index 53749228e723..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/NetworkMappingInner.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMappingProperties; -import java.io.IOException; - -/** - * 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 extensions in subsequent versions. - */ -@Fluent -public final class NetworkMappingInner extends ProxyResource { - /* - * The Network Mapping Properties. - */ - private NetworkMappingProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of NetworkMappingInner class. - */ - public NetworkMappingInner() { - } - - /** - * Get the properties property: The Network Mapping Properties. - * - * @return the properties value. - */ - public NetworkMappingProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the NetworkMappingInner object itself. - */ - public NetworkMappingInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkMappingInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkMappingInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NetworkMappingInner. - */ - public static NetworkMappingInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkMappingInner deserializedNetworkMappingInner = new NetworkMappingInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedNetworkMappingInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedNetworkMappingInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedNetworkMappingInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedNetworkMappingInner.properties = NetworkMappingProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedNetworkMappingInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkMappingInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/OperationsDiscoveryInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/OperationsDiscoveryInner.java deleted file mode 100644 index 291ca7719b44..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/OperationsDiscoveryInner.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Display; -import java.io.IOException; - -/** - * Operations discovery class. - */ -@Fluent -public final class OperationsDiscoveryInner implements JsonSerializable { - /* - * 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). - */ - private String name; - - /* - * Object type. - */ - 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". - */ - private String origin; - - /* - * Properties. Reserved for future use. - */ - private Object properties; - - /** - * Creates an instance of OperationsDiscoveryInner class. - */ - public OperationsDiscoveryInner() { - } - - /** - * Get the name property: 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 the name property: 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 the display property: Object type. - * - * @return the display value. - */ - public Display display() { - return this.display; - } - - /** - * Set the display property: 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 the origin property: 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 the origin property: 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 the properties property: Properties. Reserved for future use. - * - * @return the properties value. - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("display", this.display); - jsonWriter.writeStringField("origin", this.origin); - jsonWriter.writeUntypedField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationsDiscoveryInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationsDiscoveryInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationsDiscoveryInner. - */ - public static OperationsDiscoveryInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationsDiscoveryInner deserializedOperationsDiscoveryInner = new OperationsDiscoveryInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationsDiscoveryInner.name = reader.getString(); - } else if ("display".equals(fieldName)) { - deserializedOperationsDiscoveryInner.display = Display.fromJson(reader); - } else if ("origin".equals(fieldName)) { - deserializedOperationsDiscoveryInner.origin = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedOperationsDiscoveryInner.properties = reader.readUntyped(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationsDiscoveryInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/PolicyInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/PolicyInner.java deleted file mode 100644 index 390faf637f33..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/PolicyInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProperties; -import java.io.IOException; - -/** - * Protection profile details. - */ -@Fluent -public final class PolicyInner extends ProxyResource { - /* - * The custom data. - */ - private PolicyProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of PolicyInner class. - */ - public PolicyInner() { - } - - /** - * Get the properties property: The custom data. - * - * @return the properties value. - */ - public PolicyProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the PolicyInner object itself. - */ - public PolicyInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PolicyInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PolicyInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PolicyInner. - */ - public static PolicyInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PolicyInner deserializedPolicyInner = new PolicyInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPolicyInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPolicyInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPolicyInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPolicyInner.properties = PolicyProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedPolicyInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPolicyInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ProtectableItemInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ProtectableItemInner.java deleted file mode 100644 index 7faaf8852f59..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ProtectableItemInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectableItemProperties; -import java.io.IOException; - -/** - * Replication protected item. - */ -@Fluent -public final class ProtectableItemInner extends ProxyResource { - /* - * The custom data. - */ - private ProtectableItemProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ProtectableItemInner class. - */ - public ProtectableItemInner() { - } - - /** - * Get the properties property: The custom data. - * - * @return the properties value. - */ - public ProtectableItemProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the ProtectableItemInner object itself. - */ - public ProtectableItemInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProtectableItemInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProtectableItemInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ProtectableItemInner. - */ - public static ProtectableItemInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProtectableItemInner deserializedProtectableItemInner = new ProtectableItemInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedProtectableItemInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedProtectableItemInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedProtectableItemInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedProtectableItemInner.properties = ProtectableItemProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedProtectableItemInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProtectableItemInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ProtectionContainerInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ProtectionContainerInner.java deleted file mode 100644 index a21bab6e14ec..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ProtectionContainerInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerProperties; -import java.io.IOException; - -/** - * Protection container details. - */ -@Fluent -public final class ProtectionContainerInner extends ProxyResource { - /* - * The custom data. - */ - private ProtectionContainerProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ProtectionContainerInner class. - */ - public ProtectionContainerInner() { - } - - /** - * Get the properties property: The custom data. - * - * @return the properties value. - */ - public ProtectionContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the ProtectionContainerInner object itself. - */ - public ProtectionContainerInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProtectionContainerInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProtectionContainerInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ProtectionContainerInner. - */ - public static ProtectionContainerInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProtectionContainerInner deserializedProtectionContainerInner = new ProtectionContainerInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedProtectionContainerInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedProtectionContainerInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedProtectionContainerInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedProtectionContainerInner.properties = ProtectionContainerProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedProtectionContainerInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProtectionContainerInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ProtectionContainerMappingInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ProtectionContainerMappingInner.java deleted file mode 100644 index 9613f81761e1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ProtectionContainerMappingInner.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerMappingProperties; -import java.io.IOException; - -/** - * Protection container mapping object. - */ -@Fluent -public final class ProtectionContainerMappingInner extends ProxyResource { - /* - * The custom data. - */ - private ProtectionContainerMappingProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ProtectionContainerMappingInner class. - */ - public ProtectionContainerMappingInner() { - } - - /** - * Get the properties property: The custom data. - * - * @return the properties value. - */ - public ProtectionContainerMappingProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the ProtectionContainerMappingInner object itself. - */ - public ProtectionContainerMappingInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProtectionContainerMappingInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProtectionContainerMappingInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ProtectionContainerMappingInner. - */ - public static ProtectionContainerMappingInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProtectionContainerMappingInner deserializedProtectionContainerMappingInner - = new ProtectionContainerMappingInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedProtectionContainerMappingInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedProtectionContainerMappingInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedProtectionContainerMappingInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedProtectionContainerMappingInner.properties - = ProtectionContainerMappingProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedProtectionContainerMappingInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProtectionContainerMappingInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/RecoveryPlanInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/RecoveryPlanInner.java deleted file mode 100644 index 5cc72c60b548..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/RecoveryPlanInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProperties; -import java.io.IOException; - -/** - * Recovery plan details. - */ -@Fluent -public final class RecoveryPlanInner extends ProxyResource { - /* - * The custom details. - */ - private RecoveryPlanProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of RecoveryPlanInner class. - */ - public RecoveryPlanInner() { - } - - /** - * Get the properties property: The custom details. - * - * @return the properties value. - */ - public RecoveryPlanProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the RecoveryPlanInner object itself. - */ - public RecoveryPlanInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanInner. - */ - public static RecoveryPlanInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanInner deserializedRecoveryPlanInner = new RecoveryPlanInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRecoveryPlanInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRecoveryPlanInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedRecoveryPlanInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRecoveryPlanInner.properties = RecoveryPlanProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedRecoveryPlanInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/RecoveryPointInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/RecoveryPointInner.java deleted file mode 100644 index 0a0eb2eb1bf5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/RecoveryPointInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPointProperties; -import java.io.IOException; - -/** - * Recovery point. - */ -@Fluent -public final class RecoveryPointInner extends ProxyResource { - /* - * The recovery point properties. - */ - private RecoveryPointProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of RecoveryPointInner class. - */ - public RecoveryPointInner() { - } - - /** - * Get the properties property: The recovery point properties. - * - * @return the properties value. - */ - public RecoveryPointProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The recovery point properties. - * - * @param properties the properties value to set. - * @return the RecoveryPointInner object itself. - */ - public RecoveryPointInner withProperties(RecoveryPointProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the RecoveryPointInner object itself. - */ - public RecoveryPointInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPointInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPointInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPointInner. - */ - public static RecoveryPointInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPointInner deserializedRecoveryPointInner = new RecoveryPointInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRecoveryPointInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRecoveryPointInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedRecoveryPointInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRecoveryPointInner.properties = RecoveryPointProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedRecoveryPointInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPointInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/RecoveryServicesProviderInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/RecoveryServicesProviderInner.java deleted file mode 100644 index f0886b413e37..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/RecoveryServicesProviderInner.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryServicesProviderProperties; -import java.io.IOException; - -/** - * Provider details. - */ -@Fluent -public final class RecoveryServicesProviderInner extends ProxyResource { - /* - * Provider properties. - */ - private RecoveryServicesProviderProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of RecoveryServicesProviderInner class. - */ - public RecoveryServicesProviderInner() { - } - - /** - * Get the properties property: Provider properties. - * - * @return the properties value. - */ - public RecoveryServicesProviderProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the RecoveryServicesProviderInner object itself. - */ - public RecoveryServicesProviderInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryServicesProviderInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryServicesProviderInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryServicesProviderInner. - */ - public static RecoveryServicesProviderInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryServicesProviderInner deserializedRecoveryServicesProviderInner - = new RecoveryServicesProviderInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRecoveryServicesProviderInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRecoveryServicesProviderInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedRecoveryServicesProviderInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRecoveryServicesProviderInner.properties - = RecoveryServicesProviderProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedRecoveryServicesProviderInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryServicesProviderInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationApplianceInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationApplianceInner.java deleted file mode 100644 index d553f79930fe..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationApplianceInner.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationApplianceProperties; -import java.io.IOException; - -/** - * Replication appliance definition. - */ -@Fluent -public final class ReplicationApplianceInner implements JsonSerializable { - /* - * Appliance related data. - */ - private ReplicationApplianceProperties properties; - - /** - * Creates an instance of ReplicationApplianceInner class. - */ - public ReplicationApplianceInner() { - } - - /** - * Get the properties property: Appliance related data. - * - * @return the properties value. - */ - public ReplicationApplianceProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Appliance related data. - * - * @param properties the properties value to set. - * @return the ReplicationApplianceInner object itself. - */ - public ReplicationApplianceInner withProperties(ReplicationApplianceProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationApplianceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationApplianceInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationApplianceInner. - */ - public static ReplicationApplianceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationApplianceInner deserializedReplicationApplianceInner = new ReplicationApplianceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedReplicationApplianceInner.properties = ReplicationApplianceProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationApplianceInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationEligibilityResultsCollectionInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationEligibilityResultsCollectionInner.java deleted file mode 100644 index 430088c1f8d2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationEligibilityResultsCollectionInner.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Replication eligibility results collection response model. - */ -@Fluent -public final class ReplicationEligibilityResultsCollectionInner - implements JsonSerializable { - /* - * The replication eligibility results details. - */ - private List value; - - /** - * Creates an instance of ReplicationEligibilityResultsCollectionInner class. - */ - public ReplicationEligibilityResultsCollectionInner() { - } - - /** - * Get the value property: The replication eligibility results details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The replication eligibility results details. - * - * @param value the value value to set. - * @return the ReplicationEligibilityResultsCollectionInner object itself. - */ - public ReplicationEligibilityResultsCollectionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationEligibilityResultsCollectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationEligibilityResultsCollectionInner if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationEligibilityResultsCollectionInner. - */ - public static ReplicationEligibilityResultsCollectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationEligibilityResultsCollectionInner deserializedReplicationEligibilityResultsCollectionInner - = new ReplicationEligibilityResultsCollectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ReplicationEligibilityResultsInner.fromJson(reader1)); - deserializedReplicationEligibilityResultsCollectionInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationEligibilityResultsCollectionInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationEligibilityResultsInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationEligibilityResultsInner.java deleted file mode 100644 index f5c294017746..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationEligibilityResultsInner.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationEligibilityResultsProperties; -import java.io.IOException; - -/** - * Replication eligibility results response model. - */ -@Immutable -public final class ReplicationEligibilityResultsInner implements JsonSerializable { - /* - * Gets the name of this object. - */ - private String name; - - /* - * Gets the object type. - */ - private String type; - - /* - * Gets Unique ARM identifier for this object. - */ - private String id; - - /* - * Gets properties model for replication eligibility results API. - */ - private ReplicationEligibilityResultsProperties properties; - - /** - * Creates an instance of ReplicationEligibilityResultsInner class. - */ - public ReplicationEligibilityResultsInner() { - } - - /** - * Get the name property: Gets the name of this object. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Gets the object type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the id property: Gets Unique ARM identifier for this object. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the properties property: Gets properties model for replication eligibility results API. - * - * @return the properties value. - */ - public ReplicationEligibilityResultsProperties properties() { - return this.properties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationEligibilityResultsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationEligibilityResultsInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationEligibilityResultsInner. - */ - public static ReplicationEligibilityResultsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationEligibilityResultsInner deserializedReplicationEligibilityResultsInner - = new ReplicationEligibilityResultsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedReplicationEligibilityResultsInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedReplicationEligibilityResultsInner.type = reader.getString(); - } else if ("id".equals(fieldName)) { - deserializedReplicationEligibilityResultsInner.id = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedReplicationEligibilityResultsInner.properties - = ReplicationEligibilityResultsProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationEligibilityResultsInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationProtectedItemInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationProtectedItemInner.java deleted file mode 100644 index 3e243b7cf3ef..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationProtectedItemInner.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItemProperties; -import java.io.IOException; - -/** - * Replication protected item. - */ -@Fluent -public final class ReplicationProtectedItemInner extends ProxyResource { - /* - * The custom data. - */ - private ReplicationProtectedItemProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ReplicationProtectedItemInner class. - */ - public ReplicationProtectedItemInner() { - } - - /** - * Get the properties property: The custom data. - * - * @return the properties value. - */ - public ReplicationProtectedItemProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the ReplicationProtectedItemInner object itself. - */ - public ReplicationProtectedItemInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProtectedItemInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProtectedItemInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ReplicationProtectedItemInner. - */ - public static ReplicationProtectedItemInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProtectedItemInner deserializedReplicationProtectedItemInner - = new ReplicationProtectedItemInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedReplicationProtectedItemInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedReplicationProtectedItemInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedReplicationProtectedItemInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedReplicationProtectedItemInner.properties - = ReplicationProtectedItemProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedReplicationProtectedItemInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProtectedItemInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationProtectionIntentInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationProtectionIntentInner.java deleted file mode 100644 index 5f39e689f6c2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/ReplicationProtectionIntentInner.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntentProperties; -import java.io.IOException; - -/** - * Replication protection intent. - */ -@Fluent -public final class ReplicationProtectionIntentInner extends ProxyResource { - /* - * The custom data. - */ - private ReplicationProtectionIntentProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ReplicationProtectionIntentInner class. - */ - public ReplicationProtectionIntentInner() { - } - - /** - * Get the properties property: The custom data. - * - * @return the properties value. - */ - public ReplicationProtectionIntentProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The custom data. - * - * @param properties the properties value to set. - * @return the ReplicationProtectionIntentInner object itself. - */ - public ReplicationProtectionIntentInner withProperties(ReplicationProtectionIntentProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the ReplicationProtectionIntentInner object itself. - */ - public ReplicationProtectionIntentInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProtectionIntentInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProtectionIntentInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ReplicationProtectionIntentInner. - */ - public static ReplicationProtectionIntentInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProtectionIntentInner deserializedReplicationProtectionIntentInner - = new ReplicationProtectionIntentInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedReplicationProtectionIntentInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedReplicationProtectionIntentInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedReplicationProtectionIntentInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedReplicationProtectionIntentInner.properties - = ReplicationProtectionIntentProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedReplicationProtectionIntentInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProtectionIntentInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/StorageClassificationInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/StorageClassificationInner.java deleted file mode 100644 index 2350143f639a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/StorageClassificationInner.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationProperties; -import java.io.IOException; - -/** - * Storage object definition. - */ -@Fluent -public final class StorageClassificationInner extends ProxyResource { - /* - * Properties of the storage object. - */ - private StorageClassificationProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of StorageClassificationInner class. - */ - public StorageClassificationInner() { - } - - /** - * Get the properties property: Properties of the storage object. - * - * @return the properties value. - */ - public StorageClassificationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the StorageClassificationInner object itself. - */ - public StorageClassificationInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageClassificationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageClassificationInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the StorageClassificationInner. - */ - public static StorageClassificationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageClassificationInner deserializedStorageClassificationInner = new StorageClassificationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedStorageClassificationInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedStorageClassificationInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedStorageClassificationInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedStorageClassificationInner.properties - = StorageClassificationProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedStorageClassificationInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageClassificationInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/StorageClassificationMappingInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/StorageClassificationMappingInner.java deleted file mode 100644 index 72c67b4090d8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/StorageClassificationMappingInner.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappingProperties; -import java.io.IOException; - -/** - * Storage mapping object. - */ -@Fluent -public final class StorageClassificationMappingInner extends ProxyResource { - /* - * Properties of the storage mapping object. - */ - private StorageClassificationMappingProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of StorageClassificationMappingInner class. - */ - public StorageClassificationMappingInner() { - } - - /** - * Get the properties property: Properties of the storage mapping object. - * - * @return the properties value. - */ - public StorageClassificationMappingProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of the storage mapping object. - * - * @param properties the properties value to set. - * @return the StorageClassificationMappingInner object itself. - */ - public StorageClassificationMappingInner withProperties(StorageClassificationMappingProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the StorageClassificationMappingInner object itself. - */ - public StorageClassificationMappingInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageClassificationMappingInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageClassificationMappingInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the StorageClassificationMappingInner. - */ - public static StorageClassificationMappingInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageClassificationMappingInner deserializedStorageClassificationMappingInner - = new StorageClassificationMappingInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedStorageClassificationMappingInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedStorageClassificationMappingInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedStorageClassificationMappingInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedStorageClassificationMappingInner.properties - = StorageClassificationMappingProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedStorageClassificationMappingInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageClassificationMappingInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/SupportedOperatingSystemsInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/SupportedOperatingSystemsInner.java deleted file mode 100644 index e36601ce58c8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/SupportedOperatingSystemsInner.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOSProperties; -import java.io.IOException; - -/** - * Supported operating systems. - */ -@Fluent -public final class SupportedOperatingSystemsInner extends ProxyResource { - /* - * The supported operating systems properties. - */ - private SupportedOSProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of SupportedOperatingSystemsInner class. - */ - public SupportedOperatingSystemsInner() { - } - - /** - * Get the properties property: The supported operating systems properties. - * - * @return the properties value. - */ - public SupportedOSProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The supported operating systems properties. - * - * @param properties the properties value to set. - * @return the SupportedOperatingSystemsInner object itself. - */ - public SupportedOperatingSystemsInner withProperties(SupportedOSProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the SupportedOperatingSystemsInner object itself. - */ - public SupportedOperatingSystemsInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SupportedOperatingSystemsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SupportedOperatingSystemsInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SupportedOperatingSystemsInner. - */ - public static SupportedOperatingSystemsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SupportedOperatingSystemsInner deserializedSupportedOperatingSystemsInner - = new SupportedOperatingSystemsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedSupportedOperatingSystemsInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedSupportedOperatingSystemsInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedSupportedOperatingSystemsInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedSupportedOperatingSystemsInner.properties = SupportedOSProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedSupportedOperatingSystemsInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSupportedOperatingSystemsInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/TargetComputeSizeInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/TargetComputeSizeInner.java deleted file mode 100644 index 94b3ba36348c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/TargetComputeSizeInner.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TargetComputeSizeProperties; -import java.io.IOException; - -/** - * Represents applicable recovery vm sizes. - */ -@Fluent -public final class TargetComputeSizeInner implements JsonSerializable { - /* - * The Id. - */ - private String id; - - /* - * The name. - */ - private String name; - - /* - * The Type of the object. - */ - private String type; - - /* - * The custom data. - */ - private TargetComputeSizeProperties properties; - - /** - * Creates an instance of TargetComputeSizeInner class. - */ - public TargetComputeSizeInner() { - } - - /** - * Get the id property: The Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The Id. - * - * @param id the id value to set. - * @return the TargetComputeSizeInner object itself. - */ - public TargetComputeSizeInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: The name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name. - * - * @param name the name value to set. - * @return the TargetComputeSizeInner object itself. - */ - public TargetComputeSizeInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The Type of the object. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: The Type of the object. - * - * @param type the type value to set. - * @return the TargetComputeSizeInner object itself. - */ - public TargetComputeSizeInner withType(String type) { - this.type = type; - return this; - } - - /** - * Get the properties property: The custom data. - * - * @return the properties value. - */ - public TargetComputeSizeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The custom data. - * - * @param properties the properties value to set. - * @return the TargetComputeSizeInner object itself. - */ - public TargetComputeSizeInner withProperties(TargetComputeSizeProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TargetComputeSizeInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TargetComputeSizeInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the TargetComputeSizeInner. - */ - public static TargetComputeSizeInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TargetComputeSizeInner deserializedTargetComputeSizeInner = new TargetComputeSizeInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedTargetComputeSizeInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedTargetComputeSizeInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedTargetComputeSizeInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedTargetComputeSizeInner.properties = TargetComputeSizeProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTargetComputeSizeInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/VCenterInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/VCenterInner.java deleted file mode 100644 index 658b50d5a224..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/VCenterInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VCenterProperties; -import java.io.IOException; - -/** - * vCenter definition. - */ -@Fluent -public final class VCenterInner extends ProxyResource { - /* - * VCenter related data. - */ - private VCenterProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of VCenterInner class. - */ - public VCenterInner() { - } - - /** - * Get the properties property: VCenter related data. - * - * @return the properties value. - */ - public VCenterProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the VCenterInner object itself. - */ - public VCenterInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VCenterInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VCenterInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VCenterInner. - */ - public static VCenterInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VCenterInner deserializedVCenterInner = new VCenterInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedVCenterInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedVCenterInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedVCenterInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedVCenterInner.properties = VCenterProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedVCenterInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVCenterInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/VaultHealthDetailsInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/VaultHealthDetailsInner.java deleted file mode 100644 index 8c9edecff201..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/VaultHealthDetailsInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultHealthProperties; -import java.io.IOException; - -/** - * Vault health details definition. - */ -@Fluent -public final class VaultHealthDetailsInner extends ProxyResource { - /* - * The vault health related data. - */ - private VaultHealthProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of VaultHealthDetailsInner class. - */ - public VaultHealthDetailsInner() { - } - - /** - * Get the properties property: The vault health related data. - * - * @return the properties value. - */ - public VaultHealthProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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 the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the VaultHealthDetailsInner object itself. - */ - public VaultHealthDetailsInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VaultHealthDetailsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VaultHealthDetailsInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VaultHealthDetailsInner. - */ - public static VaultHealthDetailsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VaultHealthDetailsInner deserializedVaultHealthDetailsInner = new VaultHealthDetailsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedVaultHealthDetailsInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedVaultHealthDetailsInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedVaultHealthDetailsInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedVaultHealthDetailsInner.properties = VaultHealthProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedVaultHealthDetailsInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVaultHealthDetailsInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/VaultSettingInner.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/VaultSettingInner.java deleted file mode 100644 index 502de59656c6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/VaultSettingInner.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingProperties; -import java.io.IOException; - -/** - * Vault setting. - */ -@Fluent -public final class VaultSettingInner extends ProxyResource { - /* - * The vault setting properties. - */ - private VaultSettingProperties properties; - - /* - * Resource Location - */ - private String location; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of VaultSettingInner class. - */ - public VaultSettingInner() { - } - - /** - * Get the properties property: The vault setting properties. - * - * @return the properties value. - */ - public VaultSettingProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The vault setting properties. - * - * @param properties the properties value to set. - * @return the VaultSettingInner object itself. - */ - public VaultSettingInner withProperties(VaultSettingProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the location property: Resource Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Resource Location. - * - * @param location the location value to set. - * @return the VaultSettingInner object itself. - */ - public VaultSettingInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VaultSettingInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VaultSettingInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VaultSettingInner. - */ - public static VaultSettingInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VaultSettingInner deserializedVaultSettingInner = new VaultSettingInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedVaultSettingInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedVaultSettingInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedVaultSettingInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedVaultSettingInner.properties = VaultSettingProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedVaultSettingInner.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVaultSettingInner; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/package-info.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/package-info.java deleted file mode 100644 index b20a9e34f328..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the inner data models for SiteRecoveryManagementClient. - * null. - */ -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/package-info.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/package-info.java deleted file mode 100644 index 782cb33b1912..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/fluent/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the service clients for SiteRecoveryManagementClient. - * null. - */ -package com.azure.resourcemanager.recoveryservicessiterecovery.fluent; diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/AlertImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/AlertImpl.java deleted file mode 100644 index 8d3e4fb255b9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/AlertImpl.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.AlertInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Alert; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AlertProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigureAlertRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigureAlertRequestProperties; - -public final class AlertImpl implements Alert, Alert.Definition { - private AlertInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - AlertImpl(AlertInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public AlertProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public AlertInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String alertSettingName; - - private ConfigureAlertRequest createRequest; - - public AlertImpl withExistingVault(String resourceName, String resourceGroupName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - return this; - } - - public Alert create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationAlertSettings() - .createWithResponse(resourceName, resourceGroupName, alertSettingName, createRequest, Context.NONE) - .getValue(); - return this; - } - - public Alert create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationAlertSettings() - .createWithResponse(resourceName, resourceGroupName, alertSettingName, createRequest, context) - .getValue(); - return this; - } - - AlertImpl(String name, com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new AlertInner(); - this.serviceManager = serviceManager; - this.alertSettingName = name; - this.createRequest = new ConfigureAlertRequest(); - } - - public Alert refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplicationAlertSettings() - .getWithResponse(resourceName, resourceGroupName, alertSettingName, Context.NONE) - .getValue(); - return this; - } - - public Alert refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationAlertSettings() - .getWithResponse(resourceName, resourceGroupName, alertSettingName, context) - .getValue(); - return this; - } - - public AlertImpl withProperties(ConfigureAlertRequestProperties properties) { - this.createRequest.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/EventImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/EventImpl.java deleted file mode 100644 index 34e231eafdf6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/EventImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.EventInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Event; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EventProperties; - -public final class EventImpl implements Event { - private EventInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - EventImpl(EventInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EventProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public EventInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/FabricImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/FabricImpl.java deleted file mode 100644 index 3879ff9e14b1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/FabricImpl.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.FabricInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Fabric; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricCreationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricCreationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverProcessServerRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RenewCertificateInput; - -public final class FabricImpl implements Fabric, Fabric.Definition { - private FabricInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - FabricImpl(FabricInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public FabricProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public FabricInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String fabricName; - - private FabricCreationInput createInput; - - public FabricImpl withExistingVault(String resourceName, String resourceGroupName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - return this; - } - - public Fabric create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationFabrics() - .create(resourceName, resourceGroupName, fabricName, createInput, Context.NONE); - return this; - } - - public Fabric create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationFabrics() - .create(resourceName, resourceGroupName, fabricName, createInput, context); - return this; - } - - FabricImpl(String name, com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new FabricInner(); - this.serviceManager = serviceManager; - this.fabricName = name; - this.createInput = new FabricCreationInput(); - } - - public Fabric refresh() { - String localFilter = null; - this.innerObject = serviceManager.serviceClient() - .getReplicationFabrics() - .getWithResponse(resourceName, resourceGroupName, fabricName, localFilter, Context.NONE) - .getValue(); - return this; - } - - public Fabric refresh(Context context) { - String localFilter = null; - this.innerObject = serviceManager.serviceClient() - .getReplicationFabrics() - .getWithResponse(resourceName, resourceGroupName, fabricName, localFilter, context) - .getValue(); - return this; - } - - public Fabric checkConsistency() { - return serviceManager.replicationFabrics().checkConsistency(resourceName, resourceGroupName, fabricName); - } - - public Fabric checkConsistency(Context context) { - return serviceManager.replicationFabrics() - .checkConsistency(resourceName, resourceGroupName, fabricName, context); - } - - public void migrateToAad() { - serviceManager.replicationFabrics().migrateToAad(resourceName, resourceGroupName, fabricName); - } - - public void migrateToAad(Context context) { - serviceManager.replicationFabrics().migrateToAad(resourceName, resourceGroupName, fabricName, context); - } - - public Fabric reassociateGateway(FailoverProcessServerRequest failoverProcessServerRequest) { - return serviceManager.replicationFabrics() - .reassociateGateway(resourceName, resourceGroupName, fabricName, failoverProcessServerRequest); - } - - public Fabric reassociateGateway(FailoverProcessServerRequest failoverProcessServerRequest, Context context) { - return serviceManager.replicationFabrics() - .reassociateGateway(resourceName, resourceGroupName, fabricName, failoverProcessServerRequest, context); - } - - public void delete() { - serviceManager.replicationFabrics().delete(resourceName, resourceGroupName, fabricName); - } - - public void delete(Context context) { - serviceManager.replicationFabrics().delete(resourceName, resourceGroupName, fabricName, context); - } - - public Fabric renewCertificate(RenewCertificateInput renewCertificate) { - return serviceManager.replicationFabrics() - .renewCertificate(resourceName, resourceGroupName, fabricName, renewCertificate); - } - - public Fabric renewCertificate(RenewCertificateInput renewCertificate, Context context) { - return serviceManager.replicationFabrics() - .renewCertificate(resourceName, resourceGroupName, fabricName, renewCertificate, context); - } - - public void removeInfra() { - serviceManager.replicationFabrics().removeInfra(resourceGroupName, resourceName, fabricName); - } - - public void removeInfra(Context context) { - serviceManager.replicationFabrics().removeInfra(resourceGroupName, resourceName, fabricName, context); - } - - public FabricImpl withProperties(FabricCreationInputProperties properties) { - this.createInput.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/JobImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/JobImpl.java deleted file mode 100644 index ddd246de903e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/JobImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.JobInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Job; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobProperties; - -public final class JobImpl implements Job { - private JobInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - JobImpl(JobInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public JobProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public JobInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/LogicalNetworkImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/LogicalNetworkImpl.java deleted file mode 100644 index 4db7598983c8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/LogicalNetworkImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.LogicalNetworkInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LogicalNetwork; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LogicalNetworkProperties; - -public final class LogicalNetworkImpl implements LogicalNetwork { - private LogicalNetworkInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - LogicalNetworkImpl(LogicalNetworkInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public LogicalNetworkProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public LogicalNetworkInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/MigrationItemImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/MigrationItemImpl.java deleted file mode 100644 index 168bd813b7e1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/MigrationItemImpl.java +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableMigrationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableMigrationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationItemProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PauseReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResyncInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMigrationItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMigrationItemInputProperties; - -public final class MigrationItemImpl implements MigrationItem, MigrationItem.Definition, MigrationItem.Update { - private MigrationItemInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public MigrationItemProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public MigrationItemInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String fabricName; - - private String protectionContainerName; - - private String migrationItemName; - - private EnableMigrationInput createInput; - - private UpdateMigrationItemInput updateInput; - - public MigrationItemImpl withExistingReplicationProtectionContainer(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - this.fabricName = fabricName; - this.protectionContainerName = protectionContainerName; - return this; - } - - public MigrationItem create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationMigrationItems() - .create(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - createInput, Context.NONE); - return this; - } - - public MigrationItem create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationMigrationItems() - .create(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - createInput, context); - return this; - } - - MigrationItemImpl(String name, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new MigrationItemInner(); - this.serviceManager = serviceManager; - this.migrationItemName = name; - this.createInput = new EnableMigrationInput(); - } - - public MigrationItemImpl update() { - this.updateInput = new UpdateMigrationItemInput(); - return this; - } - - public MigrationItem apply() { - this.innerObject = serviceManager.serviceClient() - .getReplicationMigrationItems() - .update(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - updateInput, Context.NONE); - return this; - } - - public MigrationItem apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationMigrationItems() - .update(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - updateInput, context); - return this; - } - - MigrationItemImpl(MigrationItemInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "vaults"); - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.fabricName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationFabrics"); - this.protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationProtectionContainers"); - this.migrationItemName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationMigrationItems"); - } - - public MigrationItem refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplicationMigrationItems() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - Context.NONE) - .getValue(); - return this; - } - - public MigrationItem refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationMigrationItems() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - context) - .getValue(); - return this; - } - - public MigrationItem migrate(MigrateInput migrateInput) { - return serviceManager.replicationMigrationItems() - .migrate(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - migrateInput); - } - - public MigrationItem migrate(MigrateInput migrateInput, Context context) { - return serviceManager.replicationMigrationItems() - .migrate(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - migrateInput, context); - } - - public MigrationItem pauseReplication(PauseReplicationInput pauseReplicationInput) { - return serviceManager.replicationMigrationItems() - .pauseReplication(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - pauseReplicationInput); - } - - public MigrationItem pauseReplication(PauseReplicationInput pauseReplicationInput, Context context) { - return serviceManager.replicationMigrationItems() - .pauseReplication(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - pauseReplicationInput, context); - } - - public MigrationItem resumeReplication(ResumeReplicationInput resumeReplicationInput) { - return serviceManager.replicationMigrationItems() - .resumeReplication(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - resumeReplicationInput); - } - - public MigrationItem resumeReplication(ResumeReplicationInput resumeReplicationInput, Context context) { - return serviceManager.replicationMigrationItems() - .resumeReplication(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - resumeReplicationInput, context); - } - - public MigrationItem resync(ResyncInput input) { - return serviceManager.replicationMigrationItems() - .resync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, input); - } - - public MigrationItem resync(ResyncInput input, Context context) { - return serviceManager.replicationMigrationItems() - .resync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, input, - context); - } - - public MigrationItem testMigrate(TestMigrateInput testMigrateInput) { - return serviceManager.replicationMigrationItems() - .testMigrate(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - testMigrateInput); - } - - public MigrationItem testMigrate(TestMigrateInput testMigrateInput, Context context) { - return serviceManager.replicationMigrationItems() - .testMigrate(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - testMigrateInput, context); - } - - public MigrationItem testMigrateCleanup(TestMigrateCleanupInput testMigrateCleanupInput) { - return serviceManager.replicationMigrationItems() - .testMigrateCleanup(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - testMigrateCleanupInput); - } - - public MigrationItem testMigrateCleanup(TestMigrateCleanupInput testMigrateCleanupInput, Context context) { - return serviceManager.replicationMigrationItems() - .testMigrateCleanup(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - testMigrateCleanupInput, context); - } - - public MigrationItemImpl withProperties(EnableMigrationInputProperties properties) { - this.createInput.withProperties(properties); - return this; - } - - public MigrationItemImpl withProperties(UpdateMigrationItemInputProperties properties) { - this.updateInput.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/MigrationRecoveryPointImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/MigrationRecoveryPointImpl.java deleted file mode 100644 index 701df90f440c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/MigrationRecoveryPointImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationRecoveryPointInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPoint; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPointProperties; - -public final class MigrationRecoveryPointImpl implements MigrationRecoveryPoint { - private MigrationRecoveryPointInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - MigrationRecoveryPointImpl(MigrationRecoveryPointInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public MigrationRecoveryPointProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public MigrationRecoveryPointInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/MigrationRecoveryPointsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/MigrationRecoveryPointsClientImpl.java deleted file mode 100644 index 3147f243ceae..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/MigrationRecoveryPointsClientImpl.java +++ /dev/null @@ -1,531 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.MigrationRecoveryPointsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationRecoveryPointInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPointCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in MigrationRecoveryPointsClient. - */ -public final class MigrationRecoveryPointsClientImpl implements MigrationRecoveryPointsClient { - /** - * The proxy service used to perform REST calls. - */ - private final MigrationRecoveryPointsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of MigrationRecoveryPointsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - MigrationRecoveryPointsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(MigrationRecoveryPointsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientMigrationRecoveryPoints to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface MigrationRecoveryPointsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrationRecoveryPoints") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationMigrationItems( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("resourceName") String resourceName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("migrationItemName") String migrationItemName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrationRecoveryPoints/{migrationRecoveryPointName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("migrationItemName") String migrationItemName, - @PathParam("migrationRecoveryPointName") String migrationRecoveryPointName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationMigrationItemsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the recovery points for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the recovery points for a migration item along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationMigrationItemsSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationMigrationItems(this.client.getEndpoint(), - this.client.getApiVersion(), resourceName, resourceGroupName, this.client.getSubscriptionId(), - fabricName, protectionContainerName, migrationItemName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the recovery points for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the recovery points for a migration item along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationMigrationItemsSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationMigrationItems(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - migrationItemName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the recovery points for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the recovery points for a migration item as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationMigrationItemsAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName) { - return new PagedFlux<>( - () -> listByReplicationMigrationItemsSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName), - nextLink -> listByReplicationMigrationItemsNextSinglePageAsync(nextLink)); - } - - /** - * Gets the recovery points for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the recovery points for a migration item as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationMigrationItemsAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - Context context) { - return new PagedFlux<>( - () -> listByReplicationMigrationItemsSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, context), - nextLink -> listByReplicationMigrationItemsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the recovery points for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the recovery points for a migration item as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationMigrationItems(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName) { - return new PagedIterable<>(listByReplicationMigrationItemsAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName)); - } - - /** - * Gets the recovery points for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the recovery points for a migration item as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationMigrationItems(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - Context context) { - return new PagedIterable<>(listByReplicationMigrationItemsAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, context)); - } - - /** - * Gets a recovery point for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrationRecoveryPointName The migration recovery point name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recovery point for a migration item along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - String migrationRecoveryPointName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (migrationRecoveryPointName == null) { - return Mono.error( - new IllegalArgumentException("Parameter migrationRecoveryPointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - migrationItemName, migrationRecoveryPointName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a recovery point for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrationRecoveryPointName The migration recovery point name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recovery point for a migration item along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - String migrationRecoveryPointName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (migrationRecoveryPointName == null) { - return Mono.error( - new IllegalArgumentException("Parameter migrationRecoveryPointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, migrationItemName, - migrationRecoveryPointName, accept, context); - } - - /** - * Gets a recovery point for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrationRecoveryPointName The migration recovery point name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recovery point for a migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, String migrationRecoveryPointName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, migrationRecoveryPointName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a recovery point for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrationRecoveryPointName The migration recovery point name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recovery point for a migration item along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, String migrationRecoveryPointName, - Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, migrationRecoveryPointName, context).block(); - } - - /** - * Gets a recovery point for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrationRecoveryPointName The migration recovery point name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recovery point for a migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationRecoveryPointInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, String migrationRecoveryPointName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - migrationRecoveryPointName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of migration recovery points along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationMigrationItemsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationMigrationItemsNext(nextLink, this.client.getEndpoint(), - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of migration recovery points along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationMigrationItemsNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationMigrationItemsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/MigrationRecoveryPointsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/MigrationRecoveryPointsImpl.java deleted file mode 100644 index 3d19fdddff24..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/MigrationRecoveryPointsImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.MigrationRecoveryPointsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationRecoveryPointInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPoint; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPoints; - -public final class MigrationRecoveryPointsImpl implements MigrationRecoveryPoints { - private static final ClientLogger LOGGER = new ClientLogger(MigrationRecoveryPointsImpl.class); - - private final MigrationRecoveryPointsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public MigrationRecoveryPointsImpl(MigrationRecoveryPointsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationMigrationItems(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName) { - PagedIterable inner = this.serviceClient() - .listByReplicationMigrationItems(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationRecoveryPointImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationMigrationItems(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - Context context) { - PagedIterable inner = this.serviceClient() - .listByReplicationMigrationItems(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationRecoveryPointImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, String migrationRecoveryPointName, - Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - migrationRecoveryPointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new MigrationRecoveryPointImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public MigrationRecoveryPoint get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, String migrationRecoveryPointName) { - MigrationRecoveryPointInner inner = this.serviceClient() - .get(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - migrationRecoveryPointName); - if (inner != null) { - return new MigrationRecoveryPointImpl(inner, this.manager()); - } else { - return null; - } - } - - private MigrationRecoveryPointsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/NetworkImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/NetworkImpl.java deleted file mode 100644 index 44d709842233..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/NetworkImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Network; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkProperties; - -public final class NetworkImpl implements Network { - private NetworkInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - NetworkImpl(NetworkInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public NetworkProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public NetworkInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/NetworkMappingImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/NetworkMappingImpl.java deleted file mode 100644 index 46edf9564116..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/NetworkMappingImpl.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateNetworkMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateNetworkMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMapping; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMappingProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateNetworkMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateNetworkMappingInputProperties; - -public final class NetworkMappingImpl implements NetworkMapping, NetworkMapping.Definition, NetworkMapping.Update { - private NetworkMappingInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public NetworkMappingProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public NetworkMappingInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String fabricName; - - private String networkName; - - private String networkMappingName; - - private CreateNetworkMappingInput createInput; - - private UpdateNetworkMappingInput updateInput; - - public NetworkMappingImpl withExistingReplicationNetwork(String resourceName, String resourceGroupName, - String fabricName, String networkName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - this.fabricName = fabricName; - this.networkName = networkName; - return this; - } - - public NetworkMapping create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationNetworkMappings() - .create(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, createInput, - Context.NONE); - return this; - } - - public NetworkMapping create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationNetworkMappings() - .create(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, createInput, context); - return this; - } - - NetworkMappingImpl(String name, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new NetworkMappingInner(); - this.serviceManager = serviceManager; - this.networkMappingName = name; - this.createInput = new CreateNetworkMappingInput(); - } - - public NetworkMappingImpl update() { - this.updateInput = new UpdateNetworkMappingInput(); - return this; - } - - public NetworkMapping apply() { - this.innerObject = serviceManager.serviceClient() - .getReplicationNetworkMappings() - .update(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, updateInput, - Context.NONE); - return this; - } - - public NetworkMapping apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationNetworkMappings() - .update(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, updateInput, context); - return this; - } - - NetworkMappingImpl(NetworkMappingInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "vaults"); - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.fabricName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationFabrics"); - this.networkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationNetworks"); - this.networkMappingName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationNetworkMappings"); - } - - public NetworkMapping refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplicationNetworkMappings() - .getWithResponse(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, Context.NONE) - .getValue(); - return this; - } - - public NetworkMapping refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationNetworkMappings() - .getWithResponse(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, context) - .getValue(); - return this; - } - - public NetworkMappingImpl withProperties(CreateNetworkMappingInputProperties properties) { - this.createInput.withProperties(properties); - return this; - } - - public NetworkMappingImpl withProperties(UpdateNetworkMappingInputProperties properties) { - this.updateInput.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/OperationsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/OperationsClientImpl.java deleted file mode 100644 index 669971310aef..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.OperationsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.OperationsDiscoveryInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OperationsDiscoveryCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Returns the list of available operations. - * - * Operation to return the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns the list of available operations. - * - * Operation to return the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns the list of available operations. - * - * Operation to return the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Returns the list of available operations. - * - * Operation to return the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns the list of available operations. - * - * Operation to return the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Returns the list of available operations. - * - * Operation to return the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/OperationsDiscoveryImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/OperationsDiscoveryImpl.java deleted file mode 100644 index 1e45a4371974..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/OperationsDiscoveryImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.OperationsDiscoveryInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Display; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OperationsDiscovery; - -public final class OperationsDiscoveryImpl implements OperationsDiscovery { - private OperationsDiscoveryInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - OperationsDiscoveryImpl(OperationsDiscoveryInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Display display() { - return this.innerModel().display(); - } - - public String origin() { - return this.innerModel().origin(); - } - - public Object properties() { - return this.innerModel().properties(); - } - - public OperationsDiscoveryInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/OperationsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/OperationsImpl.java deleted file mode 100644 index 156068460a29..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/OperationsImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.OperationsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.OperationsDiscoveryInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Operations; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OperationsDiscovery; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationsDiscoveryImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationsDiscoveryImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/PolicyImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/PolicyImpl.java deleted file mode 100644 index 06a52eb8920b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/PolicyImpl.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.PolicyInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreatePolicyInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreatePolicyInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Policy; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdatePolicyInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdatePolicyInputProperties; - -public final class PolicyImpl implements Policy, Policy.Definition, Policy.Update { - private PolicyInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public PolicyProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public PolicyInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String policyName; - - private CreatePolicyInput createInput; - - private UpdatePolicyInput updateInput; - - public PolicyImpl withExistingVault(String resourceName, String resourceGroupName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - return this; - } - - public Policy create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationPolicies() - .create(resourceName, resourceGroupName, policyName, createInput, Context.NONE); - return this; - } - - public Policy create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationPolicies() - .create(resourceName, resourceGroupName, policyName, createInput, context); - return this; - } - - PolicyImpl(String name, com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new PolicyInner(); - this.serviceManager = serviceManager; - this.policyName = name; - this.createInput = new CreatePolicyInput(); - } - - public PolicyImpl update() { - this.updateInput = new UpdatePolicyInput(); - return this; - } - - public Policy apply() { - this.innerObject = serviceManager.serviceClient() - .getReplicationPolicies() - .update(resourceName, resourceGroupName, policyName, updateInput, Context.NONE); - return this; - } - - public Policy apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationPolicies() - .update(resourceName, resourceGroupName, policyName, updateInput, context); - return this; - } - - PolicyImpl(PolicyInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "vaults"); - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.policyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationPolicies"); - } - - public Policy refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplicationPolicies() - .getWithResponse(resourceName, resourceGroupName, policyName, Context.NONE) - .getValue(); - return this; - } - - public Policy refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationPolicies() - .getWithResponse(resourceName, resourceGroupName, policyName, context) - .getValue(); - return this; - } - - public PolicyImpl withProperties(CreatePolicyInputProperties properties) { - this.createInput.withProperties(properties); - return this; - } - - public PolicyImpl withProperties(UpdatePolicyInputProperties properties) { - this.updateInput.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ProtectableItemImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ProtectableItemImpl.java deleted file mode 100644 index f353bbe1ece1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ProtectableItemImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectableItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectableItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectableItemProperties; - -public final class ProtectableItemImpl implements ProtectableItem { - private ProtectableItemInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - ProtectableItemImpl(ProtectableItemInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ProtectableItemProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public ProtectableItemInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ProtectionContainerImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ProtectionContainerImpl.java deleted file mode 100644 index 709aadd81a53..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ProtectionContainerImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiscoverProtectableItemRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainer; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionInput; - -public final class ProtectionContainerImpl implements ProtectionContainer, ProtectionContainer.Definition { - private ProtectionContainerInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - ProtectionContainerImpl(ProtectionContainerInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ProtectionContainerProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public ProtectionContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String fabricName; - - private String protectionContainerName; - - private CreateProtectionContainerInput createCreationInput; - - public ProtectionContainerImpl withExistingReplicationFabric(String resourceName, String resourceGroupName, - String fabricName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - this.fabricName = fabricName; - return this; - } - - public ProtectionContainer create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionContainers() - .create(resourceName, resourceGroupName, fabricName, protectionContainerName, createCreationInput, - Context.NONE); - return this; - } - - public ProtectionContainer create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionContainers() - .create(resourceName, resourceGroupName, fabricName, protectionContainerName, createCreationInput, context); - return this; - } - - ProtectionContainerImpl(String name, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new ProtectionContainerInner(); - this.serviceManager = serviceManager; - this.protectionContainerName = name; - this.createCreationInput = new CreateProtectionContainerInput(); - } - - public ProtectionContainer refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionContainers() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, Context.NONE) - .getValue(); - return this; - } - - public ProtectionContainer refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionContainers() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, context) - .getValue(); - return this; - } - - public ProtectionContainer discoverProtectableItem(DiscoverProtectableItemRequest discoverProtectableItemRequest) { - return serviceManager.replicationProtectionContainers() - .discoverProtectableItem(resourceName, resourceGroupName, fabricName, protectionContainerName, - discoverProtectableItemRequest); - } - - public ProtectionContainer discoverProtectableItem(DiscoverProtectableItemRequest discoverProtectableItemRequest, - Context context) { - return serviceManager.replicationProtectionContainers() - .discoverProtectableItem(resourceName, resourceGroupName, fabricName, protectionContainerName, - discoverProtectableItemRequest, context); - } - - public void delete() { - serviceManager.replicationProtectionContainers() - .delete(resourceName, resourceGroupName, fabricName, protectionContainerName); - } - - public void delete(Context context) { - serviceManager.replicationProtectionContainers() - .delete(resourceName, resourceGroupName, fabricName, protectionContainerName, context); - } - - public ProtectionContainer switchProtection(SwitchProtectionInput switchInput) { - return serviceManager.replicationProtectionContainers() - .switchProtection(resourceName, resourceGroupName, fabricName, protectionContainerName, switchInput); - } - - public ProtectionContainer switchProtection(SwitchProtectionInput switchInput, Context context) { - return serviceManager.replicationProtectionContainers() - .switchProtection(resourceName, resourceGroupName, fabricName, protectionContainerName, switchInput, - context); - } - - public ProtectionContainerImpl withProperties(CreateProtectionContainerInputProperties properties) { - this.createCreationInput.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ProtectionContainerMappingImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ProtectionContainerMappingImpl.java deleted file mode 100644 index faa262d96282..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ProtectionContainerMappingImpl.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerMapping; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerMappingProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveProtectionContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateProtectionContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateProtectionContainerMappingInputProperties; - -public final class ProtectionContainerMappingImpl - implements ProtectionContainerMapping, ProtectionContainerMapping.Definition, ProtectionContainerMapping.Update { - private ProtectionContainerMappingInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ProtectionContainerMappingProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ProtectionContainerMappingInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String fabricName; - - private String protectionContainerName; - - private String mappingName; - - private CreateProtectionContainerMappingInput createCreationInput; - - private UpdateProtectionContainerMappingInput updateUpdateInput; - - public ProtectionContainerMappingImpl withExistingReplicationProtectionContainer(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - this.fabricName = fabricName; - this.protectionContainerName = protectionContainerName; - return this; - } - - public ProtectionContainerMapping create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionContainerMappings() - .create(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - createCreationInput, Context.NONE); - return this; - } - - public ProtectionContainerMapping create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionContainerMappings() - .create(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - createCreationInput, context); - return this; - } - - ProtectionContainerMappingImpl(String name, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new ProtectionContainerMappingInner(); - this.serviceManager = serviceManager; - this.mappingName = name; - this.createCreationInput = new CreateProtectionContainerMappingInput(); - } - - public ProtectionContainerMappingImpl update() { - this.updateUpdateInput = new UpdateProtectionContainerMappingInput(); - return this; - } - - public ProtectionContainerMapping apply() { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionContainerMappings() - .update(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - updateUpdateInput, Context.NONE); - return this; - } - - public ProtectionContainerMapping apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionContainerMappings() - .update(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - updateUpdateInput, context); - return this; - } - - ProtectionContainerMappingImpl(ProtectionContainerMappingInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "vaults"); - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.fabricName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationFabrics"); - this.protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationProtectionContainers"); - this.mappingName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationProtectionContainerMappings"); - } - - public ProtectionContainerMapping refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionContainerMappings() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - Context.NONE) - .getValue(); - return this; - } - - public ProtectionContainerMapping refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionContainerMappings() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, context) - .getValue(); - return this; - } - - public void delete(RemoveProtectionContainerMappingInput removalInput) { - serviceManager.replicationProtectionContainerMappings() - .delete(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, removalInput); - } - - public void delete(RemoveProtectionContainerMappingInput removalInput, Context context) { - serviceManager.replicationProtectionContainerMappings() - .delete(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, removalInput, - context); - } - - public ProtectionContainerMappingImpl withProperties(CreateProtectionContainerMappingInputProperties properties) { - this.createCreationInput.withProperties(properties); - return this; - } - - public ProtectionContainerMappingImpl withProperties(UpdateProtectionContainerMappingInputProperties properties) { - this.updateUpdateInput.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryPlanImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryPlanImpl.java deleted file mode 100644 index 3b48b9764e55..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryPlanImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPlanInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateRecoveryPlanInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateRecoveryPlanInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateRecoveryPlanInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateRecoveryPlanInputProperties; - -public final class RecoveryPlanImpl implements RecoveryPlan, RecoveryPlan.Definition, RecoveryPlan.Update { - private RecoveryPlanInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public RecoveryPlanProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public RecoveryPlanInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String recoveryPlanName; - - private CreateRecoveryPlanInput createInput; - - private UpdateRecoveryPlanInput updateInput; - - public RecoveryPlanImpl withExistingVault(String resourceName, String resourceGroupName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - return this; - } - - public RecoveryPlan create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationRecoveryPlans() - .create(resourceName, resourceGroupName, recoveryPlanName, createInput, Context.NONE); - return this; - } - - public RecoveryPlan create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationRecoveryPlans() - .create(resourceName, resourceGroupName, recoveryPlanName, createInput, context); - return this; - } - - RecoveryPlanImpl(String name, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new RecoveryPlanInner(); - this.serviceManager = serviceManager; - this.recoveryPlanName = name; - this.createInput = new CreateRecoveryPlanInput(); - } - - public RecoveryPlanImpl update() { - this.updateInput = new UpdateRecoveryPlanInput(); - return this; - } - - public RecoveryPlan apply() { - this.innerObject = serviceManager.serviceClient() - .getReplicationRecoveryPlans() - .update(resourceName, resourceGroupName, recoveryPlanName, updateInput, Context.NONE); - return this; - } - - public RecoveryPlan apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationRecoveryPlans() - .update(resourceName, resourceGroupName, recoveryPlanName, updateInput, context); - return this; - } - - RecoveryPlanImpl(RecoveryPlanInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "vaults"); - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.recoveryPlanName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationRecoveryPlans"); - } - - public RecoveryPlan refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplicationRecoveryPlans() - .getWithResponse(resourceName, resourceGroupName, recoveryPlanName, Context.NONE) - .getValue(); - return this; - } - - public RecoveryPlan refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationRecoveryPlans() - .getWithResponse(resourceName, resourceGroupName, recoveryPlanName, context) - .getValue(); - return this; - } - - public RecoveryPlan failoverCancel() { - return serviceManager.replicationRecoveryPlans() - .failoverCancel(resourceName, resourceGroupName, recoveryPlanName); - } - - public RecoveryPlan failoverCancel(Context context) { - return serviceManager.replicationRecoveryPlans() - .failoverCancel(resourceName, resourceGroupName, recoveryPlanName, context); - } - - public RecoveryPlan failoverCommit() { - return serviceManager.replicationRecoveryPlans() - .failoverCommit(resourceName, resourceGroupName, recoveryPlanName); - } - - public RecoveryPlan failoverCommit(Context context) { - return serviceManager.replicationRecoveryPlans() - .failoverCommit(resourceName, resourceGroupName, recoveryPlanName, context); - } - - public RecoveryPlan plannedFailover(RecoveryPlanPlannedFailoverInput input) { - return serviceManager.replicationRecoveryPlans() - .plannedFailover(resourceName, resourceGroupName, recoveryPlanName, input); - } - - public RecoveryPlan plannedFailover(RecoveryPlanPlannedFailoverInput input, Context context) { - return serviceManager.replicationRecoveryPlans() - .plannedFailover(resourceName, resourceGroupName, recoveryPlanName, input, context); - } - - public RecoveryPlan reprotect() { - return serviceManager.replicationRecoveryPlans().reprotect(resourceName, resourceGroupName, recoveryPlanName); - } - - public RecoveryPlan reprotect(Context context) { - return serviceManager.replicationRecoveryPlans() - .reprotect(resourceName, resourceGroupName, recoveryPlanName, context); - } - - public RecoveryPlan testFailover(RecoveryPlanTestFailoverInput input) { - return serviceManager.replicationRecoveryPlans() - .testFailover(resourceName, resourceGroupName, recoveryPlanName, input); - } - - public RecoveryPlan testFailover(RecoveryPlanTestFailoverInput input, Context context) { - return serviceManager.replicationRecoveryPlans() - .testFailover(resourceName, resourceGroupName, recoveryPlanName, input, context); - } - - public RecoveryPlan testFailoverCleanup(RecoveryPlanTestFailoverCleanupInput input) { - return serviceManager.replicationRecoveryPlans() - .testFailoverCleanup(resourceName, resourceGroupName, recoveryPlanName, input); - } - - public RecoveryPlan testFailoverCleanup(RecoveryPlanTestFailoverCleanupInput input, Context context) { - return serviceManager.replicationRecoveryPlans() - .testFailoverCleanup(resourceName, resourceGroupName, recoveryPlanName, input, context); - } - - public RecoveryPlan unplannedFailover(RecoveryPlanUnplannedFailoverInput input) { - return serviceManager.replicationRecoveryPlans() - .unplannedFailover(resourceName, resourceGroupName, recoveryPlanName, input); - } - - public RecoveryPlan unplannedFailover(RecoveryPlanUnplannedFailoverInput input, Context context) { - return serviceManager.replicationRecoveryPlans() - .unplannedFailover(resourceName, resourceGroupName, recoveryPlanName, input, context); - } - - public RecoveryPlanImpl withProperties(CreateRecoveryPlanInputProperties properties) { - this.createInput.withProperties(properties); - return this; - } - - public RecoveryPlanImpl withProperties(UpdateRecoveryPlanInputProperties properties) { - this.updateInput.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryPointImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryPointImpl.java deleted file mode 100644 index 6dc19e4323de..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryPointImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPointInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPoint; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPointProperties; - -public final class RecoveryPointImpl implements RecoveryPoint { - private RecoveryPointInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - RecoveryPointImpl(RecoveryPointInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public RecoveryPointProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public RecoveryPointInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryPointsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryPointsClientImpl.java deleted file mode 100644 index 9348fa9fd77f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryPointsClientImpl.java +++ /dev/null @@ -1,555 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.RecoveryPointsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPointInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPointCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in RecoveryPointsClient. - */ -public final class RecoveryPointsClientImpl implements RecoveryPointsClient { - /** - * The proxy service used to perform REST calls. - */ - private final RecoveryPointsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of RecoveryPointsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RecoveryPointsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service - = RestProxy.create(RecoveryPointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientRecoveryPoints to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface RecoveryPointsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationProtectedItems(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints/{recoveryPointName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @PathParam("recoveryPointName") String recoveryPointName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationProtectedItemsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of recovery points for a replication protected item. - * - * Lists the available recovery points for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of recovery point details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectedItemsSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationProtectedItems(this.client.getEndpoint(), - this.client.getApiVersion(), resourceName, resourceGroupName, this.client.getSubscriptionId(), - fabricName, protectionContainerName, replicatedProtectedItemName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of recovery points for a replication protected item. - * - * Lists the available recovery points for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of recovery point details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectedItemsSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationProtectedItems(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of recovery points for a replication protected item. - * - * Lists the available recovery points for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of recovery point details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectedItemsAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - return new PagedFlux<>( - () -> listByReplicationProtectedItemsSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName), - nextLink -> listByReplicationProtectedItemsNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of recovery points for a replication protected item. - * - * Lists the available recovery points for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of recovery point details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectedItemsAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - Context context) { - return new PagedFlux<>( - () -> listByReplicationProtectedItemsSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, context), - nextLink -> listByReplicationProtectedItemsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of recovery points for a replication protected item. - * - * Lists the available recovery points for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of recovery point details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationProtectedItems(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - return new PagedIterable<>(listByReplicationProtectedItemsAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName)); - } - - /** - * Gets the list of recovery points for a replication protected item. - * - * Lists the available recovery points for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of recovery point details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationProtectedItems(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - Context context) { - return new PagedIterable<>(listByReplicationProtectedItemsAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, context)); - } - - /** - * Gets a recovery point. - * - * Get the details of specified recovery point. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param recoveryPointName The recovery point name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of specified recovery point along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - String recoveryPointName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (recoveryPointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, recoveryPointName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a recovery point. - * - * Get the details of specified recovery point. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param recoveryPointName The recovery point name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of specified recovery point along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (recoveryPointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, - recoveryPointName, accept, context); - } - - /** - * Gets a recovery point. - * - * Get the details of specified recovery point. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param recoveryPointName The recovery point name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of specified recovery point on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, recoveryPointName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a recovery point. - * - * Get the details of specified recovery point. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param recoveryPointName The recovery point name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of specified recovery point along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName, - Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, recoveryPointName, context).block(); - } - - /** - * Gets a recovery point. - * - * Get the details of specified recovery point. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param recoveryPointName The recovery point name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of specified recovery point. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPointInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, recoveryPointName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of recovery point details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationProtectedItemsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationProtectedItemsNext(nextLink, this.client.getEndpoint(), - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of recovery point details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectedItemsNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationProtectedItemsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryPointsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryPointsImpl.java deleted file mode 100644 index eeb4806faaf1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryPointsImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.RecoveryPointsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPointInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPoint; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPoints; - -public final class RecoveryPointsImpl implements RecoveryPoints { - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPointsImpl.class); - - private final RecoveryPointsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public RecoveryPointsImpl(RecoveryPointsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationProtectedItems(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName) { - PagedIterable inner = this.serviceClient() - .listByReplicationProtectedItems(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoveryPointImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationProtectedItems(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context) { - PagedIterable inner = this.serviceClient() - .listByReplicationProtectedItems(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoveryPointImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, recoveryPointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RecoveryPointImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public RecoveryPoint get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName) { - RecoveryPointInner inner = this.serviceClient() - .get(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - recoveryPointName); - if (inner != null) { - return new RecoveryPointImpl(inner, this.manager()); - } else { - return null; - } - } - - private RecoveryPointsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryServicesProviderImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryServicesProviderImpl.java deleted file mode 100644 index 46ea832e460c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/RecoveryServicesProviderImpl.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryServicesProviderInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddRecoveryServicesProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddRecoveryServicesProviderInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryServicesProvider; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryServicesProviderProperties; - -public final class RecoveryServicesProviderImpl - implements RecoveryServicesProvider, RecoveryServicesProvider.Definition { - private RecoveryServicesProviderInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - RecoveryServicesProviderImpl(RecoveryServicesProviderInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public RecoveryServicesProviderProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public RecoveryServicesProviderInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String fabricName; - - private String providerName; - - private AddRecoveryServicesProviderInput createAddProviderInput; - - public RecoveryServicesProviderImpl withExistingReplicationFabric(String resourceName, String resourceGroupName, - String fabricName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - this.fabricName = fabricName; - return this; - } - - public RecoveryServicesProvider create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationRecoveryServicesProviders() - .create(resourceName, resourceGroupName, fabricName, providerName, createAddProviderInput, Context.NONE); - return this; - } - - public RecoveryServicesProvider create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationRecoveryServicesProviders() - .create(resourceName, resourceGroupName, fabricName, providerName, createAddProviderInput, context); - return this; - } - - RecoveryServicesProviderImpl(String name, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new RecoveryServicesProviderInner(); - this.serviceManager = serviceManager; - this.providerName = name; - this.createAddProviderInput = new AddRecoveryServicesProviderInput(); - } - - public RecoveryServicesProvider refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplicationRecoveryServicesProviders() - .getWithResponse(resourceName, resourceGroupName, fabricName, providerName, Context.NONE) - .getValue(); - return this; - } - - public RecoveryServicesProvider refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationRecoveryServicesProviders() - .getWithResponse(resourceName, resourceGroupName, fabricName, providerName, context) - .getValue(); - return this; - } - - public RecoveryServicesProvider refreshProvider() { - return serviceManager.replicationRecoveryServicesProviders() - .refreshProvider(resourceName, resourceGroupName, fabricName, providerName); - } - - public RecoveryServicesProvider refreshProvider(Context context) { - return serviceManager.replicationRecoveryServicesProviders() - .refreshProvider(resourceName, resourceGroupName, fabricName, providerName, context); - } - - public void delete() { - serviceManager.replicationRecoveryServicesProviders() - .delete(resourceName, resourceGroupName, fabricName, providerName); - } - - public void delete(Context context) { - serviceManager.replicationRecoveryServicesProviders() - .delete(resourceName, resourceGroupName, fabricName, providerName, context); - } - - public RecoveryServicesProviderImpl withProperties(AddRecoveryServicesProviderInputProperties properties) { - this.createAddProviderInput.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationAlertSettingsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationAlertSettingsClientImpl.java deleted file mode 100644 index 47a4561e5e50..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationAlertSettingsClientImpl.java +++ /dev/null @@ -1,614 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationAlertSettingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.AlertInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AlertCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigureAlertRequest; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationAlertSettingsClient. - */ -public final class ReplicationAlertSettingsClientImpl implements ReplicationAlertSettingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationAlertSettingsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationAlertSettingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationAlertSettingsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationAlertSettingsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationAlertSettings to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationAlertSettingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("alertSettingName") String alertSettingName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("alertSettingName") String alertSettingName, - @BodyParam("application/json") ConfigureAlertRequest request, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of configured email notification(alert) configurations. - * - * Gets the list of email notification(alert) configurations for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of email notification(alert) configurations for the vault along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of configured email notification(alert) configurations. - * - * Gets the list of email notification(alert) configurations for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of email notification(alert) configurations for the vault along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of configured email notification(alert) configurations. - * - * Gets the list of email notification(alert) configurations for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of email notification(alert) configurations for the vault as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of configured email notification(alert) configurations. - * - * Gets the list of email notification(alert) configurations for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of email notification(alert) configurations for the vault as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of configured email notification(alert) configurations. - * - * Gets the list of email notification(alert) configurations for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of email notification(alert) configurations for the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * Gets the list of configured email notification(alert) configurations. - * - * Gets the list of email notification(alert) configurations for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of email notification(alert) configurations for the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Gets an email notification(alert) configuration. - * - * Gets the details of the specified email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified email notification(alert) configuration along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String alertSettingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (alertSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter alertSettingName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), alertSettingName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an email notification(alert) configuration. - * - * Gets the details of the specified email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified email notification(alert) configuration along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String alertSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (alertSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter alertSettingName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), alertSettingName, accept, context); - } - - /** - * Gets an email notification(alert) configuration. - * - * Gets the details of the specified email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified email notification(alert) configuration on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String alertSettingName) { - return getWithResponseAsync(resourceName, resourceGroupName, alertSettingName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an email notification(alert) configuration. - * - * Gets the details of the specified email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified email notification(alert) configuration along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, String alertSettingName, - Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, alertSettingName, context).block(); - } - - /** - * Gets an email notification(alert) configuration. - * - * Gets the details of the specified email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified email notification(alert) configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AlertInner get(String resourceName, String resourceGroupName, String alertSettingName) { - return getWithResponse(resourceName, resourceGroupName, alertSettingName, Context.NONE).getValue(); - } - - /** - * Configures email notifications for this vault. - * - * Create or update an email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification(alert) configuration. - * @param request The input to configure the email notification(alert). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Alert class along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceName, String resourceGroupName, - String alertSettingName, ConfigureAlertRequest request) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (alertSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter alertSettingName is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), alertSettingName, request, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Configures email notifications for this vault. - * - * Create or update an email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification(alert) configuration. - * @param request The input to configure the email notification(alert). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Alert class along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceName, String resourceGroupName, - String alertSettingName, ConfigureAlertRequest request, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (alertSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter alertSettingName is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), alertSettingName, request, accept, context); - } - - /** - * Configures email notifications for this vault. - * - * Create or update an email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification(alert) configuration. - * @param request The input to configure the email notification(alert). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Alert class on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String alertSettingName, - ConfigureAlertRequest request) { - return createWithResponseAsync(resourceName, resourceGroupName, alertSettingName, request) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Configures email notifications for this vault. - * - * Create or update an email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification(alert) configuration. - * @param request The input to configure the email notification(alert). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Alert class along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String resourceName, String resourceGroupName, - String alertSettingName, ConfigureAlertRequest request, Context context) { - return createWithResponseAsync(resourceName, resourceGroupName, alertSettingName, request, context).block(); - } - - /** - * Configures email notifications for this vault. - * - * Create or update an email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification(alert) configuration. - * @param request The input to configure the email notification(alert). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Alert class. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AlertInner create(String resourceName, String resourceGroupName, String alertSettingName, - ConfigureAlertRequest request) { - return createWithResponse(resourceName, resourceGroupName, alertSettingName, request, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of alerts along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of alerts along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationAlertSettingsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationAlertSettingsImpl.java deleted file mode 100644 index dd2438391f3f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationAlertSettingsImpl.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationAlertSettingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.AlertInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Alert; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationAlertSettings; - -public final class ReplicationAlertSettingsImpl implements ReplicationAlertSettings { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationAlertSettingsImpl.class); - - private final ReplicationAlertSettingsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationAlertSettingsImpl(ReplicationAlertSettingsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AlertImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, String alertSettingName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, alertSettingName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new AlertImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Alert get(String resourceName, String resourceGroupName, String alertSettingName) { - AlertInner inner = this.serviceClient().get(resourceName, resourceGroupName, alertSettingName); - if (inner != null) { - return new AlertImpl(inner, this.manager()); - } else { - return null; - } - } - - public Alert getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String alertSettingName = ResourceManagerUtils.getValueFromIdByName(id, "replicationAlertSettings"); - if (alertSettingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationAlertSettings'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, alertSettingName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String alertSettingName = ResourceManagerUtils.getValueFromIdByName(id, "replicationAlertSettings"); - if (alertSettingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationAlertSettings'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, alertSettingName, context); - } - - private ReplicationAlertSettingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public AlertImpl define(String name) { - return new AlertImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationApplianceImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationApplianceImpl.java deleted file mode 100644 index 71ac14165e00..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationApplianceImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationApplianceInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationAppliance; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationApplianceProperties; - -public final class ReplicationApplianceImpl implements ReplicationAppliance { - private ReplicationApplianceInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - ReplicationApplianceImpl(ReplicationApplianceInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public ReplicationApplianceProperties properties() { - return this.innerModel().properties(); - } - - public ReplicationApplianceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationAppliancesClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationAppliancesClientImpl.java deleted file mode 100644 index 1bf0bbda9fef..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationAppliancesClientImpl.java +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationAppliancesClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationApplianceInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplianceCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationAppliancesClient. - */ -public final class ReplicationAppliancesClientImpl implements ReplicationAppliancesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationAppliancesService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationAppliancesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationAppliancesClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationAppliancesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationAppliances to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationAppliancesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAppliances") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of appliances. - * - * Gets the list of Azure Site Recovery appliances for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery appliances for the vault along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of appliances. - * - * Gets the list of Azure Site Recovery appliances for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery appliances for the vault along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of appliances. - * - * Gets the list of Azure Site Recovery appliances for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery appliances for the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, - String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of appliances. - * - * Gets the list of Azure Site Recovery appliances for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery appliances for the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of appliances. - * - * Gets the list of Azure Site Recovery appliances for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery appliances for the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, String filter, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of appliances. - * - * Gets the list of Azure Site Recovery appliances for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery appliances for the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - final String filter = null; - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, filter)); - } - - /** - * Gets the list of appliances. - * - * Gets the list of Azure Site Recovery appliances for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery appliances for the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, String filter, - Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, filter, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of appliance details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of appliance details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationAppliancesImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationAppliancesImpl.java deleted file mode 100644 index c14df35f3e60..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationAppliancesImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationAppliancesClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationApplianceInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationAppliance; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationAppliances; - -public final class ReplicationAppliancesImpl implements ReplicationAppliances { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationAppliancesImpl.class); - - private final ReplicationAppliancesClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationAppliancesImpl(ReplicationAppliancesClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicationApplianceImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, String filter, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceName, resourceGroupName, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicationApplianceImpl(inner1, this.manager())); - } - - private ReplicationAppliancesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsCollectionImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsCollectionImpl.java deleted file mode 100644 index e2bed45e6905..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsCollectionImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsCollectionInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationEligibilityResults; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationEligibilityResultsCollection; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class ReplicationEligibilityResultsCollectionImpl implements ReplicationEligibilityResultsCollection { - private ReplicationEligibilityResultsCollectionInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - ReplicationEligibilityResultsCollectionImpl(ReplicationEligibilityResultsCollectionInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new ReplicationEligibilityResultsImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public ReplicationEligibilityResultsCollectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsImpl.java deleted file mode 100644 index f50b38c0c28b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationEligibilityResults; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationEligibilityResultsProperties; - -public final class ReplicationEligibilityResultsImpl implements ReplicationEligibilityResults { - private ReplicationEligibilityResultsInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - ReplicationEligibilityResultsImpl(ReplicationEligibilityResultsInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String id() { - return this.innerModel().id(); - } - - public ReplicationEligibilityResultsProperties properties() { - return this.innerModel().properties(); - } - - public ReplicationEligibilityResultsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsOperationsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsOperationsClientImpl.java deleted file mode 100644 index 77f23d6e09ad..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsOperationsClientImpl.java +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationEligibilityResultsOperationsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsCollectionInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * ReplicationEligibilityResultsOperationsClient. - */ -public final class ReplicationEligibilityResultsOperationsClientImpl - implements ReplicationEligibilityResultsOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationEligibilityResultsOperationsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationEligibilityResultsOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationEligibilityResultsOperationsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationEligibilityResultsOperationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationEligibilityResultsOperations - * to be used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationEligibilityResultsOperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults/default") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("virtualMachineName") String virtualMachineName, @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results collection response model along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String virtualMachineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - resourceGroupName, this.client.getSubscriptionId(), virtualMachineName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results collection response model along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String virtualMachineName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, - this.client.getSubscriptionId(), virtualMachineName, accept, context); - } - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results collection response model on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, - String virtualMachineName) { - return listWithResponseAsync(resourceGroupName, virtualMachineName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results collection response model along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, - String virtualMachineName, Context context) { - return listWithResponseAsync(resourceGroupName, virtualMachineName, context).block(); - } - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results collection response model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationEligibilityResultsCollectionInner list(String resourceGroupName, String virtualMachineName) { - return listWithResponse(resourceGroupName, virtualMachineName, Context.NONE).getValue(); - } - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results response model along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String virtualMachineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - resourceGroupName, this.client.getSubscriptionId(), virtualMachineName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results response model along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String virtualMachineName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (virtualMachineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, - this.client.getSubscriptionId(), virtualMachineName, accept, context); - } - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results response model on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String virtualMachineName) { - return getWithResponseAsync(resourceGroupName, virtualMachineName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results response model along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String virtualMachineName, Context context) { - return getWithResponseAsync(resourceGroupName, virtualMachineName, context).block(); - } - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results response model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationEligibilityResultsInner get(String resourceGroupName, String virtualMachineName) { - return getWithResponse(resourceGroupName, virtualMachineName, Context.NONE).getValue(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsOperationsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsOperationsImpl.java deleted file mode 100644 index e2c4f0016e11..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsOperationsImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationEligibilityResultsOperationsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsCollectionInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationEligibilityResults; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationEligibilityResultsCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationEligibilityResultsOperations; - -public final class ReplicationEligibilityResultsOperationsImpl implements ReplicationEligibilityResultsOperations { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationEligibilityResultsOperationsImpl.class); - - private final ReplicationEligibilityResultsOperationsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationEligibilityResultsOperationsImpl(ReplicationEligibilityResultsOperationsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response listWithResponse(String resourceGroupName, - String virtualMachineName, Context context) { - Response inner - = this.serviceClient().listWithResponse(resourceGroupName, virtualMachineName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ReplicationEligibilityResultsCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ReplicationEligibilityResultsCollection list(String resourceGroupName, String virtualMachineName) { - ReplicationEligibilityResultsCollectionInner inner - = this.serviceClient().list(resourceGroupName, virtualMachineName); - if (inner != null) { - return new ReplicationEligibilityResultsCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String virtualMachineName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, virtualMachineName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ReplicationEligibilityResultsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ReplicationEligibilityResults get(String resourceGroupName, String virtualMachineName) { - ReplicationEligibilityResultsInner inner = this.serviceClient().get(resourceGroupName, virtualMachineName); - if (inner != null) { - return new ReplicationEligibilityResultsImpl(inner, this.manager()); - } else { - return null; - } - } - - private ReplicationEligibilityResultsOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEventsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEventsClientImpl.java deleted file mode 100644 index 4551ea41a1a4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEventsClientImpl.java +++ /dev/null @@ -1,462 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationEventsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.EventInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EventCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationEventsClient. - */ -public final class ReplicationEventsClientImpl implements ReplicationEventsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationEventsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationEventsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationEventsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service - = RestProxy.create(ReplicationEventsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationEvents to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationEventsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents/{eventName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("eventName") String eventName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of Azure Site Recovery events. - * - * Gets the list of Azure Site Recovery events for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery events for the vault along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of Azure Site Recovery events. - * - * Gets the list of Azure Site Recovery events for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery events for the vault along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of Azure Site Recovery events. - * - * Gets the list of Azure Site Recovery events for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery events for the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of Azure Site Recovery events. - * - * Gets the list of Azure Site Recovery events for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery events for the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of Azure Site Recovery events. - * - * Gets the list of Azure Site Recovery events for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery events for the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, String filter, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of Azure Site Recovery events. - * - * Gets the list of Azure Site Recovery events for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery events for the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - final String filter = null; - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, filter)); - } - - /** - * Gets the list of Azure Site Recovery events. - * - * Gets the list of Azure Site Recovery events for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery events for the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, String filter, - Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, filter, context)); - } - - /** - * Get the details of an Azure Site recovery event. - * - * The operation to get the details of an Azure Site recovery event. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param eventName The name of the Azure Site Recovery event. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Event class along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String eventName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (eventName == null) { - return Mono.error(new IllegalArgumentException("Parameter eventName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), eventName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the details of an Azure Site recovery event. - * - * The operation to get the details of an Azure Site recovery event. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param eventName The name of the Azure Site Recovery event. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Event class along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String eventName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (eventName == null) { - return Mono.error(new IllegalArgumentException("Parameter eventName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), eventName, accept, context); - } - - /** - * Get the details of an Azure Site recovery event. - * - * The operation to get the details of an Azure Site recovery event. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param eventName The name of the Azure Site Recovery event. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Event class on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String eventName) { - return getWithResponseAsync(resourceName, resourceGroupName, eventName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the details of an Azure Site recovery event. - * - * The operation to get the details of an Azure Site recovery event. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param eventName The name of the Azure Site Recovery event. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Event class along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, String eventName, - Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, eventName, context).block(); - } - - /** - * Get the details of an Azure Site recovery event. - * - * The operation to get the details of an Azure Site recovery event. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param eventName The name of the Azure Site Recovery event. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Event class. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventInner get(String resourceName, String resourceGroupName, String eventName) { - return getWithResponse(resourceName, resourceGroupName, eventName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of fabric details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of fabric details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEventsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEventsImpl.java deleted file mode 100644 index 654032f6470b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEventsImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationEventsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.EventInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Event; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationEvents; - -public final class ReplicationEventsImpl implements ReplicationEvents { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationEventsImpl.class); - - private final ReplicationEventsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationEventsImpl(ReplicationEventsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, String filter, Context context) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, String eventName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, eventName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EventImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Event get(String resourceName, String resourceGroupName, String eventName) { - EventInner inner = this.serviceClient().get(resourceName, resourceGroupName, eventName); - if (inner != null) { - return new EventImpl(inner, this.manager()); - } else { - return null; - } - } - - private ReplicationEventsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationFabricsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationFabricsClientImpl.java deleted file mode 100644 index 2e6ea2cfbba6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationFabricsClientImpl.java +++ /dev/null @@ -1,2538 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationFabricsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.FabricInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricCreationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverProcessServerRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RenewCertificateInput; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationFabricsClient. - */ -public final class ReplicationFabricsClientImpl implements ReplicationFabricsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationFabricsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationFabricsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationFabricsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationFabricsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationFabrics to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationFabricsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @BodyParam("application/json") FabricCreationInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> purge(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/checkConsistency") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> checkConsistency(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/migratetoaad") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> migrateToAad(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/reassociateGateway") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reassociateGateway(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @BodyParam("application/json") FailoverProcessServerRequest failoverProcessServerRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/remove") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/renewCertificate") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> renewCertificate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @BodyParam("application/json") RenewCertificateInput renewCertificate, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/removeInfra") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> removeInfra(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceName") String resourceName, - @PathParam("fabricName") String fabricName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of ASR fabrics. - * - * Gets a list of the Azure Site Recovery fabrics in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the Azure Site Recovery fabrics in the vault along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of ASR fabrics. - * - * Gets a list of the Azure Site Recovery fabrics in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the Azure Site Recovery fabrics in the vault along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of ASR fabrics. - * - * Gets a list of the Azure Site Recovery fabrics in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the Azure Site Recovery fabrics in the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of ASR fabrics. - * - * Gets a list of the Azure Site Recovery fabrics in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the Azure Site Recovery fabrics in the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of ASR fabrics. - * - * Gets a list of the Azure Site Recovery fabrics in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the Azure Site Recovery fabrics in the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * Gets the list of ASR fabrics. - * - * Gets a list of the Azure Site Recovery fabrics in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the Azure Site Recovery fabrics in the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Gets the details of an ASR fabric. - * - * Gets the details of an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param filter OData filter options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery fabric along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, filter, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the details of an ASR fabric. - * - * Gets the details of an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery fabric along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, filter, accept, context); - } - - /** - * Gets the details of an ASR fabric. - * - * Gets the details of an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery fabric on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String fabricName) { - final String filter = null; - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, filter) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the details of an ASR fabric. - * - * Gets the details of an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery fabric along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String filter, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, filter, context).block(); - } - - /** - * Gets the details of an ASR fabric. - * - * Gets the details of an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery fabric. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FabricInner get(String resourceName, String resourceGroupName, String fabricName) { - final String filter = null; - return getWithResponse(resourceName, resourceGroupName, fabricName, filter, Context.NONE).getValue(); - } - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, FabricCreationInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, FabricCreationInput input, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, input, accept, context); - } - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FabricInner> beginCreateAsync(String resourceName, - String resourceGroupName, String fabricName, FabricCreationInput input) { - Mono>> mono - = createWithResponseAsync(resourceName, resourceGroupName, fabricName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FabricInner.class, FabricInner.class, this.client.getContext()); - } - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FabricInner> beginCreateAsync(String resourceName, - String resourceGroupName, String fabricName, FabricCreationInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceName, resourceGroupName, fabricName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FabricInner.class, FabricInner.class, context); - } - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FabricInner> beginCreate(String resourceName, String resourceGroupName, - String fabricName, FabricCreationInput input) { - return this.beginCreateAsync(resourceName, resourceGroupName, fabricName, input).getSyncPoller(); - } - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FabricInner> beginCreate(String resourceName, String resourceGroupName, - String fabricName, FabricCreationInput input, Context context) { - return this.beginCreateAsync(resourceName, resourceGroupName, fabricName, input, context).getSyncPoller(); - } - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String fabricName, - FabricCreationInput input) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, input).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String fabricName, - FabricCreationInput input, Context context) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, input, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FabricInner create(String resourceName, String resourceGroupName, String fabricName, - FabricCreationInput input) { - return createAsync(resourceName, resourceGroupName, fabricName, input).block(); - } - - /** - * Creates an Azure Site Recovery fabric. - * - * The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the ASR fabric. - * @param input Fabric creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FabricInner create(String resourceName, String resourceGroupName, String fabricName, - FabricCreationInput input, Context context) { - return createAsync(resourceName, resourceGroupName, fabricName, input, context).block(); - } - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> purgeWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.purge(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> purgeWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.purge(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, context); - } - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPurgeAsync(String resourceName, String resourceGroupName, - String fabricName) { - Mono>> mono = purgeWithResponseAsync(resourceName, resourceGroupName, fabricName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPurgeAsync(String resourceName, String resourceGroupName, - String fabricName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = purgeWithResponseAsync(resourceName, resourceGroupName, fabricName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, - String fabricName) { - return this.beginPurgeAsync(resourceName, resourceGroupName, fabricName).getSyncPoller(); - } - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, - String fabricName, Context context) { - return this.beginPurgeAsync(resourceName, resourceGroupName, fabricName, context).getSyncPoller(); - } - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono purgeAsync(String resourceName, String resourceGroupName, String fabricName) { - return beginPurgeAsync(resourceName, resourceGroupName, fabricName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono purgeAsync(String resourceName, String resourceGroupName, String fabricName, Context context) { - return beginPurgeAsync(resourceName, resourceGroupName, fabricName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void purge(String resourceName, String resourceGroupName, String fabricName) { - purgeAsync(resourceName, resourceGroupName, fabricName).block(); - } - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void purge(String resourceName, String resourceGroupName, String fabricName, Context context) { - purgeAsync(resourceName, resourceGroupName, fabricName, context).block(); - } - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> checkConsistencyWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.checkConsistency(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> checkConsistencyWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.checkConsistency(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context); - } - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FabricInner> beginCheckConsistencyAsync(String resourceName, - String resourceGroupName, String fabricName) { - Mono>> mono - = checkConsistencyWithResponseAsync(resourceName, resourceGroupName, fabricName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FabricInner.class, FabricInner.class, this.client.getContext()); - } - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FabricInner> beginCheckConsistencyAsync(String resourceName, - String resourceGroupName, String fabricName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = checkConsistencyWithResponseAsync(resourceName, resourceGroupName, fabricName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FabricInner.class, FabricInner.class, context); - } - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FabricInner> beginCheckConsistency(String resourceName, - String resourceGroupName, String fabricName) { - return this.beginCheckConsistencyAsync(resourceName, resourceGroupName, fabricName).getSyncPoller(); - } - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FabricInner> beginCheckConsistency(String resourceName, - String resourceGroupName, String fabricName, Context context) { - return this.beginCheckConsistencyAsync(resourceName, resourceGroupName, fabricName, context).getSyncPoller(); - } - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkConsistencyAsync(String resourceName, String resourceGroupName, String fabricName) { - return beginCheckConsistencyAsync(resourceName, resourceGroupName, fabricName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkConsistencyAsync(String resourceName, String resourceGroupName, String fabricName, - Context context) { - return beginCheckConsistencyAsync(resourceName, resourceGroupName, fabricName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FabricInner checkConsistency(String resourceName, String resourceGroupName, String fabricName) { - return checkConsistencyAsync(resourceName, resourceGroupName, fabricName).block(); - } - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FabricInner checkConsistency(String resourceName, String resourceGroupName, String fabricName, - Context context) { - return checkConsistencyAsync(resourceName, resourceGroupName, fabricName, context).block(); - } - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> migrateToAadWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.migrateToAad(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> migrateToAadWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.migrateToAad(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, context); - } - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginMigrateToAadAsync(String resourceName, String resourceGroupName, - String fabricName) { - Mono>> mono - = migrateToAadWithResponseAsync(resourceName, resourceGroupName, fabricName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginMigrateToAadAsync(String resourceName, String resourceGroupName, - String fabricName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = migrateToAadWithResponseAsync(resourceName, resourceGroupName, fabricName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginMigrateToAad(String resourceName, String resourceGroupName, - String fabricName) { - return this.beginMigrateToAadAsync(resourceName, resourceGroupName, fabricName).getSyncPoller(); - } - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginMigrateToAad(String resourceName, String resourceGroupName, - String fabricName, Context context) { - return this.beginMigrateToAadAsync(resourceName, resourceGroupName, fabricName, context).getSyncPoller(); - } - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrateToAadAsync(String resourceName, String resourceGroupName, String fabricName) { - return beginMigrateToAadAsync(resourceName, resourceGroupName, fabricName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrateToAadAsync(String resourceName, String resourceGroupName, String fabricName, - Context context) { - return beginMigrateToAadAsync(resourceName, resourceGroupName, fabricName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void migrateToAad(String resourceName, String resourceGroupName, String fabricName) { - migrateToAadAsync(resourceName, resourceGroupName, fabricName).block(); - } - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void migrateToAad(String resourceName, String resourceGroupName, String fabricName, Context context) { - migrateToAadAsync(resourceName, resourceGroupName, fabricName, context).block(); - } - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reassociateGatewayWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, FailoverProcessServerRequest failoverProcessServerRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (failoverProcessServerRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter failoverProcessServerRequest is required and cannot be null.")); - } else { - failoverProcessServerRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.reassociateGateway(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, - failoverProcessServerRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reassociateGatewayWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, FailoverProcessServerRequest failoverProcessServerRequest, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (failoverProcessServerRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter failoverProcessServerRequest is required and cannot be null.")); - } else { - failoverProcessServerRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.reassociateGateway(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, failoverProcessServerRequest, accept, - context); - } - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FabricInner> beginReassociateGatewayAsync(String resourceName, - String resourceGroupName, String fabricName, FailoverProcessServerRequest failoverProcessServerRequest) { - Mono>> mono = reassociateGatewayWithResponseAsync(resourceName, resourceGroupName, - fabricName, failoverProcessServerRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FabricInner.class, FabricInner.class, this.client.getContext()); - } - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FabricInner> beginReassociateGatewayAsync(String resourceName, - String resourceGroupName, String fabricName, FailoverProcessServerRequest failoverProcessServerRequest, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = reassociateGatewayWithResponseAsync(resourceName, resourceGroupName, - fabricName, failoverProcessServerRequest, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FabricInner.class, FabricInner.class, context); - } - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FabricInner> beginReassociateGateway(String resourceName, - String resourceGroupName, String fabricName, FailoverProcessServerRequest failoverProcessServerRequest) { - return this - .beginReassociateGatewayAsync(resourceName, resourceGroupName, fabricName, failoverProcessServerRequest) - .getSyncPoller(); - } - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FabricInner> beginReassociateGateway(String resourceName, - String resourceGroupName, String fabricName, FailoverProcessServerRequest failoverProcessServerRequest, - Context context) { - return this - .beginReassociateGatewayAsync(resourceName, resourceGroupName, fabricName, failoverProcessServerRequest, - context) - .getSyncPoller(); - } - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reassociateGatewayAsync(String resourceName, String resourceGroupName, String fabricName, - FailoverProcessServerRequest failoverProcessServerRequest) { - return beginReassociateGatewayAsync(resourceName, resourceGroupName, fabricName, failoverProcessServerRequest) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reassociateGatewayAsync(String resourceName, String resourceGroupName, String fabricName, - FailoverProcessServerRequest failoverProcessServerRequest, Context context) { - return beginReassociateGatewayAsync(resourceName, resourceGroupName, fabricName, failoverProcessServerRequest, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FabricInner reassociateGateway(String resourceName, String resourceGroupName, String fabricName, - FailoverProcessServerRequest failoverProcessServerRequest) { - return reassociateGatewayAsync(resourceName, resourceGroupName, fabricName, failoverProcessServerRequest) - .block(); - } - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FabricInner reassociateGateway(String resourceName, String resourceGroupName, String fabricName, - FailoverProcessServerRequest failoverProcessServerRequest, Context context) { - return reassociateGatewayAsync(resourceName, resourceGroupName, fabricName, failoverProcessServerRequest, - context).block(); - } - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, context); - } - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName) { - Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName) { - return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName).getSyncPoller(); - } - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, Context context) { - return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName, context).getSyncPoller(); - } - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, Context context) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName) { - deleteAsync(resourceName, resourceGroupName, fabricName).block(); - } - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, Context context) { - deleteAsync(resourceName, resourceGroupName, fabricName, context).block(); - } - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> renewCertificateWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, RenewCertificateInput renewCertificate) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (renewCertificate == null) { - return Mono - .error(new IllegalArgumentException("Parameter renewCertificate is required and cannot be null.")); - } else { - renewCertificate.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.renewCertificate(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, renewCertificate, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> renewCertificateWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, RenewCertificateInput renewCertificate, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (renewCertificate == null) { - return Mono - .error(new IllegalArgumentException("Parameter renewCertificate is required and cannot be null.")); - } else { - renewCertificate.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.renewCertificate(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, renewCertificate, accept, context); - } - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FabricInner> beginRenewCertificateAsync(String resourceName, - String resourceGroupName, String fabricName, RenewCertificateInput renewCertificate) { - Mono>> mono - = renewCertificateWithResponseAsync(resourceName, resourceGroupName, fabricName, renewCertificate); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FabricInner.class, FabricInner.class, this.client.getContext()); - } - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FabricInner> beginRenewCertificateAsync(String resourceName, - String resourceGroupName, String fabricName, RenewCertificateInput renewCertificate, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = renewCertificateWithResponseAsync(resourceName, resourceGroupName, fabricName, renewCertificate, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FabricInner.class, FabricInner.class, context); - } - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FabricInner> beginRenewCertificate(String resourceName, - String resourceGroupName, String fabricName, RenewCertificateInput renewCertificate) { - return this.beginRenewCertificateAsync(resourceName, resourceGroupName, fabricName, renewCertificate) - .getSyncPoller(); - } - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of fabric definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FabricInner> beginRenewCertificate(String resourceName, - String resourceGroupName, String fabricName, RenewCertificateInput renewCertificate, Context context) { - return this.beginRenewCertificateAsync(resourceName, resourceGroupName, fabricName, renewCertificate, context) - .getSyncPoller(); - } - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono renewCertificateAsync(String resourceName, String resourceGroupName, String fabricName, - RenewCertificateInput renewCertificate) { - return beginRenewCertificateAsync(resourceName, resourceGroupName, fabricName, renewCertificate).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono renewCertificateAsync(String resourceName, String resourceGroupName, String fabricName, - RenewCertificateInput renewCertificate, Context context) { - return beginRenewCertificateAsync(resourceName, resourceGroupName, fabricName, renewCertificate, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FabricInner renewCertificate(String resourceName, String resourceGroupName, String fabricName, - RenewCertificateInput renewCertificate) { - return renewCertificateAsync(resourceName, resourceGroupName, fabricName, renewCertificate).block(); - } - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FabricInner renewCertificate(String resourceName, String resourceGroupName, String fabricName, - RenewCertificateInput renewCertificate, Context context) { - return renewCertificateAsync(resourceName, resourceGroupName, fabricName, renewCertificate, context).block(); - } - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> removeInfraWithResponseAsync(String resourceGroupName, String resourceName, - String fabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.removeInfra(this.client.getEndpoint(), this.client.getApiVersion(), - resourceGroupName, this.client.getSubscriptionId(), resourceName, fabricName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> removeInfraWithResponseAsync(String resourceGroupName, String resourceName, - String fabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.removeInfra(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, - this.client.getSubscriptionId(), resourceName, fabricName, accept, context); - } - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRemoveInfraAsync(String resourceGroupName, String resourceName, - String fabricName) { - Mono>> mono - = removeInfraWithResponseAsync(resourceGroupName, resourceName, fabricName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRemoveInfraAsync(String resourceGroupName, String resourceName, - String fabricName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = removeInfraWithResponseAsync(resourceGroupName, resourceName, fabricName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRemoveInfra(String resourceGroupName, String resourceName, - String fabricName) { - return this.beginRemoveInfraAsync(resourceGroupName, resourceName, fabricName).getSyncPoller(); - } - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRemoveInfra(String resourceGroupName, String resourceName, - String fabricName, Context context) { - return this.beginRemoveInfraAsync(resourceGroupName, resourceName, fabricName, context).getSyncPoller(); - } - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono removeInfraAsync(String resourceGroupName, String resourceName, String fabricName) { - return beginRemoveInfraAsync(resourceGroupName, resourceName, fabricName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono removeInfraAsync(String resourceGroupName, String resourceName, String fabricName, - Context context) { - return beginRemoveInfraAsync(resourceGroupName, resourceName, fabricName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void removeInfra(String resourceGroupName, String resourceName, String fabricName) { - removeInfraAsync(resourceGroupName, resourceName, fabricName).block(); - } - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void removeInfra(String resourceGroupName, String resourceName, String fabricName, Context context) { - removeInfraAsync(resourceGroupName, resourceName, fabricName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of fabric details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of fabric details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationFabricsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationFabricsImpl.java deleted file mode 100644 index 4da9cb19a867..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationFabricsImpl.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationFabricsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.FabricInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Fabric; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverProcessServerRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RenewCertificateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationFabrics; - -public final class ReplicationFabricsImpl implements ReplicationFabrics { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationFabricsImpl.class); - - private final ReplicationFabricsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationFabricsImpl(ReplicationFabricsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FabricImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FabricImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String filter, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, fabricName, filter, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FabricImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Fabric get(String resourceName, String resourceGroupName, String fabricName) { - FabricInner inner = this.serviceClient().get(resourceName, resourceGroupName, fabricName); - if (inner != null) { - return new FabricImpl(inner, this.manager()); - } else { - return null; - } - } - - public void purge(String resourceName, String resourceGroupName, String fabricName) { - this.serviceClient().purge(resourceName, resourceGroupName, fabricName); - } - - public void purge(String resourceName, String resourceGroupName, String fabricName, Context context) { - this.serviceClient().purge(resourceName, resourceGroupName, fabricName, context); - } - - public Fabric checkConsistency(String resourceName, String resourceGroupName, String fabricName) { - FabricInner inner = this.serviceClient().checkConsistency(resourceName, resourceGroupName, fabricName); - if (inner != null) { - return new FabricImpl(inner, this.manager()); - } else { - return null; - } - } - - public Fabric checkConsistency(String resourceName, String resourceGroupName, String fabricName, Context context) { - FabricInner inner = this.serviceClient().checkConsistency(resourceName, resourceGroupName, fabricName, context); - if (inner != null) { - return new FabricImpl(inner, this.manager()); - } else { - return null; - } - } - - public void migrateToAad(String resourceName, String resourceGroupName, String fabricName) { - this.serviceClient().migrateToAad(resourceName, resourceGroupName, fabricName); - } - - public void migrateToAad(String resourceName, String resourceGroupName, String fabricName, Context context) { - this.serviceClient().migrateToAad(resourceName, resourceGroupName, fabricName, context); - } - - public Fabric reassociateGateway(String resourceName, String resourceGroupName, String fabricName, - FailoverProcessServerRequest failoverProcessServerRequest) { - FabricInner inner = this.serviceClient() - .reassociateGateway(resourceName, resourceGroupName, fabricName, failoverProcessServerRequest); - if (inner != null) { - return new FabricImpl(inner, this.manager()); - } else { - return null; - } - } - - public Fabric reassociateGateway(String resourceName, String resourceGroupName, String fabricName, - FailoverProcessServerRequest failoverProcessServerRequest, Context context) { - FabricInner inner = this.serviceClient() - .reassociateGateway(resourceName, resourceGroupName, fabricName, failoverProcessServerRequest, context); - if (inner != null) { - return new FabricImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceName, String resourceGroupName, String fabricName) { - this.serviceClient().delete(resourceName, resourceGroupName, fabricName); - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, Context context) { - this.serviceClient().delete(resourceName, resourceGroupName, fabricName, context); - } - - public Fabric renewCertificate(String resourceName, String resourceGroupName, String fabricName, - RenewCertificateInput renewCertificate) { - FabricInner inner - = this.serviceClient().renewCertificate(resourceName, resourceGroupName, fabricName, renewCertificate); - if (inner != null) { - return new FabricImpl(inner, this.manager()); - } else { - return null; - } - } - - public Fabric renewCertificate(String resourceName, String resourceGroupName, String fabricName, - RenewCertificateInput renewCertificate, Context context) { - FabricInner inner = this.serviceClient() - .renewCertificate(resourceName, resourceGroupName, fabricName, renewCertificate, context); - if (inner != null) { - return new FabricImpl(inner, this.manager()); - } else { - return null; - } - } - - public void removeInfra(String resourceGroupName, String resourceName, String fabricName) { - this.serviceClient().removeInfra(resourceGroupName, resourceName, fabricName); - } - - public void removeInfra(String resourceGroupName, String resourceName, String fabricName, Context context) { - this.serviceClient().removeInfra(resourceGroupName, resourceName, fabricName, context); - } - - public Fabric getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String localFilter = null; - return this.getWithResponse(resourceName, resourceGroupName, fabricName, localFilter, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, String filter, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, fabricName, filter, context); - } - - private ReplicationFabricsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public FabricImpl define(String name) { - return new FabricImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationJobsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationJobsClientImpl.java deleted file mode 100644 index 3924370806ab..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationJobsClientImpl.java +++ /dev/null @@ -1,1520 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationJobsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.JobInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobQueryParameter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeJobParams; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationJobsClient. - */ -public final class ReplicationJobsClientImpl implements ReplicationJobsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationJobsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationJobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationJobsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service - = RestProxy.create(ReplicationJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationJobs to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationJobsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("resourceName") String resourceName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("jobName") String jobName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/cancel") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> cancel(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("jobName") String jobName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/restart") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("jobName") String jobName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/resume") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resume(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("jobName") String jobName, - @BodyParam("application/json") ResumeJobParams resumeJobParams, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/export") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> export(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") JobQueryParameter jobQueryParameter, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of jobs. - * - * Gets the list of Azure Site Recovery Jobs for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery Jobs for the vault along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of jobs. - * - * Gets the list of Azure Site Recovery Jobs for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery Jobs for the vault along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of jobs. - * - * Gets the list of Azure Site Recovery Jobs for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery Jobs for the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of jobs. - * - * Gets the list of Azure Site Recovery Jobs for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery Jobs for the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of jobs. - * - * Gets the list of Azure Site Recovery Jobs for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery Jobs for the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, String filter, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of jobs. - * - * Gets the list of Azure Site Recovery Jobs for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery Jobs for the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - final String filter = null; - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, filter)); - } - - /** - * Gets the list of jobs. - * - * Gets the list of Azure Site Recovery Jobs for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery Jobs for the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, String filter, Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, filter, context)); - } - - /** - * Gets the job details. - * - * Get the details of an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery job along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), jobName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the job details. - * - * Get the details of an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery job along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, String jobName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), jobName, accept, context); - } - - /** - * Gets the job details. - * - * Get the details of an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String jobName) { - return getWithResponseAsync(resourceName, resourceGroupName, jobName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the job details. - * - * Get the details of an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, String jobName, - Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, jobName, context).block(); - } - - /** - * Gets the job details. - * - * Get the details of an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner get(String resourceName, String resourceGroupName, String jobName) { - return getWithResponse(resourceName, resourceGroupName, jobName, Context.NONE).getValue(); - } - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelWithResponseAsync(String resourceName, String resourceGroupName, - String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), jobName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelWithResponseAsync(String resourceName, String resourceGroupName, - String jobName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), jobName, accept, context); - } - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginCancelAsync(String resourceName, String resourceGroupName, - String jobName) { - Mono>> mono = cancelWithResponseAsync(resourceName, resourceGroupName, jobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, this.client.getContext()); - } - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginCancelAsync(String resourceName, String resourceGroupName, - String jobName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = cancelWithResponseAsync(resourceName, resourceGroupName, jobName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, context); - } - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginCancel(String resourceName, String resourceGroupName, - String jobName) { - return this.beginCancelAsync(resourceName, resourceGroupName, jobName).getSyncPoller(); - } - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginCancel(String resourceName, String resourceGroupName, - String jobName, Context context) { - return this.beginCancelAsync(resourceName, resourceGroupName, jobName, context).getSyncPoller(); - } - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelAsync(String resourceName, String resourceGroupName, String jobName) { - return beginCancelAsync(resourceName, resourceGroupName, jobName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelAsync(String resourceName, String resourceGroupName, String jobName, Context context) { - return beginCancelAsync(resourceName, resourceGroupName, jobName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner cancel(String resourceName, String resourceGroupName, String jobName) { - return cancelAsync(resourceName, resourceGroupName, jobName).block(); - } - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner cancel(String resourceName, String resourceGroupName, String jobName, Context context) { - return cancelAsync(resourceName, resourceGroupName, jobName, context).block(); - } - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync(String resourceName, String resourceGroupName, - String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), jobName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync(String resourceName, String resourceGroupName, - String jobName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.restart(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), jobName, accept, context); - } - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginRestartAsync(String resourceName, String resourceGroupName, - String jobName) { - Mono>> mono = restartWithResponseAsync(resourceName, resourceGroupName, jobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, this.client.getContext()); - } - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginRestartAsync(String resourceName, String resourceGroupName, - String jobName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = restartWithResponseAsync(resourceName, resourceGroupName, jobName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, context); - } - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginRestart(String resourceName, String resourceGroupName, - String jobName) { - return this.beginRestartAsync(resourceName, resourceGroupName, jobName).getSyncPoller(); - } - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginRestart(String resourceName, String resourceGroupName, - String jobName, Context context) { - return this.beginRestartAsync(resourceName, resourceGroupName, jobName, context).getSyncPoller(); - } - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartAsync(String resourceName, String resourceGroupName, String jobName) { - return beginRestartAsync(resourceName, resourceGroupName, jobName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartAsync(String resourceName, String resourceGroupName, String jobName, - Context context) { - return beginRestartAsync(resourceName, resourceGroupName, jobName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner restart(String resourceName, String resourceGroupName, String jobName) { - return restartAsync(resourceName, resourceGroupName, jobName).block(); - } - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner restart(String resourceName, String resourceGroupName, String jobName, Context context) { - return restartAsync(resourceName, resourceGroupName, jobName, context).block(); - } - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeWithResponseAsync(String resourceName, String resourceGroupName, - String jobName, ResumeJobParams resumeJobParams) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (resumeJobParams == null) { - return Mono - .error(new IllegalArgumentException("Parameter resumeJobParams is required and cannot be null.")); - } else { - resumeJobParams.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.resume(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), jobName, resumeJobParams, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeWithResponseAsync(String resourceName, String resourceGroupName, - String jobName, ResumeJobParams resumeJobParams, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (resumeJobParams == null) { - return Mono - .error(new IllegalArgumentException("Parameter resumeJobParams is required and cannot be null.")); - } else { - resumeJobParams.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resume(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), jobName, resumeJobParams, accept, context); - } - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginResumeAsync(String resourceName, String resourceGroupName, - String jobName, ResumeJobParams resumeJobParams) { - Mono>> mono - = resumeWithResponseAsync(resourceName, resourceGroupName, jobName, resumeJobParams); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, this.client.getContext()); - } - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginResumeAsync(String resourceName, String resourceGroupName, - String jobName, ResumeJobParams resumeJobParams, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = resumeWithResponseAsync(resourceName, resourceGroupName, jobName, resumeJobParams, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, context); - } - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginResume(String resourceName, String resourceGroupName, - String jobName, ResumeJobParams resumeJobParams) { - return this.beginResumeAsync(resourceName, resourceGroupName, jobName, resumeJobParams).getSyncPoller(); - } - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginResume(String resourceName, String resourceGroupName, - String jobName, ResumeJobParams resumeJobParams, Context context) { - return this.beginResumeAsync(resourceName, resourceGroupName, jobName, resumeJobParams, context) - .getSyncPoller(); - } - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeAsync(String resourceName, String resourceGroupName, String jobName, - ResumeJobParams resumeJobParams) { - return beginResumeAsync(resourceName, resourceGroupName, jobName, resumeJobParams).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeAsync(String resourceName, String resourceGroupName, String jobName, - ResumeJobParams resumeJobParams, Context context) { - return beginResumeAsync(resourceName, resourceGroupName, jobName, resumeJobParams, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner resume(String resourceName, String resourceGroupName, String jobName, - ResumeJobParams resumeJobParams) { - return resumeAsync(resourceName, resourceGroupName, jobName, resumeJobParams).block(); - } - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner resume(String resourceName, String resourceGroupName, String jobName, - ResumeJobParams resumeJobParams, Context context) { - return resumeAsync(resourceName, resourceGroupName, jobName, resumeJobParams, context).block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> exportWithResponseAsync(String resourceName, String resourceGroupName, - JobQueryParameter jobQueryParameter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobQueryParameter == null) { - return Mono - .error(new IllegalArgumentException("Parameter jobQueryParameter is required and cannot be null.")); - } else { - jobQueryParameter.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.export(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), jobQueryParameter, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> exportWithResponseAsync(String resourceName, String resourceGroupName, - JobQueryParameter jobQueryParameter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobQueryParameter == null) { - return Mono - .error(new IllegalArgumentException("Parameter jobQueryParameter is required and cannot be null.")); - } else { - jobQueryParameter.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.export(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), jobQueryParameter, accept, context); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginExportAsync(String resourceName, String resourceGroupName, - JobQueryParameter jobQueryParameter) { - Mono>> mono - = exportWithResponseAsync(resourceName, resourceGroupName, jobQueryParameter); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, this.client.getContext()); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginExportAsync(String resourceName, String resourceGroupName, - JobQueryParameter jobQueryParameter, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = exportWithResponseAsync(resourceName, resourceGroupName, jobQueryParameter, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, context); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginExport(String resourceName, String resourceGroupName, - JobQueryParameter jobQueryParameter) { - return this.beginExportAsync(resourceName, resourceGroupName, jobQueryParameter).getSyncPoller(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginExport(String resourceName, String resourceGroupName, - JobQueryParameter jobQueryParameter, Context context) { - return this.beginExportAsync(resourceName, resourceGroupName, jobQueryParameter, context).getSyncPoller(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono exportAsync(String resourceName, String resourceGroupName, - JobQueryParameter jobQueryParameter) { - return beginExportAsync(resourceName, resourceGroupName, jobQueryParameter).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono exportAsync(String resourceName, String resourceGroupName, - JobQueryParameter jobQueryParameter, Context context) { - return beginExportAsync(resourceName, resourceGroupName, jobQueryParameter, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner export(String resourceName, String resourceGroupName, JobQueryParameter jobQueryParameter) { - return exportAsync(resourceName, resourceGroupName, jobQueryParameter).block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner export(String resourceName, String resourceGroupName, JobQueryParameter jobQueryParameter, - Context context) { - return exportAsync(resourceName, resourceGroupName, jobQueryParameter, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of jobs along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of jobs along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationJobsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationJobsImpl.java deleted file mode 100644 index eee6a728328c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationJobsImpl.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationJobsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.JobInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Job; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobQueryParameter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationJobs; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeJobParams; - -public final class ReplicationJobsImpl implements ReplicationJobs { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationJobsImpl.class); - - private final ReplicationJobsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationJobsImpl(ReplicationJobsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, String filter, Context context) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, String jobName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, jobName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new JobImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Job get(String resourceName, String resourceGroupName, String jobName) { - JobInner inner = this.serviceClient().get(resourceName, resourceGroupName, jobName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job cancel(String resourceName, String resourceGroupName, String jobName) { - JobInner inner = this.serviceClient().cancel(resourceName, resourceGroupName, jobName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job cancel(String resourceName, String resourceGroupName, String jobName, Context context) { - JobInner inner = this.serviceClient().cancel(resourceName, resourceGroupName, jobName, context); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job restart(String resourceName, String resourceGroupName, String jobName) { - JobInner inner = this.serviceClient().restart(resourceName, resourceGroupName, jobName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job restart(String resourceName, String resourceGroupName, String jobName, Context context) { - JobInner inner = this.serviceClient().restart(resourceName, resourceGroupName, jobName, context); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job resume(String resourceName, String resourceGroupName, String jobName, ResumeJobParams resumeJobParams) { - JobInner inner = this.serviceClient().resume(resourceName, resourceGroupName, jobName, resumeJobParams); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job resume(String resourceName, String resourceGroupName, String jobName, ResumeJobParams resumeJobParams, - Context context) { - JobInner inner - = this.serviceClient().resume(resourceName, resourceGroupName, jobName, resumeJobParams, context); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job export(String resourceName, String resourceGroupName, JobQueryParameter jobQueryParameter) { - JobInner inner = this.serviceClient().export(resourceName, resourceGroupName, jobQueryParameter); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job export(String resourceName, String resourceGroupName, JobQueryParameter jobQueryParameter, - Context context) { - JobInner inner = this.serviceClient().export(resourceName, resourceGroupName, jobQueryParameter, context); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - private ReplicationJobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationLogicalNetworksClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationLogicalNetworksClientImpl.java deleted file mode 100644 index e20b1e71d9a4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationLogicalNetworksClientImpl.java +++ /dev/null @@ -1,473 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationLogicalNetworksClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.LogicalNetworkInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LogicalNetworkCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationLogicalNetworksClient. - */ -public final class ReplicationLogicalNetworksClientImpl implements ReplicationLogicalNetworksClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationLogicalNetworksService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationLogicalNetworksClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationLogicalNetworksClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationLogicalNetworksService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationLogicalNetworks to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationLogicalNetworksService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationFabrics(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks/{logicalNetworkName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("logicalNetworkName") String logicalNetworkName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationFabricsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of logical networks under a fabric. - * - * Lists all the logical networks of the Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of logical networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of logical networks under a fabric. - * - * Lists all the logical networks of the Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of logical networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of logical networks under a fabric. - * - * Lists all the logical networks of the Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of logical networks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationFabricsAsync(String resourceName, String resourceGroupName, - String fabricName) { - return new PagedFlux<>( - () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName), - nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of logical networks under a fabric. - * - * Lists all the logical networks of the Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of logical networks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationFabricsAsync(String resourceName, String resourceGroupName, - String fabricName, Context context) { - return new PagedFlux<>( - () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName, context), - nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of logical networks under a fabric. - * - * Lists all the logical networks of the Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of logical networks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName) { - return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName)); - } - - /** - * Gets the list of logical networks under a fabric. - * - * Lists all the logical networks of the Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of logical networks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context) { - return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName, context)); - } - - /** - * Gets a logical network with specified server id and logical network name. - * - * Gets the details of a logical network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param logicalNetworkName Logical network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a logical network along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String logicalNetworkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (logicalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter logicalNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, logicalNetworkName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a logical network with specified server id and logical network name. - * - * Gets the details of a logical network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param logicalNetworkName Logical network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a logical network along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String logicalNetworkName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (logicalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter logicalNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, logicalNetworkName, accept, context); - } - - /** - * Gets a logical network with specified server id and logical network name. - * - * Gets the details of a logical network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param logicalNetworkName Logical network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a logical network on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String fabricName, - String logicalNetworkName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, logicalNetworkName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a logical network with specified server id and logical network name. - * - * Gets the details of a logical network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param logicalNetworkName Logical network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a logical network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String logicalNetworkName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, logicalNetworkName, context).block(); - } - - /** - * Gets a logical network with specified server id and logical network name. - * - * Gets the details of a logical network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param logicalNetworkName Logical network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a logical network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalNetworkInner get(String resourceName, String resourceGroupName, String fabricName, - String logicalNetworkName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, logicalNetworkName, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of logical networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of logical networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationLogicalNetworksImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationLogicalNetworksImpl.java deleted file mode 100644 index a9fd04594126..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationLogicalNetworksImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationLogicalNetworksClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.LogicalNetworkInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LogicalNetwork; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationLogicalNetworks; - -public final class ReplicationLogicalNetworksImpl implements ReplicationLogicalNetworks { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationLogicalNetworksImpl.class); - - private final ReplicationLogicalNetworksClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationLogicalNetworksImpl(ReplicationLogicalNetworksClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName) { - PagedIterable inner - = this.serviceClient().listByReplicationFabrics(resourceName, resourceGroupName, fabricName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LogicalNetworkImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context) { - PagedIterable inner - = this.serviceClient().listByReplicationFabrics(resourceName, resourceGroupName, fabricName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LogicalNetworkImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String logicalNetworkName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceName, resourceGroupName, fabricName, logicalNetworkName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LogicalNetworkImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public LogicalNetwork get(String resourceName, String resourceGroupName, String fabricName, - String logicalNetworkName) { - LogicalNetworkInner inner - = this.serviceClient().get(resourceName, resourceGroupName, fabricName, logicalNetworkName); - if (inner != null) { - return new LogicalNetworkImpl(inner, this.manager()); - } else { - return null; - } - } - - private ReplicationLogicalNetworksClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationMigrationItemsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationMigrationItemsClientImpl.java deleted file mode 100644 index 3c57bc5fe5ca..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationMigrationItemsClientImpl.java +++ /dev/null @@ -1,3853 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationMigrationItemsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableMigrationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationItemCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PauseReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResyncInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMigrationItemInput; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationMigrationItemsClient. - */ -public final class ReplicationMigrationItemsClientImpl implements ReplicationMigrationItemsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationMigrationItemsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationMigrationItemsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationMigrationItemsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationMigrationItemsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationMigrationItems to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationMigrationItemsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationProtectionContainers( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("resourceName") String resourceName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @QueryParam("skipToken") String skipToken, @QueryParam("takeToken") String takeToken, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("migrationItemName") String migrationItemName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("migrationItemName") String migrationItemName, - @BodyParam("application/json") EnableMigrationInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("migrationItemName") String migrationItemName, @QueryParam("deleteOption") String deleteOption, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("migrationItemName") String migrationItemName, - @BodyParam("application/json") UpdateMigrationItemInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrate") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> migrate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("migrationItemName") String migrationItemName, - @BodyParam("application/json") MigrateInput migrateInput, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/pauseReplication") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> pauseReplication(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("migrationItemName") String migrationItemName, - @BodyParam("application/json") PauseReplicationInput pauseReplicationInput, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/resumeReplication") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resumeReplication(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("migrationItemName") String migrationItemName, - @BodyParam("application/json") ResumeReplicationInput resumeReplicationInput, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/resync") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("migrationItemName") String migrationItemName, @BodyParam("application/json") ResyncInput input, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/testMigrate") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> testMigrate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("migrationItemName") String migrationItemName, - @BodyParam("application/json") TestMigrateInput testMigrateInput, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/testMigrateCleanup") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> testMigrateCleanup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("migrationItemName") String migrationItemName, - @BodyParam("application/json") TestMigrateCleanupInput testMigrateCleanupInput, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationMigrationItems") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("skipToken") String skipToken, - @QueryParam("takeToken") String takeToken, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationProtectionContainersNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of migration items in the protection container. - * - * Gets the list of ASR migration items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR migration items in the protection container along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectionContainersSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String skipToken, String takeToken, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationProtectionContainers(this.client.getEndpoint(), - this.client.getApiVersion(), resourceName, resourceGroupName, this.client.getSubscriptionId(), - fabricName, protectionContainerName, skipToken, takeToken, filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of migration items in the protection container. - * - * Gets the list of ASR migration items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR migration items in the protection container along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectionContainersSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String skipToken, String takeToken, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationProtectionContainers(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, skipToken, - takeToken, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of migration items in the protection container. - * - * Gets the list of ASR migration items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR migration items in the protection container as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectionContainersAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String skipToken, String takeToken, - String filter) { - return new PagedFlux<>( - () -> listByReplicationProtectionContainersSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, skipToken, takeToken, filter), - nextLink -> listByReplicationProtectionContainersNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of migration items in the protection container. - * - * Gets the list of ASR migration items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR migration items in the protection container as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectionContainersAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - final String skipToken = null; - final String takeToken = null; - final String filter = null; - return new PagedFlux<>( - () -> listByReplicationProtectionContainersSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, skipToken, takeToken, filter), - nextLink -> listByReplicationProtectionContainersNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of migration items in the protection container. - * - * Gets the list of ASR migration items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR migration items in the protection container as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectionContainersAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String skipToken, String takeToken, - String filter, Context context) { - return new PagedFlux<>( - () -> listByReplicationProtectionContainersSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, skipToken, takeToken, filter, context), - nextLink -> listByReplicationProtectionContainersNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of migration items in the protection container. - * - * Gets the list of ASR migration items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR migration items in the protection container as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - final String skipToken = null; - final String takeToken = null; - final String filter = null; - return new PagedIterable<>(listByReplicationProtectionContainersAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, skipToken, takeToken, filter)); - } - - /** - * Gets the list of migration items in the protection container. - * - * Gets the list of ASR migration items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR migration items in the protection container as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String skipToken, String takeToken, - String filter, Context context) { - return new PagedIterable<>(listByReplicationProtectionContainersAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, skipToken, takeToken, filter, context)); - } - - /** - * Gets the details of a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - migrationItemName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the details of a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, migrationItemName, accept, context); - } - - /** - * Gets the details of a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the details of a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a migration item along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, context).block(); - } - - /** - * Gets the details of a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - Context.NONE).getValue(); - } - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, EnableMigrationInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - migrationItemName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, EnableMigrationInput input, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, migrationItemName, input, accept, - context); - } - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginCreateAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - EnableMigrationInput input) { - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, this.client.getContext()); - } - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginCreateAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - EnableMigrationInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, context); - } - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginCreate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - EnableMigrationInput input) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input) - .getSyncPoller(); - } - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginCreate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - EnableMigrationInput input, Context context) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input, context) - .getSyncPoller(); - } - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, EnableMigrationInput input) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, EnableMigrationInput input, Context context) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, EnableMigrationInput input) { - return createAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input).block(); - } - - /** - * Enables migration. - * - * The operation to create an ASR migration item (enable migration). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Enable migration input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, EnableMigrationInput input, Context context) { - return createAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input, context).block(); - } - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param deleteOption The delete option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, String deleteOption) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - migrationItemName, deleteOption, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param deleteOption The delete option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, String deleteOption, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, migrationItemName, deleteOption, - context); - } - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param deleteOption The delete option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, String deleteOption) { - Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, deleteOption); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName) { - final String deleteOption = null; - Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, deleteOption); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param deleteOption The delete option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, String deleteOption, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, deleteOption, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName) { - final String deleteOption = null; - return this - .beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - deleteOption) - .getSyncPoller(); - } - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param deleteOption The delete option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, String deleteOption, - Context context) { - return this - .beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - deleteOption, context) - .getSyncPoller(); - } - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param deleteOption The delete option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, String deleteOption) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - deleteOption).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName) { - final String deleteOption = null; - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - deleteOption).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param deleteOption The delete option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, String deleteOption, Context context) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - deleteOption, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName) { - final String deleteOption = null; - deleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - deleteOption).block(); - } - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param deleteOption The delete option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName, String deleteOption, Context context) { - deleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - deleteOption, context).block(); - } - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, UpdateMigrationItemInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - migrationItemName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, UpdateMigrationItemInput input, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, migrationItemName, input, accept, - context); - } - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginUpdateAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - UpdateMigrationItemInput input) { - Mono>> mono = updateWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, this.client.getContext()); - } - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginUpdateAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - UpdateMigrationItemInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, context); - } - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginUpdate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - UpdateMigrationItemInput input) { - return this - .beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input) - .getSyncPoller(); - } - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginUpdate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - UpdateMigrationItemInput input, Context context) { - return this - .beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input, context) - .getSyncPoller(); - } - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, UpdateMigrationItemInput input) { - return beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, UpdateMigrationItemInput input, Context context) { - return beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner update(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, UpdateMigrationItemInput input) { - return updateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input).block(); - } - - /** - * Updates migration item. - * - * The operation to update the recovery settings of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Update migration item input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner update(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, UpdateMigrationItemInput input, Context context) { - return updateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input, context).block(); - } - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> migrateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, MigrateInput migrateInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (migrateInput == null) { - return Mono.error(new IllegalArgumentException("Parameter migrateInput is required and cannot be null.")); - } else { - migrateInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.migrate(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - migrationItemName, migrateInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> migrateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, MigrateInput migrateInput, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (migrateInput == null) { - return Mono.error(new IllegalArgumentException("Parameter migrateInput is required and cannot be null.")); - } else { - migrateInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.migrate(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, migrationItemName, migrateInput, - accept, context); - } - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginMigrateAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - MigrateInput migrateInput) { - Mono>> mono = migrateWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, migrateInput); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, this.client.getContext()); - } - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginMigrateAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - MigrateInput migrateInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = migrateWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, migrateInput, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, context); - } - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginMigrate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - MigrateInput migrateInput) { - return this - .beginMigrateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - migrateInput) - .getSyncPoller(); - } - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginMigrate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - MigrateInput migrateInput, Context context) { - return this - .beginMigrateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - migrateInput, context) - .getSyncPoller(); - } - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrateAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, MigrateInput migrateInput) { - return beginMigrateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, migrateInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrateAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, MigrateInput migrateInput, Context context) { - return beginMigrateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, migrateInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner migrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, MigrateInput migrateInput) { - return migrateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - migrateInput).block(); - } - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner migrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, MigrateInput migrateInput, Context context) { - return migrateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - migrateInput, context).block(); - } - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> pauseReplicationWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - PauseReplicationInput pauseReplicationInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (pauseReplicationInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter pauseReplicationInput is required and cannot be null.")); - } else { - pauseReplicationInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.pauseReplication(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - migrationItemName, pauseReplicationInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> pauseReplicationWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - PauseReplicationInput pauseReplicationInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (pauseReplicationInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter pauseReplicationInput is required and cannot be null.")); - } else { - pauseReplicationInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.pauseReplication(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, migrationItemName, - pauseReplicationInput, accept, context); - } - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginPauseReplicationAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName, PauseReplicationInput pauseReplicationInput) { - Mono>> mono = pauseReplicationWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, migrationItemName, pauseReplicationInput); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, this.client.getContext()); - } - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginPauseReplicationAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName, PauseReplicationInput pauseReplicationInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = pauseReplicationWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, migrationItemName, pauseReplicationInput, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, context); - } - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginPauseReplication(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - PauseReplicationInput pauseReplicationInput) { - return this - .beginPauseReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, pauseReplicationInput) - .getSyncPoller(); - } - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginPauseReplication(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - PauseReplicationInput pauseReplicationInput, Context context) { - return this - .beginPauseReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, pauseReplicationInput, context) - .getSyncPoller(); - } - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono pauseReplicationAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, - PauseReplicationInput pauseReplicationInput) { - return beginPauseReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, pauseReplicationInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono pauseReplicationAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, - PauseReplicationInput pauseReplicationInput, Context context) { - return beginPauseReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, pauseReplicationInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner pauseReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, PauseReplicationInput pauseReplicationInput) { - return pauseReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, pauseReplicationInput).block(); - } - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner pauseReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, PauseReplicationInput pauseReplicationInput, - Context context) { - return pauseReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, pauseReplicationInput, context).block(); - } - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeReplicationWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - ResumeReplicationInput resumeReplicationInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (resumeReplicationInput == null) { - return Mono.error( - new IllegalArgumentException("Parameter resumeReplicationInput is required and cannot be null.")); - } else { - resumeReplicationInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.resumeReplication(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - migrationItemName, resumeReplicationInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeReplicationWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - ResumeReplicationInput resumeReplicationInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (resumeReplicationInput == null) { - return Mono.error( - new IllegalArgumentException("Parameter resumeReplicationInput is required and cannot be null.")); - } else { - resumeReplicationInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resumeReplication(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, migrationItemName, - resumeReplicationInput, accept, context); - } - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginResumeReplicationAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName, ResumeReplicationInput resumeReplicationInput) { - Mono>> mono = resumeReplicationWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, migrationItemName, resumeReplicationInput); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, this.client.getContext()); - } - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginResumeReplicationAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName, ResumeReplicationInput resumeReplicationInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resumeReplicationWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, migrationItemName, resumeReplicationInput, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, context); - } - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginResumeReplication(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - ResumeReplicationInput resumeReplicationInput) { - return this - .beginResumeReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, resumeReplicationInput) - .getSyncPoller(); - } - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginResumeReplication(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - ResumeReplicationInput resumeReplicationInput, Context context) { - return this - .beginResumeReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, resumeReplicationInput, context) - .getSyncPoller(); - } - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeReplicationAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, - ResumeReplicationInput resumeReplicationInput) { - return beginResumeReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, resumeReplicationInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeReplicationAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, - ResumeReplicationInput resumeReplicationInput, Context context) { - return beginResumeReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, resumeReplicationInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner resumeReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResumeReplicationInput resumeReplicationInput) { - return resumeReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, resumeReplicationInput).block(); - } - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner resumeReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResumeReplicationInput resumeReplicationInput, - Context context) { - return resumeReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, resumeReplicationInput, context).block(); - } - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, ResyncInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.resync(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - migrationItemName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, ResyncInput input, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resync(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, migrationItemName, input, accept, - context); - } - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginResyncAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - ResyncInput input) { - Mono>> mono = resyncWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, this.client.getContext()); - } - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginResyncAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - ResyncInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resyncWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, migrationItemName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, context); - } - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginResync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - ResyncInput input) { - return this - .beginResyncAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input) - .getSyncPoller(); - } - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginResync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - ResyncInput input, Context context) { - return this - .beginResyncAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input, context) - .getSyncPoller(); - } - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResyncInput input) { - return beginResyncAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResyncInput input, Context context) { - return beginResyncAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner resync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResyncInput input) { - return resyncAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input).block(); - } - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner resync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResyncInput input, Context context) { - return resyncAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - input, context).block(); - } - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testMigrateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateInput testMigrateInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (testMigrateInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter testMigrateInput is required and cannot be null.")); - } else { - testMigrateInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.testMigrate(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - migrationItemName, testMigrateInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testMigrateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, TestMigrateInput testMigrateInput, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (testMigrateInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter testMigrateInput is required and cannot be null.")); - } else { - testMigrateInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.testMigrate(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, migrationItemName, - testMigrateInput, accept, context); - } - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginTestMigrateAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateInput testMigrateInput) { - Mono>> mono = testMigrateWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, migrationItemName, testMigrateInput); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, this.client.getContext()); - } - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginTestMigrateAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateInput testMigrateInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = testMigrateWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, migrationItemName, testMigrateInput, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, context); - } - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginTestMigrate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateInput testMigrateInput) { - return this - .beginTestMigrateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, testMigrateInput) - .getSyncPoller(); - } - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginTestMigrate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateInput testMigrateInput, Context context) { - return this - .beginTestMigrateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, testMigrateInput, context) - .getSyncPoller(); - } - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testMigrateAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateInput testMigrateInput) { - return beginTestMigrateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, testMigrateInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testMigrateAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateInput testMigrateInput, Context context) { - return beginTestMigrateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, testMigrateInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner testMigrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateInput testMigrateInput) { - return testMigrateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - testMigrateInput).block(); - } - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner testMigrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateInput testMigrateInput, Context context) { - return testMigrateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - testMigrateInput, context).block(); - } - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testMigrateCleanupWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateCleanupInput testMigrateCleanupInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (testMigrateCleanupInput == null) { - return Mono.error( - new IllegalArgumentException("Parameter testMigrateCleanupInput is required and cannot be null.")); - } else { - testMigrateCleanupInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.testMigrateCleanup(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - migrationItemName, testMigrateCleanupInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testMigrateCleanupWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateCleanupInput testMigrateCleanupInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (migrationItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter migrationItemName is required and cannot be null.")); - } - if (testMigrateCleanupInput == null) { - return Mono.error( - new IllegalArgumentException("Parameter testMigrateCleanupInput is required and cannot be null.")); - } else { - testMigrateCleanupInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.testMigrateCleanup(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, migrationItemName, - testMigrateCleanupInput, accept, context); - } - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginTestMigrateCleanupAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName, TestMigrateCleanupInput testMigrateCleanupInput) { - Mono>> mono = testMigrateCleanupWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, migrationItemName, testMigrateCleanupInput); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, this.client.getContext()); - } - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrationItemInner> beginTestMigrateCleanupAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName, TestMigrateCleanupInput testMigrateCleanupInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = testMigrateCleanupWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, migrationItemName, testMigrateCleanupInput, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - MigrationItemInner.class, MigrationItemInner.class, context); - } - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginTestMigrateCleanup(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateCleanupInput testMigrateCleanupInput) { - return this - .beginTestMigrateCleanupAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, testMigrateCleanupInput) - .getSyncPoller(); - } - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of migration item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrationItemInner> beginTestMigrateCleanup(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateCleanupInput testMigrateCleanupInput, Context context) { - return this - .beginTestMigrateCleanupAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, testMigrateCleanupInput, context) - .getSyncPoller(); - } - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testMigrateCleanupAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateCleanupInput testMigrateCleanupInput) { - return beginTestMigrateCleanupAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, testMigrateCleanupInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testMigrateCleanupAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, - TestMigrateCleanupInput testMigrateCleanupInput, Context context) { - return beginTestMigrateCleanupAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, testMigrateCleanupInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner testMigrateCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateCleanupInput testMigrateCleanupInput) { - return testMigrateCleanupAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, testMigrateCleanupInput).block(); - } - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationItemInner testMigrateCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateCleanupInput testMigrateCleanupInput, - Context context) { - return testMigrateCleanupAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, testMigrateCleanupInput, context).block(); - } - - /** - * Gets the list of migration items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of migration items in the vault along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - String skipToken, String takeToken, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), skipToken, takeToken, filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of migration items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of migration items in the vault along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - String skipToken, String takeToken, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), skipToken, takeToken, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of migration items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of migration items in the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, String skipToken, - String takeToken, String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, skipToken, takeToken, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of migration items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of migration items in the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - final String skipToken = null; - final String takeToken = null; - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, skipToken, takeToken, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of migration items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of migration items in the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, String skipToken, - String takeToken, String filter, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceName, resourceGroupName, skipToken, takeToken, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of migration items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of migration items in the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - final String skipToken = null; - final String takeToken = null; - final String filter = null; - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, skipToken, takeToken, filter)); - } - - /** - * Gets the list of migration items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of migration items in the vault as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, String skipToken, - String takeToken, String filter, Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, skipToken, takeToken, filter, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationProtectionContainersNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationProtectionContainersNext(nextLink, - this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationProtectionContainersNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationProtectionContainersNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationMigrationItemsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationMigrationItemsImpl.java deleted file mode 100644 index 995a9e7ff49a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationMigrationItemsImpl.java +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationMigrationItemsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PauseReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationMigrationItems; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResyncInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateInput; - -public final class ReplicationMigrationItemsImpl implements ReplicationMigrationItems { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationMigrationItemsImpl.class); - - private final ReplicationMigrationItemsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationMigrationItemsImpl(ReplicationMigrationItemsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - PagedIterable inner = this.serviceClient() - .listByReplicationProtectionContainers(resourceName, resourceGroupName, fabricName, - protectionContainerName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationItemImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String skipToken, String takeToken, - String filter, Context context) { - PagedIterable inner = this.serviceClient() - .listByReplicationProtectionContainers(resourceName, resourceGroupName, fabricName, protectionContainerName, - skipToken, takeToken, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationItemImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new MigrationItemImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public MigrationItem get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName) { - MigrationItemInner inner = this.serviceClient() - .get(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName) { - this.serviceClient() - .delete(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName); - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName, String deleteOption, Context context) { - this.serviceClient() - .delete(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - deleteOption, context); - } - - public MigrationItem migrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, MigrateInput migrateInput) { - MigrationItemInner inner = this.serviceClient() - .migrate(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - migrateInput); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public MigrationItem migrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, MigrateInput migrateInput, Context context) { - MigrationItemInner inner = this.serviceClient() - .migrate(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - migrateInput, context); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public MigrationItem pauseReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, PauseReplicationInput pauseReplicationInput) { - MigrationItemInner inner = this.serviceClient() - .pauseReplication(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - pauseReplicationInput); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public MigrationItem pauseReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, PauseReplicationInput pauseReplicationInput, - Context context) { - MigrationItemInner inner = this.serviceClient() - .pauseReplication(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - pauseReplicationInput, context); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public MigrationItem resumeReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResumeReplicationInput resumeReplicationInput) { - MigrationItemInner inner = this.serviceClient() - .resumeReplication(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - resumeReplicationInput); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public MigrationItem resumeReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResumeReplicationInput resumeReplicationInput, - Context context) { - MigrationItemInner inner = this.serviceClient() - .resumeReplication(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - resumeReplicationInput, context); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public MigrationItem resync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResyncInput input) { - MigrationItemInner inner = this.serviceClient() - .resync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, input); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public MigrationItem resync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResyncInput input, Context context) { - MigrationItemInner inner = this.serviceClient() - .resync(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, input, - context); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public MigrationItem testMigrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateInput testMigrateInput) { - MigrationItemInner inner = this.serviceClient() - .testMigrate(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - testMigrateInput); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public MigrationItem testMigrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateInput testMigrateInput, Context context) { - MigrationItemInner inner = this.serviceClient() - .testMigrate(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - testMigrateInput, context); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public MigrationItem testMigrateCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateCleanupInput testMigrateCleanupInput) { - MigrationItemInner inner = this.serviceClient() - .testMigrateCleanup(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - testMigrateCleanupInput); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public MigrationItem testMigrateCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateCleanupInput testMigrateCleanupInput, - Context context) { - MigrationItemInner inner = this.serviceClient() - .testMigrateCleanup(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - testMigrateCleanupInput, context); - if (inner != null) { - return new MigrationItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationItemImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, String skipToken, - String takeToken, String filter, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceName, resourceGroupName, skipToken, takeToken, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationItemImpl(inner1, this.manager())); - } - - public MigrationItem getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionContainers"); - if (protectionContainerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionContainers'.", id))); - } - String migrationItemName = ResourceManagerUtils.getValueFromIdByName(id, "replicationMigrationItems"); - if (migrationItemName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationMigrationItems'.", id))); - } - return this - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionContainers"); - if (protectionContainerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionContainers'.", id))); - } - String migrationItemName = ResourceManagerUtils.getValueFromIdByName(id, "replicationMigrationItems"); - if (migrationItemName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationMigrationItems'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, - migrationItemName, context); - } - - public void deleteById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionContainers"); - if (protectionContainerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionContainers'.", id))); - } - String migrationItemName = ResourceManagerUtils.getValueFromIdByName(id, "replicationMigrationItems"); - if (migrationItemName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationMigrationItems'.", id))); - } - String localDeleteOption = null; - this.delete(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - localDeleteOption, Context.NONE); - } - - public void deleteByIdWithResponse(String id, String deleteOption, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionContainers"); - if (protectionContainerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionContainers'.", id))); - } - String migrationItemName = ResourceManagerUtils.getValueFromIdByName(id, "replicationMigrationItems"); - if (migrationItemName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationMigrationItems'.", id))); - } - this.delete(resourceName, resourceGroupName, fabricName, protectionContainerName, migrationItemName, - deleteOption, context); - } - - private ReplicationMigrationItemsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public MigrationItemImpl define(String name) { - return new MigrationItemImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationNetworkMappingsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationNetworkMappingsClientImpl.java deleted file mode 100644 index 2c35f8f9903f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationNetworkMappingsClientImpl.java +++ /dev/null @@ -1,1677 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationNetworkMappingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateNetworkMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMappingCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateNetworkMappingInput; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationNetworkMappingsClient. - */ -public final class ReplicationNetworkMappingsClientImpl implements ReplicationNetworkMappingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationNetworkMappingsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationNetworkMappingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationNetworkMappingsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationNetworkMappingsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationNetworkMappings to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationNetworkMappingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationNetworks(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("networkName") String networkName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("networkName") String networkName, @PathParam("networkMappingName") String networkMappingName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("networkName") String networkName, @PathParam("networkMappingName") String networkMappingName, - @BodyParam("application/json") CreateNetworkMappingInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("networkName") String networkName, @PathParam("networkMappingName") String networkMappingName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("networkName") String networkName, @PathParam("networkMappingName") String networkMappingName, - @BodyParam("application/json") UpdateNetworkMappingInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworkMappings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationNetworksNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets all the network mappings under a network. - * - * Lists all ASR network mappings for the specified network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationNetworksSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName, String networkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (networkName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationNetworks(this.client.getEndpoint(), - this.client.getApiVersion(), resourceName, resourceGroupName, this.client.getSubscriptionId(), - fabricName, networkName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all the network mappings under a network. - * - * Lists all ASR network mappings for the specified network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationNetworksSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName, String networkName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (networkName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationNetworks(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, networkName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets all the network mappings under a network. - * - * Lists all ASR network mappings for the specified network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationNetworksAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName) { - return new PagedFlux<>( - () -> listByReplicationNetworksSinglePageAsync(resourceName, resourceGroupName, fabricName, networkName), - nextLink -> listByReplicationNetworksNextSinglePageAsync(nextLink)); - } - - /** - * Gets all the network mappings under a network. - * - * Lists all ASR network mappings for the specified network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationNetworksAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName, Context context) { - return new PagedFlux<>(() -> listByReplicationNetworksSinglePageAsync(resourceName, resourceGroupName, - fabricName, networkName, context), - nextLink -> listByReplicationNetworksNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all the network mappings under a network. - * - * Lists all ASR network mappings for the specified network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationNetworks(String resourceName, String resourceGroupName, - String fabricName, String networkName) { - return new PagedIterable<>( - listByReplicationNetworksAsync(resourceName, resourceGroupName, fabricName, networkName)); - } - - /** - * Gets all the network mappings under a network. - * - * Lists all ASR network mappings for the specified network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationNetworks(String resourceName, String resourceGroupName, - String fabricName, String networkName, Context context) { - return new PagedIterable<>( - listByReplicationNetworksAsync(resourceName, resourceGroupName, fabricName, networkName, context)); - } - - /** - * Gets network mapping by name. - * - * Gets the details of an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR network mapping along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (networkName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkName is required and cannot be null.")); - } - if (networkMappingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkMappingName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, networkName, networkMappingName, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets network mapping by name. - * - * Gets the details of an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR network mapping along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (networkName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkName is required and cannot be null.")); - } - if (networkMappingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkMappingName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, networkName, networkMappingName, accept, context); - } - - /** - * Gets network mapping by name. - * - * Gets the details of an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR network mapping on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets network mapping by name. - * - * Gets the details of an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR network mapping along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, - context).block(); - } - - /** - * Gets network mapping by name. - * - * Gets the details of an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR network mapping. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkMappingInner get(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, - Context.NONE).getValue(); - } - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName, CreateNetworkMappingInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (networkName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkName is required and cannot be null.")); - } - if (networkMappingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkMappingName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, networkName, networkMappingName, input, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName, CreateNetworkMappingInput input, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (networkName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkName is required and cannot be null.")); - } - if (networkMappingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkMappingName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, networkName, networkMappingName, input, accept, context); - } - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of network Mapping model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkMappingInner> beginCreateAsync(String resourceName, - String resourceGroupName, String fabricName, String networkName, String networkMappingName, - CreateNetworkMappingInput input) { - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - networkName, networkMappingName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkMappingInner.class, NetworkMappingInner.class, this.client.getContext()); - } - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of network Mapping model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkMappingInner> beginCreateAsync(String resourceName, - String resourceGroupName, String fabricName, String networkName, String networkMappingName, - CreateNetworkMappingInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - networkName, networkMappingName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkMappingInner.class, NetworkMappingInner.class, context); - } - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network Mapping model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkMappingInner> beginCreate(String resourceName, - String resourceGroupName, String fabricName, String networkName, String networkMappingName, - CreateNetworkMappingInput input) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, input) - .getSyncPoller(); - } - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network Mapping model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkMappingInner> beginCreate(String resourceName, - String resourceGroupName, String fabricName, String networkName, String networkMappingName, - CreateNetworkMappingInput input, Context context) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, input, - context) - .getSyncPoller(); - } - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName, CreateNetworkMappingInput input) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, input) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName, CreateNetworkMappingInput input, Context context) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, input, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkMappingInner create(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName, CreateNetworkMappingInput input) { - return createAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, input).block(); - } - - /** - * Creates network mapping. - * - * The operation to create an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Create network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkMappingInner create(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName, CreateNetworkMappingInput input, Context context) { - return createAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, input, context) - .block(); - } - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (networkName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkName is required and cannot be null.")); - } - if (networkMappingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkMappingName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, networkName, networkMappingName, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName ARM Resource Name for network mapping. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (networkName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkName is required and cannot be null.")); - } - if (networkMappingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkMappingName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, networkName, networkMappingName, context); - } - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName) { - Mono>> mono - = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName ARM Resource Name for network mapping. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, - networkName, networkMappingName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName) { - return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName) - .getSyncPoller(); - } - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName ARM Resource Name for network mapping. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName, Context context) { - return this - .beginDeleteAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, context) - .getSyncPoller(); - } - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName ARM Resource Name for network mapping. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName, Context context) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName) { - deleteAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName).block(); - } - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName ARM Resource Name for network mapping. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName, Context context) { - deleteAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, context).block(); - } - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName, UpdateNetworkMappingInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (networkName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkName is required and cannot be null.")); - } - if (networkMappingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkMappingName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, networkName, networkMappingName, input, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName, String networkMappingName, UpdateNetworkMappingInput input, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (networkName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkName is required and cannot be null.")); - } - if (networkMappingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkMappingName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, networkName, networkMappingName, input, accept, context); - } - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of network Mapping model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkMappingInner> beginUpdateAsync(String resourceName, - String resourceGroupName, String fabricName, String networkName, String networkMappingName, - UpdateNetworkMappingInput input) { - Mono>> mono = updateWithResponseAsync(resourceName, resourceGroupName, fabricName, - networkName, networkMappingName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkMappingInner.class, NetworkMappingInner.class, this.client.getContext()); - } - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of network Mapping model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkMappingInner> beginUpdateAsync(String resourceName, - String resourceGroupName, String fabricName, String networkName, String networkMappingName, - UpdateNetworkMappingInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceName, resourceGroupName, fabricName, - networkName, networkMappingName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkMappingInner.class, NetworkMappingInner.class, context); - } - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network Mapping model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkMappingInner> beginUpdate(String resourceName, - String resourceGroupName, String fabricName, String networkName, String networkMappingName, - UpdateNetworkMappingInput input) { - return this - .beginUpdateAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, input) - .getSyncPoller(); - } - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of network Mapping model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkMappingInner> beginUpdate(String resourceName, - String resourceGroupName, String fabricName, String networkName, String networkMappingName, - UpdateNetworkMappingInput input, Context context) { - return this - .beginUpdateAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, input, - context) - .getSyncPoller(); - } - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName, UpdateNetworkMappingInput input) { - return beginUpdateAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, input) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName, UpdateNetworkMappingInput input, Context context) { - return beginUpdateAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, input, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkMappingInner update(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName, UpdateNetworkMappingInput input) { - return updateAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, input).block(); - } - - /** - * Updates network mapping. - * - * The operation to update an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param input Update network mapping input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Mapping model. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkMappingInner update(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName, UpdateNetworkMappingInput input, Context context) { - return updateAsync(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, input, context) - .block(); - } - - /** - * Gets all the network mappings under a vault. - * - * Lists all ASR network mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all the network mappings under a vault. - * - * Lists all ASR network mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets all the network mappings under a vault. - * - * Lists all ASR network mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all the network mappings under a vault. - * - * Lists all ASR network mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all the network mappings under a vault. - * - * Lists all ASR network mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * Gets all the network mappings under a vault. - * - * Lists all ASR network mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationNetworksNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationNetworksNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationNetworksNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationNetworksNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationNetworkMappingsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationNetworkMappingsImpl.java deleted file mode 100644 index 8c61597f3bbe..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationNetworkMappingsImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationNetworkMappingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMapping; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationNetworkMappings; - -public final class ReplicationNetworkMappingsImpl implements ReplicationNetworkMappings { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationNetworkMappingsImpl.class); - - private final ReplicationNetworkMappingsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationNetworkMappingsImpl(ReplicationNetworkMappingsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationNetworks(String resourceName, String resourceGroupName, - String fabricName, String networkName) { - PagedIterable inner - = this.serviceClient().listByReplicationNetworks(resourceName, resourceGroupName, fabricName, networkName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkMappingImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationNetworks(String resourceName, String resourceGroupName, - String fabricName, String networkName, Context context) { - PagedIterable inner = this.serviceClient() - .listByReplicationNetworks(resourceName, resourceGroupName, fabricName, networkName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkMappingImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkMappingImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public NetworkMapping get(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName) { - NetworkMappingInner inner - = this.serviceClient().get(resourceName, resourceGroupName, fabricName, networkName, networkMappingName); - if (inner != null) { - return new NetworkMappingImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName) { - this.serviceClient().delete(resourceName, resourceGroupName, fabricName, networkName, networkMappingName); - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName, Context context) { - this.serviceClient() - .delete(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, context); - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkMappingImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkMappingImpl(inner1, this.manager())); - } - - public NetworkMapping getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String networkName = ResourceManagerUtils.getValueFromIdByName(id, "replicationNetworks"); - if (networkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationNetworks'.", id))); - } - String networkMappingName = ResourceManagerUtils.getValueFromIdByName(id, "replicationNetworkMappings"); - if (networkMappingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationNetworkMappings'.", id))); - } - return this - .getWithResponse(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String networkName = ResourceManagerUtils.getValueFromIdByName(id, "replicationNetworks"); - if (networkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationNetworks'.", id))); - } - String networkMappingName = ResourceManagerUtils.getValueFromIdByName(id, "replicationNetworkMappings"); - if (networkMappingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationNetworkMappings'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, - context); - } - - public void deleteById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String networkName = ResourceManagerUtils.getValueFromIdByName(id, "replicationNetworks"); - if (networkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationNetworks'.", id))); - } - String networkMappingName = ResourceManagerUtils.getValueFromIdByName(id, "replicationNetworkMappings"); - if (networkMappingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationNetworkMappings'.", id))); - } - this.delete(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String networkName = ResourceManagerUtils.getValueFromIdByName(id, "replicationNetworks"); - if (networkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationNetworks'.", id))); - } - String networkMappingName = ResourceManagerUtils.getValueFromIdByName(id, "replicationNetworkMappings"); - if (networkMappingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationNetworkMappings'.", id))); - } - this.delete(resourceName, resourceGroupName, fabricName, networkName, networkMappingName, context); - } - - private ReplicationNetworkMappingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public NetworkMappingImpl define(String name) { - return new NetworkMappingImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationNetworksClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationNetworksClientImpl.java deleted file mode 100644 index 356baf0ce67e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationNetworksClientImpl.java +++ /dev/null @@ -1,685 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationNetworksClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationNetworksClient. - */ -public final class ReplicationNetworksClientImpl implements ReplicationNetworksClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationNetworksService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationNetworksClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationNetworksClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationNetworksService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationNetworks to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationNetworksService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationFabrics(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("networkName") String networkName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationFabricsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of networks under a fabric. - * - * Lists the networks available for a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of networks under a fabric. - * - * Lists the networks available for a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of networks under a fabric. - * - * Lists the networks available for a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationFabricsAsync(String resourceName, String resourceGroupName, - String fabricName) { - return new PagedFlux<>( - () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName), - nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of networks under a fabric. - * - * Lists the networks available for a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationFabricsAsync(String resourceName, String resourceGroupName, - String fabricName, Context context) { - return new PagedFlux<>( - () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName, context), - nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of networks under a fabric. - * - * Lists the networks available for a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName) { - return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName)); - } - - /** - * Gets the list of networks under a fabric. - * - * Lists the networks available for a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context) { - return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName, context)); - } - - /** - * Gets a network with specified server id and network name. - * - * Gets the details of a network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param networkName Primary network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a network along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (networkName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, networkName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a network with specified server id and network name. - * - * Gets the details of a network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param networkName Primary network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a network along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String networkName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (networkName == null) { - return Mono.error(new IllegalArgumentException("Parameter networkName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, networkName, accept, context); - } - - /** - * Gets a network with specified server id and network name. - * - * Gets the details of a network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param networkName Primary network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a network on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String fabricName, - String networkName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, networkName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a network with specified server id and network name. - * - * Gets the details of a network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param networkName Primary network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String networkName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, networkName, context).block(); - } - - /** - * Gets a network with specified server id and network name. - * - * Gets the details of a network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param networkName Primary network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkInner get(String resourceName, String resourceGroupName, String fabricName, String networkName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, networkName, Context.NONE).getValue(); - } - - /** - * Gets the list of networks. View-only API. - * - * Lists the networks available in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of networks. View-only API. - * - * Lists the networks available in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of networks. View-only API. - * - * Lists the networks available in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of networks. View-only API. - * - * Lists the networks available in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of networks. View-only API. - * - * Lists the networks available in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * Gets the list of networks. View-only API. - * - * Lists the networks available in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationNetworksImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationNetworksImpl.java deleted file mode 100644 index 98cee18482d9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationNetworksImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationNetworksClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Network; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationNetworks; - -public final class ReplicationNetworksImpl implements ReplicationNetworks { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationNetworksImpl.class); - - private final ReplicationNetworksClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationNetworksImpl(ReplicationNetworksClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName) { - PagedIterable inner - = this.serviceClient().listByReplicationFabrics(resourceName, resourceGroupName, fabricName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context) { - PagedIterable inner - = this.serviceClient().listByReplicationFabrics(resourceName, resourceGroupName, fabricName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String networkName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, fabricName, networkName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Network get(String resourceName, String resourceGroupName, String fabricName, String networkName) { - NetworkInner inner = this.serviceClient().get(resourceName, resourceGroupName, fabricName, networkName); - if (inner != null) { - return new NetworkImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkImpl(inner1, this.manager())); - } - - private ReplicationNetworksClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationPoliciesClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationPoliciesClientImpl.java deleted file mode 100644 index cb43beb7d7dd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationPoliciesClientImpl.java +++ /dev/null @@ -1,1250 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationPoliciesClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.PolicyInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreatePolicyInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdatePolicyInput; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationPoliciesClient. - */ -public final class ReplicationPoliciesClientImpl implements ReplicationPoliciesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationPoliciesService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationPoliciesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationPoliciesClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationPoliciesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationPolicies to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationPoliciesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("policyName") String policyName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("policyName") String policyName, - @BodyParam("application/json") CreatePolicyInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("policyName") String policyName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("policyName") String policyName, - @BodyParam("application/json") UpdatePolicyInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of replication policies. - * - * Lists the replication policies for a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Profile Collection details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of replication policies. - * - * Lists the replication policies for a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Profile Collection details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of replication policies. - * - * Lists the replication policies for a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Profile Collection details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of replication policies. - * - * Lists the replication policies for a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Profile Collection details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of replication policies. - * - * Lists the replication policies for a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Profile Collection details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * Gets the list of replication policies. - * - * Lists the replication policies for a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Profile Collection details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Gets the requested policy. - * - * Gets the details of a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a replication policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String policyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), policyName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the requested policy. - * - * Gets the details of a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a replication policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String policyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), policyName, accept, context); - } - - /** - * Gets the requested policy. - * - * Gets the details of a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a replication policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String policyName) { - return getWithResponseAsync(resourceName, resourceGroupName, policyName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the requested policy. - * - * Gets the details of a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a replication policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, String policyName, - Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, policyName, context).block(); - } - - /** - * Gets the requested policy. - * - * Gets the details of a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a replication policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PolicyInner get(String resourceName, String resourceGroupName, String policyName) { - return getWithResponse(resourceName, resourceGroupName, policyName, Context.NONE).getValue(); - } - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String policyName, CreatePolicyInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), policyName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String policyName, CreatePolicyInput input, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), policyName, input, accept, context); - } - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection profile details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PolicyInner> beginCreateAsync(String resourceName, - String resourceGroupName, String policyName, CreatePolicyInput input) { - Mono>> mono - = createWithResponseAsync(resourceName, resourceGroupName, policyName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - PolicyInner.class, PolicyInner.class, this.client.getContext()); - } - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection profile details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PolicyInner> beginCreateAsync(String resourceName, - String resourceGroupName, String policyName, CreatePolicyInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceName, resourceGroupName, policyName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - PolicyInner.class, PolicyInner.class, context); - } - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection profile details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PolicyInner> beginCreate(String resourceName, String resourceGroupName, - String policyName, CreatePolicyInput input) { - return this.beginCreateAsync(resourceName, resourceGroupName, policyName, input).getSyncPoller(); - } - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection profile details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PolicyInner> beginCreate(String resourceName, String resourceGroupName, - String policyName, CreatePolicyInput input, Context context) { - return this.beginCreateAsync(resourceName, resourceGroupName, policyName, input, context).getSyncPoller(); - } - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String policyName, - CreatePolicyInput input) { - return beginCreateAsync(resourceName, resourceGroupName, policyName, input).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String policyName, - CreatePolicyInput input, Context context) { - return beginCreateAsync(resourceName, resourceGroupName, policyName, input, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PolicyInner create(String resourceName, String resourceGroupName, String policyName, - CreatePolicyInput input) { - return createAsync(resourceName, resourceGroupName, policyName, input).block(); - } - - /** - * Creates the policy. - * - * The operation to create a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param input Create policy input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PolicyInner create(String resourceName, String resourceGroupName, String policyName, CreatePolicyInput input, - Context context) { - return createAsync(resourceName, resourceGroupName, policyName, input, context).block(); - } - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String policyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), policyName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String policyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), policyName, context); - } - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String policyName) { - Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, policyName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String policyName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceName, resourceGroupName, policyName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String policyName) { - return this.beginDeleteAsync(resourceName, resourceGroupName, policyName).getSyncPoller(); - } - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String policyName, Context context) { - return this.beginDeleteAsync(resourceName, resourceGroupName, policyName, context).getSyncPoller(); - } - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String policyName) { - return beginDeleteAsync(resourceName, resourceGroupName, policyName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String policyName, Context context) { - return beginDeleteAsync(resourceName, resourceGroupName, policyName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String policyName) { - deleteAsync(resourceName, resourceGroupName, policyName).block(); - } - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String policyName, Context context) { - deleteAsync(resourceName, resourceGroupName, policyName, context).block(); - } - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String policyName, UpdatePolicyInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), policyName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String policyName, UpdatePolicyInput input, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), policyName, input, accept, context); - } - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection profile details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PolicyInner> beginUpdateAsync(String resourceName, - String resourceGroupName, String policyName, UpdatePolicyInput input) { - Mono>> mono - = updateWithResponseAsync(resourceName, resourceGroupName, policyName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - PolicyInner.class, PolicyInner.class, this.client.getContext()); - } - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection profile details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PolicyInner> beginUpdateAsync(String resourceName, - String resourceGroupName, String policyName, UpdatePolicyInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceName, resourceGroupName, policyName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - PolicyInner.class, PolicyInner.class, context); - } - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection profile details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PolicyInner> beginUpdate(String resourceName, String resourceGroupName, - String policyName, UpdatePolicyInput input) { - return this.beginUpdateAsync(resourceName, resourceGroupName, policyName, input).getSyncPoller(); - } - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection profile details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PolicyInner> beginUpdate(String resourceName, String resourceGroupName, - String policyName, UpdatePolicyInput input, Context context) { - return this.beginUpdateAsync(resourceName, resourceGroupName, policyName, input, context).getSyncPoller(); - } - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, String policyName, - UpdatePolicyInput input) { - return beginUpdateAsync(resourceName, resourceGroupName, policyName, input).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, String policyName, - UpdatePolicyInput input, Context context) { - return beginUpdateAsync(resourceName, resourceGroupName, policyName, input, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PolicyInner update(String resourceName, String resourceGroupName, String policyName, - UpdatePolicyInput input) { - return updateAsync(resourceName, resourceGroupName, policyName, input).block(); - } - - /** - * Updates the policy. - * - * The operation to update a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Policy Id. - * @param input Update Policy Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection profile details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PolicyInner update(String resourceName, String resourceGroupName, String policyName, UpdatePolicyInput input, - Context context) { - return updateAsync(resourceName, resourceGroupName, policyName, input, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Profile Collection details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Profile Collection details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationPoliciesImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationPoliciesImpl.java deleted file mode 100644 index a962251afe58..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationPoliciesImpl.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationPoliciesClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.PolicyInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Policy; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationPolicies; - -public final class ReplicationPoliciesImpl implements ReplicationPolicies { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationPoliciesImpl.class); - - private final ReplicationPoliciesClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationPoliciesImpl(ReplicationPoliciesClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PolicyImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PolicyImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, String policyName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, policyName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PolicyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Policy get(String resourceName, String resourceGroupName, String policyName) { - PolicyInner inner = this.serviceClient().get(resourceName, resourceGroupName, policyName); - if (inner != null) { - return new PolicyImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceName, String resourceGroupName, String policyName) { - this.serviceClient().delete(resourceName, resourceGroupName, policyName); - } - - public void delete(String resourceName, String resourceGroupName, String policyName, Context context) { - this.serviceClient().delete(resourceName, resourceGroupName, policyName, context); - } - - public Policy getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String policyName = ResourceManagerUtils.getValueFromIdByName(id, "replicationPolicies"); - if (policyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationPolicies'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, policyName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String policyName = ResourceManagerUtils.getValueFromIdByName(id, "replicationPolicies"); - if (policyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationPolicies'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, policyName, context); - } - - public void deleteById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String policyName = ResourceManagerUtils.getValueFromIdByName(id, "replicationPolicies"); - if (policyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationPolicies'.", id))); - } - this.delete(resourceName, resourceGroupName, policyName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String policyName = ResourceManagerUtils.getValueFromIdByName(id, "replicationPolicies"); - if (policyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationPolicies'.", id))); - } - this.delete(resourceName, resourceGroupName, policyName, context); - } - - private ReplicationPoliciesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public PolicyImpl define(String name) { - return new PolicyImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectableItemsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectableItemsClientImpl.java deleted file mode 100644 index 2e06e2a2da0f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectableItemsClientImpl.java +++ /dev/null @@ -1,560 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectableItemsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectableItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectableItemCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationProtectableItemsClient. - */ -public final class ReplicationProtectableItemsClientImpl implements ReplicationProtectableItemsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationProtectableItemsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationProtectableItemsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationProtectableItemsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationProtectableItemsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationProtectableItems to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationProtectableItemsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationProtectionContainers( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("resourceName") String resourceName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, @QueryParam("$filter") String filter, - @QueryParam("$take") String take, @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems/{protectableItemName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("protectableItemName") String protectableItemName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationProtectionContainersNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of protectable items. - * - * Lists the protectable items in a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param filter OData filter options. - * @param take take OData query parameter. - * @param skipToken skipToken OData query parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectionContainersSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, String filter, - String take, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationProtectionContainers(this.client.getEndpoint(), - this.client.getApiVersion(), resourceName, resourceGroupName, this.client.getSubscriptionId(), - fabricName, protectionContainerName, filter, take, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of protectable items. - * - * Lists the protectable items in a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param filter OData filter options. - * @param take take OData query parameter. - * @param skipToken skipToken OData query parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectionContainersSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, String filter, - String take, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationProtectionContainers(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, filter, take, - skipToken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of protectable items. - * - * Lists the protectable items in a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param filter OData filter options. - * @param take take OData query parameter. - * @param skipToken skipToken OData query parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectionContainersAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String filter, String take, - String skipToken) { - return new PagedFlux<>( - () -> listByReplicationProtectionContainersSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, filter, take, skipToken), - nextLink -> listByReplicationProtectionContainersNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of protectable items. - * - * Lists the protectable items in a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectionContainersAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - final String filter = null; - final String take = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listByReplicationProtectionContainersSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, filter, take, skipToken), - nextLink -> listByReplicationProtectionContainersNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of protectable items. - * - * Lists the protectable items in a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param filter OData filter options. - * @param take take OData query parameter. - * @param skipToken skipToken OData query parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectionContainersAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String filter, String take, - String skipToken, Context context) { - return new PagedFlux<>( - () -> listByReplicationProtectionContainersSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, filter, take, skipToken, context), - nextLink -> listByReplicationProtectionContainersNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of protectable items. - * - * Lists the protectable items in a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - final String filter = null; - final String take = null; - final String skipToken = null; - return new PagedIterable<>(listByReplicationProtectionContainersAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, filter, take, skipToken)); - } - - /** - * Gets the list of protectable items. - * - * Lists the protectable items in a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param filter OData filter options. - * @param take take OData query parameter. - * @param skipToken skipToken OData query parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String filter, String take, - String skipToken, Context context) { - return new PagedIterable<>(listByReplicationProtectionContainersAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, filter, take, skipToken, context)); - } - - /** - * Gets the details of a protectable item. - * - * The operation to get the details of a protectable item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param protectableItemName Protectable item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String protectableItemName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (protectableItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectableItemName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - protectableItemName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the details of a protectable item. - * - * The operation to get the details of a protectable item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param protectableItemName Protectable item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String protectableItemName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (protectableItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectableItemName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, protectableItemName, accept, context); - } - - /** - * Gets the details of a protectable item. - * - * The operation to get the details of a protectable item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param protectableItemName Protectable item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String protectableItemName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - protectableItemName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the details of a protectable item. - * - * The operation to get the details of a protectable item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param protectableItemName Protectable item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String protectableItemName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - protectableItemName, context).block(); - } - - /** - * Gets the details of a protectable item. - * - * The operation to get the details of a protectable item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param protectableItemName Protectable item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectableItemInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String protectableItemName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, - protectableItemName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationProtectionContainersNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationProtectionContainersNext(nextLink, - this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationProtectionContainersNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationProtectionContainersNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectableItemsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectableItemsImpl.java deleted file mode 100644 index 22a53be15e2e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectableItemsImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectableItemsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectableItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectableItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectableItems; - -public final class ReplicationProtectableItemsImpl implements ReplicationProtectableItems { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationProtectableItemsImpl.class); - - private final ReplicationProtectableItemsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationProtectableItemsImpl(ReplicationProtectableItemsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - PagedIterable inner = this.serviceClient() - .listByReplicationProtectionContainers(resourceName, resourceGroupName, fabricName, - protectionContainerName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ProtectableItemImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String filter, String take, - String skipToken, Context context) { - PagedIterable inner = this.serviceClient() - .listByReplicationProtectionContainers(resourceName, resourceGroupName, fabricName, protectionContainerName, - filter, take, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ProtectableItemImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String protectableItemName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, protectableItemName, - context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ProtectableItemImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ProtectableItem get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String protectableItemName) { - ProtectableItemInner inner = this.serviceClient() - .get(resourceName, resourceGroupName, fabricName, protectionContainerName, protectableItemName); - if (inner != null) { - return new ProtectableItemImpl(inner, this.manager()); - } else { - return null; - } - } - - private ReplicationProtectableItemsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectedItemImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectedItemImpl.java deleted file mode 100644 index 3ab4c0922619..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectedItemImpl.java +++ /dev/null @@ -1,380 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectedItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplyRecoveryPointInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableProtectionInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItemProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReverseReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateApplianceForReplicationProtectedItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMobilityServiceRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemInputProperties; - -public final class ReplicationProtectedItemImpl - implements ReplicationProtectedItem, ReplicationProtectedItem.Definition, ReplicationProtectedItem.Update { - private ReplicationProtectedItemInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ReplicationProtectedItemProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ReplicationProtectedItemInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String fabricName; - - private String protectionContainerName; - - private String replicatedProtectedItemName; - - private EnableProtectionInput createInput; - - private UpdateReplicationProtectedItemInput updateUpdateProtectionInput; - - public ReplicationProtectedItemImpl withExistingReplicationProtectionContainer(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - this.fabricName = fabricName; - this.protectionContainerName = protectionContainerName; - return this; - } - - public ReplicationProtectedItem create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectedItems() - .create(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - createInput, Context.NONE); - return this; - } - - public ReplicationProtectedItem create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectedItems() - .create(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - createInput, context); - return this; - } - - ReplicationProtectedItemImpl(String name, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new ReplicationProtectedItemInner(); - this.serviceManager = serviceManager; - this.replicatedProtectedItemName = name; - this.createInput = new EnableProtectionInput(); - } - - public ReplicationProtectedItemImpl update() { - this.updateUpdateProtectionInput = new UpdateReplicationProtectedItemInput(); - return this; - } - - public ReplicationProtectedItem apply() { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectedItems() - .update(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - updateUpdateProtectionInput, Context.NONE); - return this; - } - - public ReplicationProtectedItem apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectedItems() - .update(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - updateUpdateProtectionInput, context); - return this; - } - - ReplicationProtectedItemImpl(ReplicationProtectedItemInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "vaults"); - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.fabricName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationFabrics"); - this.protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationProtectionContainers"); - this.replicatedProtectedItemName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationProtectedItems"); - } - - public ReplicationProtectedItem refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectedItems() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, Context.NONE) - .getValue(); - return this; - } - - public ReplicationProtectedItem refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectedItems() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context) - .getValue(); - return this; - } - - public ReplicationProtectedItem addDisks(AddDisksInput addDisksInput) { - return serviceManager.replicationProtectedItems() - .addDisks(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - addDisksInput); - } - - public ReplicationProtectedItem addDisks(AddDisksInput addDisksInput, Context context) { - return serviceManager.replicationProtectedItems() - .addDisks(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - addDisksInput, context); - } - - public ReplicationProtectedItem applyRecoveryPoint(ApplyRecoveryPointInput applyRecoveryPointInput) { - return serviceManager.replicationProtectedItems() - .applyRecoveryPoint(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applyRecoveryPointInput); - } - - public ReplicationProtectedItem applyRecoveryPoint(ApplyRecoveryPointInput applyRecoveryPointInput, - Context context) { - return serviceManager.replicationProtectedItems() - .applyRecoveryPoint(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applyRecoveryPointInput, context); - } - - public ReplicationProtectedItem failoverCancel() { - return serviceManager.replicationProtectedItems() - .failoverCancel(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName); - } - - public ReplicationProtectedItem failoverCancel(Context context) { - return serviceManager.replicationProtectedItems() - .failoverCancel(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context); - } - - public ReplicationProtectedItem failoverCommit() { - return serviceManager.replicationProtectedItems() - .failoverCommit(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName); - } - - public ReplicationProtectedItem failoverCommit(Context context) { - return serviceManager.replicationProtectedItems() - .failoverCommit(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context); - } - - public ReplicationProtectedItem plannedFailover(PlannedFailoverInput failoverInput) { - return serviceManager.replicationProtectedItems() - .plannedFailover(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput); - } - - public ReplicationProtectedItem plannedFailover(PlannedFailoverInput failoverInput, Context context) { - return serviceManager.replicationProtectedItems() - .plannedFailover(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, context); - } - - public void delete(DisableProtectionInput disableProtectionInput) { - serviceManager.replicationProtectedItems() - .delete(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - disableProtectionInput); - } - - public void delete(DisableProtectionInput disableProtectionInput, Context context) { - serviceManager.replicationProtectedItems() - .delete(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - disableProtectionInput, context); - } - - public ReplicationProtectedItem removeDisks(RemoveDisksInput removeDisksInput) { - return serviceManager.replicationProtectedItems() - .removeDisks(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, removeDisksInput); - } - - public ReplicationProtectedItem removeDisks(RemoveDisksInput removeDisksInput, Context context) { - return serviceManager.replicationProtectedItems() - .removeDisks(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, removeDisksInput, context); - } - - public ReplicationProtectedItem repairReplication() { - return serviceManager.replicationProtectedItems() - .repairReplication(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName); - } - - public ReplicationProtectedItem repairReplication(Context context) { - return serviceManager.replicationProtectedItems() - .repairReplication(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context); - } - - public ReplicationProtectedItem reprotect(ReverseReplicationInput reprotectInput) { - return serviceManager.replicationProtectedItems() - .reprotect(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, reprotectInput); - } - - public ReplicationProtectedItem reprotect(ReverseReplicationInput reprotectInput, Context context) { - return serviceManager.replicationProtectedItems() - .reprotect(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, reprotectInput, context); - } - - public ReplicationProtectedItem resolveHealthErrors(ResolveHealthInput resolveHealthInput) { - return serviceManager.replicationProtectedItems() - .resolveHealthErrors(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, resolveHealthInput); - } - - public ReplicationProtectedItem resolveHealthErrors(ResolveHealthInput resolveHealthInput, Context context) { - return serviceManager.replicationProtectedItems() - .resolveHealthErrors(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, resolveHealthInput, context); - } - - public ReplicationProtectedItem switchProvider(SwitchProviderInput switchProviderInput) { - return serviceManager.replicationProtectedItems() - .switchProvider(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, switchProviderInput); - } - - public ReplicationProtectedItem switchProvider(SwitchProviderInput switchProviderInput, Context context) { - return serviceManager.replicationProtectedItems() - .switchProvider(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, switchProviderInput, context); - } - - public ReplicationProtectedItem testFailover(TestFailoverInput testfailoverInput) { - return serviceManager.replicationProtectedItems() - .testFailover(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, testfailoverInput); - } - - public ReplicationProtectedItem testFailover(TestFailoverInput testfailoverInput, Context context) { - return serviceManager.replicationProtectedItems() - .testFailover(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, testfailoverInput, context); - } - - public ReplicationProtectedItem testFailoverCleanup(TestFailoverCleanupInput cleanupInput) { - return serviceManager.replicationProtectedItems() - .testFailoverCleanup(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, cleanupInput); - } - - public ReplicationProtectedItem testFailoverCleanup(TestFailoverCleanupInput cleanupInput, Context context) { - return serviceManager.replicationProtectedItems() - .testFailoverCleanup(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, cleanupInput, context); - } - - public ReplicationProtectedItem unplannedFailover(UnplannedFailoverInput failoverInput) { - return serviceManager.replicationProtectedItems() - .unplannedFailover(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput); - } - - public ReplicationProtectedItem unplannedFailover(UnplannedFailoverInput failoverInput, Context context) { - return serviceManager.replicationProtectedItems() - .unplannedFailover(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, context); - } - - public ReplicationProtectedItem - updateAppliance(UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput) { - return serviceManager.replicationProtectedItems() - .updateAppliance(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applianceUpdateInput); - } - - public ReplicationProtectedItem - updateAppliance(UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput, Context context) { - return serviceManager.replicationProtectedItems() - .updateAppliance(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applianceUpdateInput, context); - } - - public ReplicationProtectedItem updateMobilityService(UpdateMobilityServiceRequest updateMobilityServiceRequest) { - return serviceManager.replicationProtectedItems() - .updateMobilityService(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateMobilityServiceRequest); - } - - public ReplicationProtectedItem updateMobilityService(UpdateMobilityServiceRequest updateMobilityServiceRequest, - Context context) { - return serviceManager.replicationProtectedItems() - .updateMobilityService(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateMobilityServiceRequest, context); - } - - public ReplicationProtectedItemImpl withProperties(EnableProtectionInputProperties properties) { - this.createInput.withProperties(properties); - return this; - } - - public ReplicationProtectedItemImpl withProperties(UpdateReplicationProtectedItemInputProperties properties) { - this.updateUpdateProtectionInput.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectedItemsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectedItemsClientImpl.java deleted file mode 100644 index 1e9e08b8469a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectedItemsClientImpl.java +++ /dev/null @@ -1,7191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectedItemsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectedItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplyRecoveryPointInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItemCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReverseReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateApplianceForReplicationProtectedItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMobilityServiceRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemInput; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationProtectedItemsClient. - */ -public final class ReplicationProtectedItemsClientImpl implements ReplicationProtectedItemsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationProtectedItemsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationProtectedItemsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationProtectedItemsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationProtectedItemsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationProtectedItems to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationProtectedItemsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationProtectionContainers( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("resourceName") String resourceName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") EnableProtectionInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> purge(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") UpdateReplicationProtectedItemInput updateProtectionInput, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/addDisks") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> addDisks(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") AddDisksInput addDisksInput, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/applyRecoveryPoint") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> applyRecoveryPoint(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") ApplyRecoveryPointInput applyRecoveryPointInput, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCancel") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failoverCancel(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCommit") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failoverCommit(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/plannedFailover") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> plannedFailover(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") PlannedFailoverInput failoverInput, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/remove") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") DisableProtectionInput disableProtectionInput, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/removeDisks") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> removeDisks(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") RemoveDisksInput removeDisksInput, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/repairReplication") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> repairReplication(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/reProtect") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reprotect(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") ReverseReplicationInput reprotectInput, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/resolveHealthErrors") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resolveHealthErrors(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") ResolveHealthInput resolveHealthInput, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/switchProvider") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> switchProvider(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") SwitchProviderInput switchProviderInput, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailover") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> testFailover(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") TestFailoverInput testfailoverInput, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailoverCleanup") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> testFailoverCleanup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") TestFailoverCleanupInput cleanupInput, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/unplannedFailover") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> unplannedFailover(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") UnplannedFailoverInput failoverInput, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/updateAppliance") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateAppliance(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/updateMobilityService") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateMobilityService(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @BodyParam("application/json") UpdateMobilityServiceRequest updateMobilityServiceRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectedItems") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("skipToken") String skipToken, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationProtectionContainersNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of Replication protected items. - * - * Gets the list of ASR replication protected items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the protection container along with {@link PagedResponse} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectionContainersSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationProtectionContainers(this.client.getEndpoint(), - this.client.getApiVersion(), resourceName, resourceGroupName, this.client.getSubscriptionId(), - fabricName, protectionContainerName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of Replication protected items. - * - * Gets the list of ASR replication protected items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the protection container along with {@link PagedResponse} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectionContainersSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationProtectionContainers(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of Replication protected items. - * - * Gets the list of ASR replication protected items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the protection container as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectionContainersAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - return new PagedFlux<>( - () -> listByReplicationProtectionContainersSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName), - nextLink -> listByReplicationProtectionContainersNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of Replication protected items. - * - * Gets the list of ASR replication protected items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the protection container as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectionContainersAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, Context context) { - return new PagedFlux<>( - () -> listByReplicationProtectionContainersSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, context), - nextLink -> listByReplicationProtectionContainersNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of Replication protected items. - * - * Gets the list of ASR replication protected items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the protection container as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - return new PagedIterable<>(listByReplicationProtectionContainersAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName)); - } - - /** - * Gets the list of Replication protected items. - * - * Gets the list of ASR replication protected items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the protection container as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, Context context) { - return new PagedIterable<>(listByReplicationProtectionContainersAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, context)); - } - - /** - * Gets the details of a Replication protected item. - * - * Gets the details of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protected item along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the details of a Replication protected item. - * - * Gets the details of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protected item along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, accept, - context); - } - - /** - * Gets the details of a Replication protected item. - * - * Gets the details of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the details of a Replication protected item. - * - * Gets the details of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protected item along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context).block(); - } - - /** - * Gets the details of a Replication protected item. - * - * Gets the details of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, Context.NONE).getValue(); - } - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - EnableProtectionInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - EnableProtectionInput input, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, input, - accept, context); - } - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> beginCreateAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, EnableProtectionInput input) { - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, input); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> beginCreateAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, EnableProtectionInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, input, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, EnableProtectionInput input) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, input) - .getSyncPoller(); - } - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, EnableProtectionInput input, Context context) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, input, context) - .getSyncPoller(); - } - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - EnableProtectionInput input) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, input).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - EnableProtectionInput input, Context context) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, input, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, EnableProtectionInput input) { - return createAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, input).block(); - } - - /** - * Enables protection. - * - * The operation to create an ASR replication protected item (Enable replication). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName A name for the replication protected item. - * @param input Enable Protection Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, EnableProtectionInput input, - Context context) { - return createAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, input, context).block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> purgeWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.purge(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> purgeWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.purge(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, context); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPurgeAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName) { - Mono>> mono = purgeWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPurgeAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = purgeWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName) { - return this - .beginPurgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName) - .getSyncPoller(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context) { - return this - .beginPurgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context) - .getSyncPoller(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono purgeAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName) { - return beginPurgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono purgeAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context) { - return beginPurgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - purgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName) - .block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, Context context) { - purgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - context).block(); - } - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateReplicationProtectedItemInput updateProtectionInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (updateProtectionInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter updateProtectionInput is required and cannot be null.")); - } else { - updateProtectionInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, updateProtectionInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateReplicationProtectedItemInput updateProtectionInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (updateProtectionInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter updateProtectionInput is required and cannot be null.")); - } else { - updateProtectionInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, - updateProtectionInput, accept, context); - } - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> beginUpdateAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput) { - Mono>> mono = updateWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, updateProtectionInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> beginUpdateAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, updateProtectionInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginUpdate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput) { - return this - .beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateProtectionInput) - .getSyncPoller(); - } - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginUpdate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput, - Context context) { - return this - .beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateProtectionInput, context) - .getSyncPoller(); - } - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateReplicationProtectedItemInput updateProtectionInput) { - return beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateProtectionInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateReplicationProtectedItemInput updateProtectionInput, Context context) { - return beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateProtectionInput, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner update(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateReplicationProtectedItemInput updateProtectionInput) { - return updateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateProtectionInput).block(); - } - - /** - * Updates the replication protected item settings. - * - * The operation to update the recovery settings of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param updateProtectionInput Update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner update(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateReplicationProtectedItemInput updateProtectionInput, Context context) { - return updateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateProtectionInput, context).block(); - } - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> addDisksWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - AddDisksInput addDisksInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (addDisksInput == null) { - return Mono.error(new IllegalArgumentException("Parameter addDisksInput is required and cannot be null.")); - } else { - addDisksInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.addDisks(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, addDisksInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> addDisksWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - AddDisksInput addDisksInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (addDisksInput == null) { - return Mono.error(new IllegalArgumentException("Parameter addDisksInput is required and cannot be null.")); - } else { - addDisksInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.addDisks(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, - addDisksInput, accept, context); - } - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> beginAddDisksAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, AddDisksInput addDisksInput) { - Mono>> mono = addDisksWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, addDisksInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> beginAddDisksAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, AddDisksInput addDisksInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = addDisksWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, addDisksInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginAddDisks( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, AddDisksInput addDisksInput) { - return this - .beginAddDisksAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, addDisksInput) - .getSyncPoller(); - } - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginAddDisks( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, AddDisksInput addDisksInput, Context context) { - return this - .beginAddDisksAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, addDisksInput, context) - .getSyncPoller(); - } - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono addDisksAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - AddDisksInput addDisksInput) { - return beginAddDisksAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, addDisksInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono addDisksAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - AddDisksInput addDisksInput, Context context) { - return beginAddDisksAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, addDisksInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner addDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, AddDisksInput addDisksInput) { - return addDisksAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, addDisksInput).block(); - } - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner addDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, AddDisksInput addDisksInput, - Context context) { - return addDisksAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, addDisksInput, context).block(); - } - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> applyRecoveryPointWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (applyRecoveryPointInput == null) { - return Mono.error( - new IllegalArgumentException("Parameter applyRecoveryPointInput is required and cannot be null.")); - } else { - applyRecoveryPointInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.applyRecoveryPoint(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, applyRecoveryPointInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> applyRecoveryPointWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (applyRecoveryPointInput == null) { - return Mono.error( - new IllegalArgumentException("Parameter applyRecoveryPointInput is required and cannot be null.")); - } else { - applyRecoveryPointInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.applyRecoveryPoint(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, applyRecoveryPointInput, accept, context); - } - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginApplyRecoveryPointAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput) { - Mono>> mono = applyRecoveryPointWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, applyRecoveryPointInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginApplyRecoveryPointAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = applyRecoveryPointWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, applyRecoveryPointInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginApplyRecoveryPoint( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, ApplyRecoveryPointInput applyRecoveryPointInput) { - return this - .beginApplyRecoveryPointAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applyRecoveryPointInput) - .getSyncPoller(); - } - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginApplyRecoveryPoint( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, ApplyRecoveryPointInput applyRecoveryPointInput, Context context) { - return this - .beginApplyRecoveryPointAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applyRecoveryPointInput, context) - .getSyncPoller(); - } - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono applyRecoveryPointAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput) { - return beginApplyRecoveryPointAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applyRecoveryPointInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono applyRecoveryPointAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput, Context context) { - return beginApplyRecoveryPointAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applyRecoveryPointInput, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner applyRecoveryPoint(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput) { - return applyRecoveryPointAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applyRecoveryPointInput).block(); - } - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner applyRecoveryPoint(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput, Context context) { - return applyRecoveryPointAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applyRecoveryPointInput, context).block(); - } - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverCancelWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.failoverCancel(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverCancelWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.failoverCancel(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, accept, context); - } - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginFailoverCancelAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName) { - Mono>> mono = failoverCancelWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginFailoverCancelAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = failoverCancelWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginFailoverCancel( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - return this - .beginFailoverCancelAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName) - .getSyncPoller(); - } - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginFailoverCancel( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, Context context) { - return this - .beginFailoverCancelAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context) - .getSyncPoller(); - } - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverCancelAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName) { - return beginFailoverCancelAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverCancelAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context) { - return beginFailoverCancelAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner failoverCancel(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName) { - return failoverCancelAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName).block(); - } - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner failoverCancel(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context) { - return failoverCancelAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context).block(); - } - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverCommitWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.failoverCommit(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverCommitWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.failoverCommit(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, accept, context); - } - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginFailoverCommitAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName) { - Mono>> mono = failoverCommitWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginFailoverCommitAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = failoverCommitWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginFailoverCommit( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - return this - .beginFailoverCommitAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName) - .getSyncPoller(); - } - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginFailoverCommit( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, Context context) { - return this - .beginFailoverCommitAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context) - .getSyncPoller(); - } - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverCommitAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName) { - return beginFailoverCommitAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverCommitAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context) { - return beginFailoverCommitAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner failoverCommit(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName) { - return failoverCommitAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName).block(); - } - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner failoverCommit(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context) { - return failoverCommitAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context).block(); - } - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> plannedFailoverWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - PlannedFailoverInput failoverInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (failoverInput == null) { - return Mono.error(new IllegalArgumentException("Parameter failoverInput is required and cannot be null.")); - } else { - failoverInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.plannedFailover(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> plannedFailoverWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - PlannedFailoverInput failoverInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (failoverInput == null) { - return Mono.error(new IllegalArgumentException("Parameter failoverInput is required and cannot be null.")); - } else { - failoverInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.plannedFailover(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, accept, context); - } - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginPlannedFailoverAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInput failoverInput) { - Mono>> mono = plannedFailoverWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginPlannedFailoverAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInput failoverInput, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = plannedFailoverWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginPlannedFailover( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, PlannedFailoverInput failoverInput) { - return this - .beginPlannedFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput) - .getSyncPoller(); - } - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginPlannedFailover( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, PlannedFailoverInput failoverInput, Context context) { - return this - .beginPlannedFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, context) - .getSyncPoller(); - } - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono plannedFailoverAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - PlannedFailoverInput failoverInput) { - return beginPlannedFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono plannedFailoverAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - PlannedFailoverInput failoverInput, Context context) { - return beginPlannedFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner plannedFailover(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - PlannedFailoverInput failoverInput) { - return plannedFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput).block(); - } - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner plannedFailover(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - PlannedFailoverInput failoverInput, Context context) { - return plannedFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, context).block(); - } - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - DisableProtectionInput disableProtectionInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (disableProtectionInput == null) { - return Mono.error( - new IllegalArgumentException("Parameter disableProtectionInput is required and cannot be null.")); - } else { - disableProtectionInput.validate(); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, disableProtectionInput, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - DisableProtectionInput disableProtectionInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (disableProtectionInput == null) { - return Mono.error( - new IllegalArgumentException("Parameter disableProtectionInput is required and cannot be null.")); - } else { - disableProtectionInput.validate(); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, replicatedProtectedItemName, - disableProtectionInput, context); - } - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - DisableProtectionInput disableProtectionInput) { - Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, disableProtectionInput); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - DisableProtectionInput disableProtectionInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, disableProtectionInput, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - DisableProtectionInput disableProtectionInput) { - return this - .beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, disableProtectionInput) - .getSyncPoller(); - } - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - DisableProtectionInput disableProtectionInput, Context context) { - return this - .beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, disableProtectionInput, context) - .getSyncPoller(); - } - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - DisableProtectionInput disableProtectionInput) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, disableProtectionInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - DisableProtectionInput disableProtectionInput, Context context) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, disableProtectionInput, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, DisableProtectionInput disableProtectionInput) { - deleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - disableProtectionInput).block(); - } - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, DisableProtectionInput disableProtectionInput, Context context) { - deleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - disableProtectionInput, context).block(); - } - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> removeDisksWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - RemoveDisksInput removeDisksInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (removeDisksInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter removeDisksInput is required and cannot be null.")); - } else { - removeDisksInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.removeDisks(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, removeDisksInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> removeDisksWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - RemoveDisksInput removeDisksInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (removeDisksInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter removeDisksInput is required and cannot be null.")); - } else { - removeDisksInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.removeDisks(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, removeDisksInput, accept, context); - } - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> beginRemoveDisksAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, RemoveDisksInput removeDisksInput) { - Mono>> mono = removeDisksWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, removeDisksInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> beginRemoveDisksAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, RemoveDisksInput removeDisksInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = removeDisksWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, removeDisksInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginRemoveDisks( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, RemoveDisksInput removeDisksInput) { - return this - .beginRemoveDisksAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, removeDisksInput) - .getSyncPoller(); - } - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginRemoveDisks( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, RemoveDisksInput removeDisksInput, Context context) { - return this - .beginRemoveDisksAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, removeDisksInput, context) - .getSyncPoller(); - } - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono removeDisksAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - RemoveDisksInput removeDisksInput) { - return beginRemoveDisksAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, removeDisksInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono removeDisksAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - RemoveDisksInput removeDisksInput, Context context) { - return beginRemoveDisksAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, removeDisksInput, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner removeDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, RemoveDisksInput removeDisksInput) { - return removeDisksAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, removeDisksInput).block(); - } - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner removeDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, RemoveDisksInput removeDisksInput, - Context context) { - return removeDisksAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, removeDisksInput, context).block(); - } - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> repairReplicationWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.repairReplication(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the container. - * @param replicatedProtectedItemName The name of the replication protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> repairReplicationWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.repairReplication(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, accept, context); - } - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginRepairReplicationAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName) { - Mono>> mono = repairReplicationWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the container. - * @param replicatedProtectedItemName The name of the replication protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginRepairReplicationAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = repairReplicationWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginRepairReplication( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - return this - .beginRepairReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName) - .getSyncPoller(); - } - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the container. - * @param replicatedProtectedItemName The name of the replication protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginRepairReplication( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, Context context) { - return this - .beginRepairReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context) - .getSyncPoller(); - } - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono repairReplicationAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName) { - return beginRepairReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the container. - * @param replicatedProtectedItemName The name of the replication protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono repairReplicationAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context) { - return beginRepairReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner repairReplication(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName) { - return repairReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName).block(); - } - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the container. - * @param replicatedProtectedItemName The name of the replication protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner repairReplication(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context) { - return repairReplicationAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context).block(); - } - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reprotectWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ReverseReplicationInput reprotectInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (reprotectInput == null) { - return Mono.error(new IllegalArgumentException("Parameter reprotectInput is required and cannot be null.")); - } else { - reprotectInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.reprotect(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, reprotectInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reprotectWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ReverseReplicationInput reprotectInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (reprotectInput == null) { - return Mono.error(new IllegalArgumentException("Parameter reprotectInput is required and cannot be null.")); - } else { - reprotectInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.reprotect(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, reprotectInput, accept, context); - } - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> beginReprotectAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, ReverseReplicationInput reprotectInput) { - Mono>> mono = reprotectWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, reprotectInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> beginReprotectAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, ReverseReplicationInput reprotectInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = reprotectWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, reprotectInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginReprotect( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, ReverseReplicationInput reprotectInput) { - return this - .beginReprotectAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, reprotectInput) - .getSyncPoller(); - } - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginReprotect( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, ReverseReplicationInput reprotectInput, Context context) { - return this - .beginReprotectAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, reprotectInput, context) - .getSyncPoller(); - } - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reprotectAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ReverseReplicationInput reprotectInput) { - return beginReprotectAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, reprotectInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reprotectAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ReverseReplicationInput reprotectInput, Context context) { - return beginReprotectAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, reprotectInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner reprotect(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInput reprotectInput) { - return reprotectAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, reprotectInput).block(); - } - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner reprotect(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInput reprotectInput, - Context context) { - return reprotectAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, reprotectInput, context).block(); - } - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resolveHealthErrorsWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ResolveHealthInput resolveHealthInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (resolveHealthInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter resolveHealthInput is required and cannot be null.")); - } else { - resolveHealthInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.resolveHealthErrors(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, resolveHealthInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resolveHealthErrorsWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ResolveHealthInput resolveHealthInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (resolveHealthInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter resolveHealthInput is required and cannot be null.")); - } else { - resolveHealthInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resolveHealthErrors(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, resolveHealthInput, accept, context); - } - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginResolveHealthErrorsAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ResolveHealthInput resolveHealthInput) { - Mono>> mono = resolveHealthErrorsWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, resolveHealthInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginResolveHealthErrorsAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ResolveHealthInput resolveHealthInput, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resolveHealthErrorsWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, resolveHealthInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> - beginResolveHealthErrors(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ResolveHealthInput resolveHealthInput) { - return this - .beginResolveHealthErrorsAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, resolveHealthInput) - .getSyncPoller(); - } - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> - beginResolveHealthErrors(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ResolveHealthInput resolveHealthInput, - Context context) { - return this - .beginResolveHealthErrorsAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, resolveHealthInput, context) - .getSyncPoller(); - } - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resolveHealthErrorsAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ResolveHealthInput resolveHealthInput) { - return beginResolveHealthErrorsAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, resolveHealthInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resolveHealthErrorsAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ResolveHealthInput resolveHealthInput, Context context) { - return beginResolveHealthErrorsAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, resolveHealthInput, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner resolveHealthErrors(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ResolveHealthInput resolveHealthInput) { - return resolveHealthErrorsAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, resolveHealthInput).block(); - } - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner resolveHealthErrors(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ResolveHealthInput resolveHealthInput, Context context) { - return resolveHealthErrorsAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, resolveHealthInput, context).block(); - } - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> switchProviderWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - SwitchProviderInput switchProviderInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (switchProviderInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter switchProviderInput is required and cannot be null.")); - } else { - switchProviderInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.switchProvider(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, switchProviderInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> switchProviderWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - SwitchProviderInput switchProviderInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (switchProviderInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter switchProviderInput is required and cannot be null.")); - } else { - switchProviderInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.switchProvider(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, switchProviderInput, accept, context); - } - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginSwitchProviderAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - SwitchProviderInput switchProviderInput) { - Mono>> mono = switchProviderWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, switchProviderInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginSwitchProviderAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, SwitchProviderInput switchProviderInput, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = switchProviderWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, switchProviderInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginSwitchProvider( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, SwitchProviderInput switchProviderInput) { - return this - .beginSwitchProviderAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, switchProviderInput) - .getSyncPoller(); - } - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginSwitchProvider( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, SwitchProviderInput switchProviderInput, Context context) { - return this - .beginSwitchProviderAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, switchProviderInput, context) - .getSyncPoller(); - } - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono switchProviderAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - SwitchProviderInput switchProviderInput) { - return beginSwitchProviderAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, switchProviderInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono switchProviderAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - SwitchProviderInput switchProviderInput, Context context) { - return beginSwitchProviderAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, switchProviderInput, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner switchProvider(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - SwitchProviderInput switchProviderInput) { - return switchProviderAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, switchProviderInput).block(); - } - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner switchProvider(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - SwitchProviderInput switchProviderInput, Context context) { - return switchProviderAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, switchProviderInput, context).block(); - } - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testFailoverWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - TestFailoverInput testfailoverInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (testfailoverInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter testfailoverInput is required and cannot be null.")); - } else { - testfailoverInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.testFailover(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, testfailoverInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testFailoverWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - TestFailoverInput testfailoverInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (testfailoverInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter testfailoverInput is required and cannot be null.")); - } else { - testfailoverInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.testFailover(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, testfailoverInput, accept, context); - } - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> beginTestFailoverAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, TestFailoverInput testfailoverInput) { - Mono>> mono = testFailoverWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, testfailoverInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> beginTestFailoverAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, TestFailoverInput testfailoverInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = testFailoverWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, testfailoverInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginTestFailover( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, TestFailoverInput testfailoverInput) { - return this - .beginTestFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, testfailoverInput) - .getSyncPoller(); - } - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginTestFailover( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, TestFailoverInput testfailoverInput, Context context) { - return this - .beginTestFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, testfailoverInput, context) - .getSyncPoller(); - } - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testFailoverAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - TestFailoverInput testfailoverInput) { - return beginTestFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, testfailoverInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testFailoverAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - TestFailoverInput testfailoverInput, Context context) { - return beginTestFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, testfailoverInput, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner testFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverInput testfailoverInput) { - return testFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, testfailoverInput).block(); - } - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner testFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverInput testfailoverInput, - Context context) { - return testFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, testfailoverInput, context).block(); - } - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testFailoverCleanupWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - TestFailoverCleanupInput cleanupInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (cleanupInput == null) { - return Mono.error(new IllegalArgumentException("Parameter cleanupInput is required and cannot be null.")); - } else { - cleanupInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.testFailoverCleanup(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, cleanupInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testFailoverCleanupWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - TestFailoverCleanupInput cleanupInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (cleanupInput == null) { - return Mono.error(new IllegalArgumentException("Parameter cleanupInput is required and cannot be null.")); - } else { - cleanupInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.testFailoverCleanup(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, cleanupInput, accept, context); - } - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginTestFailoverCleanupAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput) { - Mono>> mono = testFailoverCleanupWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, cleanupInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginTestFailoverCleanupAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = testFailoverCleanupWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, cleanupInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> - beginTestFailoverCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput) { - return this - .beginTestFailoverCleanupAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, cleanupInput) - .getSyncPoller(); - } - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> - beginTestFailoverCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput, - Context context) { - return this - .beginTestFailoverCleanupAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, cleanupInput, context) - .getSyncPoller(); - } - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testFailoverCleanupAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - TestFailoverCleanupInput cleanupInput) { - return beginTestFailoverCleanupAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, cleanupInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testFailoverCleanupAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - TestFailoverCleanupInput cleanupInput, Context context) { - return beginTestFailoverCleanupAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, cleanupInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner testFailoverCleanup(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - TestFailoverCleanupInput cleanupInput) { - return testFailoverCleanupAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, cleanupInput).block(); - } - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner testFailoverCleanup(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - TestFailoverCleanupInput cleanupInput, Context context) { - return testFailoverCleanupAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, cleanupInput, context).block(); - } - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> unplannedFailoverWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UnplannedFailoverInput failoverInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (failoverInput == null) { - return Mono.error(new IllegalArgumentException("Parameter failoverInput is required and cannot be null.")); - } else { - failoverInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.unplannedFailover(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> unplannedFailoverWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UnplannedFailoverInput failoverInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (failoverInput == null) { - return Mono.error(new IllegalArgumentException("Parameter failoverInput is required and cannot be null.")); - } else { - failoverInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.unplannedFailover(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, accept, context); - } - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginUnplannedFailoverAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInput failoverInput) { - Mono>> mono = unplannedFailoverWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginUnplannedFailoverAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInput failoverInput, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = unplannedFailoverWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginUnplannedFailover( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UnplannedFailoverInput failoverInput) { - return this - .beginUnplannedFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput) - .getSyncPoller(); - } - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginUnplannedFailover( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UnplannedFailoverInput failoverInput, Context context) { - return this - .beginUnplannedFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, context) - .getSyncPoller(); - } - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono unplannedFailoverAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UnplannedFailoverInput failoverInput) { - return beginUnplannedFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono unplannedFailoverAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UnplannedFailoverInput failoverInput, Context context) { - return beginUnplannedFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner unplannedFailover(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UnplannedFailoverInput failoverInput) { - return unplannedFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput).block(); - } - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner unplannedFailover(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UnplannedFailoverInput failoverInput, Context context) { - return unplannedFailoverAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, context).block(); - } - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateApplianceWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (applianceUpdateInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter applianceUpdateInput is required and cannot be null.")); - } else { - applianceUpdateInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.updateAppliance(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, applianceUpdateInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateApplianceWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (applianceUpdateInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter applianceUpdateInput is required and cannot be null.")); - } else { - applianceUpdateInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAppliance(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, applianceUpdateInput, accept, context); - } - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginUpdateApplianceAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput) { - Mono>> mono = updateApplianceWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, applianceUpdateInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginUpdateApplianceAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateApplianceWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, applianceUpdateInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginUpdateAppliance( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput) { - return this - .beginUpdateApplianceAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applianceUpdateInput) - .getSyncPoller(); - } - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> beginUpdateAppliance( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput, - Context context) { - return this - .beginUpdateApplianceAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applianceUpdateInput, context) - .getSyncPoller(); - } - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateApplianceAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput) { - return beginUpdateApplianceAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applianceUpdateInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateApplianceAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput, Context context) { - return beginUpdateApplianceAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applianceUpdateInput, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner updateAppliance(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput) { - return updateApplianceAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applianceUpdateInput).block(); - } - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner updateAppliance(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput, Context context) { - return updateApplianceAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applianceUpdateInput, context).block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateMobilityServiceWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (updateMobilityServiceRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter updateMobilityServiceRequest is required and cannot be null.")); - } else { - updateMobilityServiceRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.updateMobilityService(this.client.getEndpoint(), - this.client.getApiVersion(), resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, - protectionContainerName, replicatedProtectedItemName, updateMobilityServiceRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateMobilityServiceWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - if (updateMobilityServiceRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter updateMobilityServiceRequest is required and cannot be null.")); - } else { - updateMobilityServiceRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateMobilityService(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, updateMobilityServiceRequest, accept, context); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginUpdateMobilityServiceAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest) { - Mono>> mono = updateMobilityServiceWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, updateMobilityServiceRequest); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - this.client.getContext()); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationProtectedItemInner> - beginUpdateMobilityServiceAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateMobilityServiceWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, replicatedProtectedItemName, updateMobilityServiceRequest, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ReplicationProtectedItemInner.class, ReplicationProtectedItemInner.class, - context); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> - beginUpdateMobilityService(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest) { - return this - .beginUpdateMobilityServiceAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateMobilityServiceRequest) - .getSyncPoller(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of replication protected item. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationProtectedItemInner> - beginUpdateMobilityService(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest, Context context) { - return this - .beginUpdateMobilityServiceAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateMobilityServiceRequest, context) - .getSyncPoller(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateMobilityServiceAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest) { - return beginUpdateMobilityServiceAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateMobilityServiceRequest).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateMobilityServiceAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest, Context context) { - return beginUpdateMobilityServiceAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateMobilityServiceRequest, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner updateMobilityService(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest) { - return updateMobilityServiceAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateMobilityServiceRequest).block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectedItemInner updateMobilityService(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest, Context context) { - return updateMobilityServiceAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateMobilityServiceRequest, context).block(); - } - - /** - * Gets the list of replication protected items. - * - * Gets the list of ASR replication protected items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the vault along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName, String skipToken, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), skipToken, filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of replication protected items. - * - * Gets the list of ASR replication protected items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the vault along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName, String skipToken, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), skipToken, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of replication protected items. - * - * Gets the list of ASR replication protected items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, - String skipToken, String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, skipToken, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of replication protected items. - * - * Gets the list of ASR replication protected items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - final String skipToken = null; - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, skipToken, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of replication protected items. - * - * Gets the list of ASR replication protected items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the vault as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, - String skipToken, String filter, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, skipToken, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of replication protected items. - * - * Gets the list of ASR replication protected items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - final String skipToken = null; - final String filter = null; - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, skipToken, filter)); - } - - /** - * Gets the list of replication protected items. - * - * Gets the list of ASR replication protected items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, - String skipToken, String filter, Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, skipToken, filter, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item collection along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationProtectionContainersNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationProtectionContainersNext(nextLink, - this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item collection along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationProtectionContainersNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationProtectionContainersNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item collection along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item collection along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectedItemsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectedItemsImpl.java deleted file mode 100644 index 23fd93b0f288..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectedItemsImpl.java +++ /dev/null @@ -1,574 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectedItemsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectedItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplyRecoveryPointInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItems; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReverseReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateApplianceForReplicationProtectedItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMobilityServiceRequest; - -public final class ReplicationProtectedItemsImpl implements ReplicationProtectedItems { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationProtectedItemsImpl.class); - - private final ReplicationProtectedItemsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationProtectedItemsImpl(ReplicationProtectedItemsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - PagedIterable inner = this.serviceClient() - .listByReplicationProtectionContainers(resourceName, resourceGroupName, fabricName, - protectionContainerName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicationProtectedItemImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, Context context) { - PagedIterable inner = this.serviceClient() - .listByReplicationProtectionContainers(resourceName, resourceGroupName, fabricName, protectionContainerName, - context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicationProtectedItemImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ReplicationProtectedItemImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ReplicationProtectedItem get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName) { - ReplicationProtectedItemInner inner = this.serviceClient() - .get(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - this.serviceClient() - .purge(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName); - } - - public void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, Context context) { - this.serviceClient() - .purge(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - context); - } - - public ReplicationProtectedItem addDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, AddDisksInput addDisksInput) { - ReplicationProtectedItemInner inner = this.serviceClient() - .addDisks(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - addDisksInput); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem addDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, AddDisksInput addDisksInput, - Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .addDisks(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - addDisksInput, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem applyRecoveryPoint(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput) { - ReplicationProtectedItemInner inner = this.serviceClient() - .applyRecoveryPoint(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applyRecoveryPointInput); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem applyRecoveryPoint(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput, Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .applyRecoveryPoint(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applyRecoveryPointInput, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem failoverCancel(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName) { - ReplicationProtectedItemInner inner = this.serviceClient() - .failoverCancel(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem failoverCancel(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .failoverCancel(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem failoverCommit(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName) { - ReplicationProtectedItemInner inner = this.serviceClient() - .failoverCommit(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem failoverCommit(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .failoverCommit(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem plannedFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInput failoverInput) { - ReplicationProtectedItemInner inner = this.serviceClient() - .plannedFailover(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem plannedFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInput failoverInput, - Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .plannedFailover(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, DisableProtectionInput disableProtectionInput) { - this.serviceClient() - .delete(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - disableProtectionInput); - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, DisableProtectionInput disableProtectionInput, Context context) { - this.serviceClient() - .delete(resourceName, resourceGroupName, fabricName, protectionContainerName, replicatedProtectedItemName, - disableProtectionInput, context); - } - - public ReplicationProtectedItem removeDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, RemoveDisksInput removeDisksInput) { - ReplicationProtectedItemInner inner = this.serviceClient() - .removeDisks(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, removeDisksInput); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem removeDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, RemoveDisksInput removeDisksInput, - Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .removeDisks(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, removeDisksInput, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem repairReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName) { - ReplicationProtectedItemInner inner = this.serviceClient() - .repairReplication(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem repairReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .repairReplication(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem reprotect(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInput reprotectInput) { - ReplicationProtectedItemInner inner = this.serviceClient() - .reprotect(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, reprotectInput); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem reprotect(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInput reprotectInput, - Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .reprotect(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, reprotectInput, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem resolveHealthErrors(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ResolveHealthInput resolveHealthInput) { - ReplicationProtectedItemInner inner = this.serviceClient() - .resolveHealthErrors(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, resolveHealthInput); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem resolveHealthErrors(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - ResolveHealthInput resolveHealthInput, Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .resolveHealthErrors(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, resolveHealthInput, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem switchProvider(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, SwitchProviderInput switchProviderInput) { - ReplicationProtectedItemInner inner = this.serviceClient() - .switchProvider(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, switchProviderInput); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem switchProvider(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, SwitchProviderInput switchProviderInput, - Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .switchProvider(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, switchProviderInput, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem testFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverInput testfailoverInput) { - ReplicationProtectedItemInner inner = this.serviceClient() - .testFailover(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, testfailoverInput); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem testFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverInput testfailoverInput, - Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .testFailover(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, testfailoverInput, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem testFailoverCleanup(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - TestFailoverCleanupInput cleanupInput) { - ReplicationProtectedItemInner inner = this.serviceClient() - .testFailoverCleanup(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, cleanupInput); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem testFailoverCleanup(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - TestFailoverCleanupInput cleanupInput, Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .testFailoverCleanup(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, cleanupInput, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem unplannedFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInput failoverInput) { - ReplicationProtectedItemInner inner = this.serviceClient() - .unplannedFailover(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem unplannedFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInput failoverInput, - Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .unplannedFailover(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, failoverInput, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem updateAppliance(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput) { - ReplicationProtectedItemInner inner = this.serviceClient() - .updateAppliance(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applianceUpdateInput); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem updateAppliance(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput, Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .updateAppliance(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, applianceUpdateInput, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem updateMobilityService(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest) { - ReplicationProtectedItemInner inner = this.serviceClient() - .updateMobilityService(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateMobilityServiceRequest); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectedItem updateMobilityService(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest, Context context) { - ReplicationProtectedItemInner inner = this.serviceClient() - .updateMobilityService(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, updateMobilityServiceRequest, context); - if (inner != null) { - return new ReplicationProtectedItemImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicationProtectedItemImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, String skipToken, - String filter, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceName, resourceGroupName, skipToken, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicationProtectedItemImpl(inner1, this.manager())); - } - - public ReplicationProtectedItem getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionContainers"); - if (protectionContainerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionContainers'.", id))); - } - String replicatedProtectedItemName = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectedItems"); - if (replicatedProtectedItemName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationProtectedItems'.", id))); - } - return this - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionContainers"); - if (protectionContainerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionContainers'.", id))); - } - String replicatedProtectedItemName = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectedItems"); - if (replicatedProtectedItemName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationProtectedItems'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context); - } - - private ReplicationProtectedItemsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public ReplicationProtectedItemImpl define(String name) { - return new ReplicationProtectedItemImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainerMappingsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainerMappingsClientImpl.java deleted file mode 100644 index c38a684ffac9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainerMappingsClientImpl.java +++ /dev/null @@ -1,2043 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectionContainerMappingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerMappingCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveProtectionContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateProtectionContainerMappingInput; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * ReplicationProtectionContainerMappingsClient. - */ -public final class ReplicationProtectionContainerMappingsClientImpl - implements ReplicationProtectionContainerMappingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationProtectionContainerMappingsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationProtectionContainerMappingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationProtectionContainerMappingsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationProtectionContainerMappingsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationProtectionContainerMappings to - * be used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationProtectionContainerMappingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationProtectionContainers( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("resourceName") String resourceName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("mappingName") String mappingName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("mappingName") String mappingName, - @BodyParam("application/json") CreateProtectionContainerMappingInput creationInput, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> purge(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("mappingName") String mappingName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("mappingName") String mappingName, - @BodyParam("application/json") UpdateProtectionContainerMappingInput updateInput, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}/remove") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("mappingName") String mappingName, - @BodyParam("application/json") RemoveProtectionContainerMappingInput removalInput, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainerMappings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationProtectionContainersNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of protection container mappings for a protection container. - * - * Lists the protection container mappings for a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectionContainersSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationProtectionContainers(this.client.getEndpoint(), - this.client.getApiVersion(), resourceName, resourceGroupName, this.client.getSubscriptionId(), - fabricName, protectionContainerName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of protection container mappings for a protection container. - * - * Lists the protection container mappings for a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectionContainersSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationProtectionContainers(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of protection container mappings for a protection container. - * - * Lists the protection container mappings for a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectionContainersAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - return new PagedFlux<>( - () -> listByReplicationProtectionContainersSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName), - nextLink -> listByReplicationProtectionContainersNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of protection container mappings for a protection container. - * - * Lists the protection container mappings for a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectionContainersAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, Context context) { - return new PagedFlux<>( - () -> listByReplicationProtectionContainersSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, context), - nextLink -> listByReplicationProtectionContainersNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of protection container mappings for a protection container. - * - * Lists the protection container mappings for a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - return new PagedIterable<>(listByReplicationProtectionContainersAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName)); - } - - /** - * Gets the list of protection container mappings for a protection container. - * - * Lists the protection container mappings for a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, Context context) { - return new PagedIterable<>(listByReplicationProtectionContainersAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, context)); - } - - /** - * Gets a protection container mapping. - * - * Gets the details of a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection Container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container mapping along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String mappingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (mappingName == null) { - return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a protection container mapping. - * - * Gets the details of a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection Container mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container mapping along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String mappingName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (mappingName == null) { - return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, accept, context); - } - - /** - * Gets a protection container mapping. - * - * Gets the details of a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection Container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container mapping on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a protection container mapping. - * - * Gets the details of a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection Container mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container mapping along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - context).block(); - } - - /** - * Gets a protection container mapping. - * - * Gets the details of a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection Container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container mapping. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectionContainerMappingInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - Context.NONE).getValue(); - } - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - CreateProtectionContainerMappingInput creationInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (mappingName == null) { - return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null.")); - } - if (creationInput == null) { - return Mono.error(new IllegalArgumentException("Parameter creationInput is required and cannot be null.")); - } else { - creationInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, - creationInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - CreateProtectionContainerMappingInput creationInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (mappingName == null) { - return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null.")); - } - if (creationInput == null) { - return Mono.error(new IllegalArgumentException("Parameter creationInput is required and cannot be null.")); - } else { - creationInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, creationInput, accept, - context); - } - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProtectionContainerMappingInner> beginCreateAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, CreateProtectionContainerMappingInput creationInput) { - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, mappingName, creationInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ProtectionContainerMappingInner.class, ProtectionContainerMappingInner.class, - this.client.getContext()); - } - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProtectionContainerMappingInner> beginCreateAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, CreateProtectionContainerMappingInput creationInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, mappingName, creationInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ProtectionContainerMappingInner.class, ProtectionContainerMappingInner.class, - context); - } - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProtectionContainerMappingInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, CreateProtectionContainerMappingInput creationInput) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - creationInput) - .getSyncPoller(); - } - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProtectionContainerMappingInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, CreateProtectionContainerMappingInput creationInput, Context context) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - creationInput, context) - .getSyncPoller(); - } - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - CreateProtectionContainerMappingInput creationInput) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - creationInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - CreateProtectionContainerMappingInput creationInput, Context context) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - creationInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectionContainerMappingInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, CreateProtectionContainerMappingInput creationInput) { - return createAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - creationInput).block(); - } - - /** - * Create protection container mapping. - * - * The operation to create a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param creationInput Mapping creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectionContainerMappingInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, CreateProtectionContainerMappingInput creationInput, - Context context) { - return createAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - creationInput, context).block(); - } - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> purgeWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (mappingName == null) { - return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.purge(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> purgeWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (mappingName == null) { - return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.purge(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, context); - } - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPurgeAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName) { - Mono>> mono - = purgeWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPurgeAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = purgeWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, mappingName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName) { - return this.beginPurgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName) - .getSyncPoller(); - } - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, Context context) { - return this - .beginPurgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, context) - .getSyncPoller(); - } - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono purgeAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName) { - return beginPurgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono purgeAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, Context context) { - return beginPurgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName) { - purgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName).block(); - } - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, Context context) { - purgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, context).block(); - } - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - UpdateProtectionContainerMappingInput updateInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (mappingName == null) { - return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null.")); - } - if (updateInput == null) { - return Mono.error(new IllegalArgumentException("Parameter updateInput is required and cannot be null.")); - } else { - updateInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, - updateInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - UpdateProtectionContainerMappingInput updateInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (mappingName == null) { - return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null.")); - } - if (updateInput == null) { - return Mono.error(new IllegalArgumentException("Parameter updateInput is required and cannot be null.")); - } else { - updateInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, updateInput, accept, - context); - } - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProtectionContainerMappingInner> beginUpdateAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, UpdateProtectionContainerMappingInput updateInput) { - Mono>> mono = updateWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, mappingName, updateInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ProtectionContainerMappingInner.class, ProtectionContainerMappingInner.class, - this.client.getContext()); - } - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProtectionContainerMappingInner> beginUpdateAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, UpdateProtectionContainerMappingInput updateInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, mappingName, updateInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ProtectionContainerMappingInner.class, ProtectionContainerMappingInner.class, - context); - } - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProtectionContainerMappingInner> beginUpdate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, UpdateProtectionContainerMappingInput updateInput) { - return this - .beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - updateInput) - .getSyncPoller(); - } - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProtectionContainerMappingInner> beginUpdate( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, UpdateProtectionContainerMappingInput updateInput, Context context) { - return this - .beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - updateInput, context) - .getSyncPoller(); - } - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - UpdateProtectionContainerMappingInput updateInput) { - return beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - updateInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - UpdateProtectionContainerMappingInput updateInput, Context context) { - return beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - updateInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectionContainerMappingInner update(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, UpdateProtectionContainerMappingInput updateInput) { - return updateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - updateInput).block(); - } - - /** - * Update protection container mapping. - * - * The operation to update protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param updateInput Mapping update input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectionContainerMappingInner update(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, UpdateProtectionContainerMappingInput updateInput, - Context context) { - return updateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - updateInput, context).block(); - } - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - RemoveProtectionContainerMappingInput removalInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (mappingName == null) { - return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null.")); - } - if (removalInput == null) { - return Mono.error(new IllegalArgumentException("Parameter removalInput is required and cannot be null.")); - } else { - removalInput.validate(); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, - removalInput, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - RemoveProtectionContainerMappingInput removalInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (mappingName == null) { - return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null.")); - } - if (removalInput == null) { - return Mono.error(new IllegalArgumentException("Parameter removalInput is required and cannot be null.")); - } else { - removalInput.validate(); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, removalInput, context); - } - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - RemoveProtectionContainerMappingInput removalInput) { - Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, mappingName, removalInput); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - RemoveProtectionContainerMappingInput removalInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, mappingName, removalInput, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - RemoveProtectionContainerMappingInput removalInput) { - return this - .beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - removalInput) - .getSyncPoller(); - } - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, - RemoveProtectionContainerMappingInput removalInput, Context context) { - return this - .beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - removalInput, context) - .getSyncPoller(); - } - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInput removalInput) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - removalInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInput removalInput, - Context context) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - removalInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, RemoveProtectionContainerMappingInput removalInput) { - deleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, removalInput) - .block(); - } - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, RemoveProtectionContainerMappingInput removalInput, Context context) { - deleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, removalInput, - context).block(); - } - - /** - * Gets the list of all protection container mappings in a vault. - * - * Lists the protection container mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of all protection container mappings in a vault. - * - * Lists the protection container mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of all protection container mappings in a vault. - * - * Lists the protection container mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of all protection container mappings in a vault. - * - * Lists the protection container mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of all protection container mappings in a vault. - * - * Lists the protection container mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * Gets the list of all protection container mappings in a vault. - * - * Lists the protection container mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, - Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationProtectionContainersNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationProtectionContainersNext(nextLink, - this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationProtectionContainersNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationProtectionContainersNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainerMappingsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainerMappingsImpl.java deleted file mode 100644 index 5e797af8c7e1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainerMappingsImpl.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectionContainerMappingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerMapping; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveProtectionContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionContainerMappings; - -public final class ReplicationProtectionContainerMappingsImpl implements ReplicationProtectionContainerMappings { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationProtectionContainerMappingsImpl.class); - - private final ReplicationProtectionContainerMappingsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationProtectionContainerMappingsImpl(ReplicationProtectionContainerMappingsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName) { - PagedIterable inner = this.serviceClient() - .listByReplicationProtectionContainers(resourceName, resourceGroupName, fabricName, - protectionContainerName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ProtectionContainerMappingImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, Context context) { - PagedIterable inner = this.serviceClient() - .listByReplicationProtectionContainers(resourceName, resourceGroupName, fabricName, protectionContainerName, - context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ProtectionContainerMappingImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ProtectionContainerMappingImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ProtectionContainerMapping get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName) { - ProtectionContainerMappingInner inner = this.serviceClient() - .get(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName); - if (inner != null) { - return new ProtectionContainerMappingImpl(inner, this.manager()); - } else { - return null; - } - } - - public void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName) { - this.serviceClient().purge(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName); - } - - public void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, Context context) { - this.serviceClient() - .purge(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, context); - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, RemoveProtectionContainerMappingInput removalInput) { - this.serviceClient() - .delete(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, removalInput); - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, RemoveProtectionContainerMappingInput removalInput, Context context) { - this.serviceClient() - .delete(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, removalInput, - context); - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner - = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ProtectionContainerMappingImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ProtectionContainerMappingImpl(inner1, this.manager())); - } - - public ProtectionContainerMapping getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionContainers"); - if (protectionContainerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionContainers'.", id))); - } - String mappingName = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionContainerMappings"); - if (mappingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionContainerMappings'.", - id))); - } - return this - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionContainers"); - if (protectionContainerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionContainers'.", id))); - } - String mappingName = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionContainerMappings"); - if (mappingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionContainerMappings'.", - id))); - } - return this.getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, - context); - } - - private ReplicationProtectionContainerMappingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public ProtectionContainerMappingImpl define(String name) { - return new ProtectionContainerMappingImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainersClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainersClientImpl.java deleted file mode 100644 index e226312a910f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainersClientImpl.java +++ /dev/null @@ -1,1936 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectionContainersClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiscoverProtectableItemRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionInput; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationProtectionContainersClient. - */ -public final class ReplicationProtectionContainersClientImpl implements ReplicationProtectionContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationProtectionContainersService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationProtectionContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationProtectionContainersClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationProtectionContainersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationProtectionContainers to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationProtectionContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationFabrics(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @BodyParam("application/json") CreateProtectionContainerInput creationInput, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/discoverProtectableItem") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> discoverProtectableItem(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @BodyParam("application/json") DiscoverProtectableItemRequest discoverProtectableItemRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/remove") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/switchprotection") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> switchProtection(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @BodyParam("application/json") SwitchProtectionInput switchInput, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationFabricsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of protection container for a fabric. - * - * Lists the protection containers in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of protection container for a fabric. - * - * Lists the protection containers in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of protection container for a fabric. - * - * Lists the protection containers in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationFabricsAsync(String resourceName, - String resourceGroupName, String fabricName) { - return new PagedFlux<>( - () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName), - nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of protection container for a fabric. - * - * Lists the protection containers in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationFabricsAsync(String resourceName, - String resourceGroupName, String fabricName, Context context) { - return new PagedFlux<>( - () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName, context), - nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of protection container for a fabric. - * - * Lists the protection containers in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationFabrics(String resourceName, - String resourceGroupName, String fabricName) { - return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName)); - } - - /** - * Gets the list of protection container for a fabric. - * - * Lists the protection containers in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationFabrics(String resourceName, - String resourceGroupName, String fabricName, Context context) { - return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName, context)); - } - - /** - * Gets the protection container details. - * - * Gets the details of a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the protection container details. - * - * Gets the details of a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, accept, context); - } - - /** - * Gets the protection container details. - * - * Gets the details of a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the protection container details. - * - * Gets the details of a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, context) - .block(); - } - - /** - * Gets the protection container details. - * - * Gets the details of a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectionContainerInner get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, Context.NONE) - .getValue(); - } - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, CreateProtectionContainerInput creationInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (creationInput == null) { - return Mono.error(new IllegalArgumentException("Parameter creationInput is required and cannot be null.")); - } else { - creationInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, creationInput, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, CreateProtectionContainerInput creationInput, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (creationInput == null) { - return Mono.error(new IllegalArgumentException("Parameter creationInput is required and cannot be null.")); - } else { - creationInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, creationInput, accept, context); - } - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProtectionContainerInner> beginCreateAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - CreateProtectionContainerInput creationInput) { - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, creationInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ProtectionContainerInner.class, ProtectionContainerInner.class, - this.client.getContext()); - } - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProtectionContainerInner> beginCreateAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - CreateProtectionContainerInput creationInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, creationInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ProtectionContainerInner.class, ProtectionContainerInner.class, context); - } - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProtectionContainerInner> beginCreate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - CreateProtectionContainerInput creationInput) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, creationInput) - .getSyncPoller(); - } - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProtectionContainerInner> beginCreate(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - CreateProtectionContainerInput creationInput, Context context) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, creationInput, - context) - .getSyncPoller(); - } - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, CreateProtectionContainerInput creationInput) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, creationInput) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, CreateProtectionContainerInput creationInput, Context context) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, creationInput, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectionContainerInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, CreateProtectionContainerInput creationInput) { - return createAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, creationInput).block(); - } - - /** - * Create a protection container. - * - * Operation to create a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param creationInput Creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectionContainerInner create(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, CreateProtectionContainerInput creationInput, Context context) { - return createAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, creationInput, context) - .block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> discoverProtectableItemWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - DiscoverProtectableItemRequest discoverProtectableItemRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (discoverProtectableItemRequest == null) { - return Mono.error(new IllegalArgumentException( - "Parameter discoverProtectableItemRequest is required and cannot be null.")); - } else { - discoverProtectableItemRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.discoverProtectableItem(this.client.getEndpoint(), - this.client.getApiVersion(), resourceName, resourceGroupName, this.client.getSubscriptionId(), - fabricName, protectionContainerName, discoverProtectableItemRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> discoverProtectableItemWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - DiscoverProtectableItemRequest discoverProtectableItemRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (discoverProtectableItemRequest == null) { - return Mono.error(new IllegalArgumentException( - "Parameter discoverProtectableItemRequest is required and cannot be null.")); - } else { - discoverProtectableItemRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.discoverProtectableItem(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - discoverProtectableItemRequest, accept, context); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProtectionContainerInner> - beginDiscoverProtectableItemAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest) { - Mono>> mono = discoverProtectableItemWithResponseAsync(resourceName, - resourceGroupName, fabricName, protectionContainerName, discoverProtectableItemRequest); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ProtectionContainerInner.class, ProtectionContainerInner.class, - this.client.getContext()); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProtectionContainerInner> - beginDiscoverProtectableItemAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = discoverProtectableItemWithResponseAsync(resourceName, - resourceGroupName, fabricName, protectionContainerName, discoverProtectableItemRequest, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ProtectionContainerInner.class, ProtectionContainerInner.class, context); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProtectionContainerInner> beginDiscoverProtectableItem( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - DiscoverProtectableItemRequest discoverProtectableItemRequest) { - return this - .beginDiscoverProtectableItemAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - discoverProtectableItemRequest) - .getSyncPoller(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProtectionContainerInner> beginDiscoverProtectableItem( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - DiscoverProtectableItemRequest discoverProtectableItemRequest, Context context) { - return this - .beginDiscoverProtectableItemAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - discoverProtectableItemRequest, context) - .getSyncPoller(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono discoverProtectableItemAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, - DiscoverProtectableItemRequest discoverProtectableItemRequest) { - return beginDiscoverProtectableItemAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - discoverProtectableItemRequest).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono discoverProtectableItemAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, - DiscoverProtectableItemRequest discoverProtectableItemRequest, Context context) { - return beginDiscoverProtectableItemAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - discoverProtectableItemRequest, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectionContainerInner discoverProtectableItem(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, - DiscoverProtectableItemRequest discoverProtectableItemRequest) { - return discoverProtectableItemAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - discoverProtectableItemRequest).block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectionContainerInner discoverProtectableItem(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, - DiscoverProtectableItemRequest discoverProtectableItemRequest, Context context) { - return discoverProtectableItemAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - discoverProtectableItemRequest, context).block(); - } - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, protectionContainerName, context); - } - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName) { - Mono>> mono - = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName) { - return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName) - .getSyncPoller(); - } - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, Context context) { - return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, context) - .getSyncPoller(); - } - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, Context context) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName) { - deleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName).block(); - } - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - Context context) { - deleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, context).block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> switchProtectionWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - SwitchProtectionInput switchInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (switchInput == null) { - return Mono.error(new IllegalArgumentException("Parameter switchInput is required and cannot be null.")); - } else { - switchInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.switchProtection(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - switchInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> switchProtectionWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, SwitchProtectionInput switchInput, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (switchInput == null) { - return Mono.error(new IllegalArgumentException("Parameter switchInput is required and cannot be null.")); - } else { - switchInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.switchProtection(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, switchInput, - accept, context); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProtectionContainerInner> beginSwitchProtectionAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - SwitchProtectionInput switchInput) { - Mono>> mono = switchProtectionWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, switchInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ProtectionContainerInner.class, ProtectionContainerInner.class, - this.client.getContext()); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProtectionContainerInner> beginSwitchProtectionAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - SwitchProtectionInput switchInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = switchProtectionWithResponseAsync(resourceName, resourceGroupName, - fabricName, protectionContainerName, switchInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ProtectionContainerInner.class, ProtectionContainerInner.class, context); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProtectionContainerInner> beginSwitchProtection( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - SwitchProtectionInput switchInput) { - return this - .beginSwitchProtectionAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - switchInput) - .getSyncPoller(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of protection container details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProtectionContainerInner> beginSwitchProtection( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - SwitchProtectionInput switchInput, Context context) { - return this - .beginSwitchProtectionAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - switchInput, context) - .getSyncPoller(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono switchProtectionAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, SwitchProtectionInput switchInput) { - return beginSwitchProtectionAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - switchInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono switchProtectionAsync(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, SwitchProtectionInput switchInput, Context context) { - return beginSwitchProtectionAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, - switchInput, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectionContainerInner switchProtection(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, SwitchProtectionInput switchInput) { - return switchProtectionAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, switchInput) - .block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProtectionContainerInner switchProtection(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, SwitchProtectionInput switchInput, Context context) { - return switchProtectionAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, switchInput, - context).block(); - } - - /** - * Gets the list of all protection containers in a vault. - * - * Lists the protection containers in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of all protection containers in a vault. - * - * Lists the protection containers in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of all protection containers in a vault. - * - * Lists the protection containers in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of all protection containers in a vault. - * - * Lists the protection containers in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of all protection containers in a vault. - * - * Lists the protection containers in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * Gets the list of all protection containers in a vault. - * - * Lists the protection containers in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, - Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainersImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainersImpl.java deleted file mode 100644 index 0332d11d8480..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainersImpl.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectionContainersClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiscoverProtectableItemRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainer; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionContainers; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionInput; - -public final class ReplicationProtectionContainersImpl implements ReplicationProtectionContainers { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationProtectionContainersImpl.class); - - private final ReplicationProtectionContainersClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationProtectionContainersImpl(ReplicationProtectionContainersClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName) { - PagedIterable inner - = this.serviceClient().listByReplicationFabrics(resourceName, resourceGroupName, fabricName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ProtectionContainerImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context) { - PagedIterable inner - = this.serviceClient().listByReplicationFabrics(resourceName, resourceGroupName, fabricName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ProtectionContainerImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ProtectionContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ProtectionContainer get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName) { - ProtectionContainerInner inner - = this.serviceClient().get(resourceName, resourceGroupName, fabricName, protectionContainerName); - if (inner != null) { - return new ProtectionContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public ProtectionContainer discoverProtectableItem(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest) { - ProtectionContainerInner inner = this.serviceClient() - .discoverProtectableItem(resourceName, resourceGroupName, fabricName, protectionContainerName, - discoverProtectableItemRequest); - if (inner != null) { - return new ProtectionContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public ProtectionContainer discoverProtectableItem(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest, - Context context) { - ProtectionContainerInner inner = this.serviceClient() - .discoverProtectableItem(resourceName, resourceGroupName, fabricName, protectionContainerName, - discoverProtectableItemRequest, context); - if (inner != null) { - return new ProtectionContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName) { - this.serviceClient().delete(resourceName, resourceGroupName, fabricName, protectionContainerName); - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - Context context) { - this.serviceClient().delete(resourceName, resourceGroupName, fabricName, protectionContainerName, context); - } - - public ProtectionContainer switchProtection(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, SwitchProtectionInput switchInput) { - ProtectionContainerInner inner = this.serviceClient() - .switchProtection(resourceName, resourceGroupName, fabricName, protectionContainerName, switchInput); - if (inner != null) { - return new ProtectionContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public ProtectionContainer switchProtection(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, SwitchProtectionInput switchInput, Context context) { - ProtectionContainerInner inner = this.serviceClient() - .switchProtection(resourceName, resourceGroupName, fabricName, protectionContainerName, switchInput, - context); - if (inner != null) { - return new ProtectionContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ProtectionContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ProtectionContainerImpl(inner1, this.manager())); - } - - public ProtectionContainer getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionContainers"); - if (protectionContainerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionContainers'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String protectionContainerName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionContainers"); - if (protectionContainerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionContainers'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, context); - } - - private ReplicationProtectionContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public ProtectionContainerImpl define(String name) { - return new ProtectionContainerImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionIntentImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionIntentImpl.java deleted file mode 100644 index 91b6f291b066..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionIntentImpl.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectionIntentInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntent; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntentProperties; - -public final class ReplicationProtectionIntentImpl - implements ReplicationProtectionIntent, ReplicationProtectionIntent.Definition { - private ReplicationProtectionIntentInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - ReplicationProtectionIntentImpl(ReplicationProtectionIntentInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ReplicationProtectionIntentProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public ReplicationProtectionIntentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String intentObjectName; - - private CreateProtectionIntentInput createInput; - - public ReplicationProtectionIntentImpl withExistingVault(String resourceName, String resourceGroupName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - return this; - } - - public ReplicationProtectionIntent create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionIntents() - .createWithResponse(resourceName, resourceGroupName, intentObjectName, createInput, Context.NONE) - .getValue(); - return this; - } - - public ReplicationProtectionIntent create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionIntents() - .createWithResponse(resourceName, resourceGroupName, intentObjectName, createInput, context) - .getValue(); - return this; - } - - ReplicationProtectionIntentImpl(String name, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new ReplicationProtectionIntentInner(); - this.serviceManager = serviceManager; - this.intentObjectName = name; - this.createInput = new CreateProtectionIntentInput(); - } - - public ReplicationProtectionIntent refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionIntents() - .getWithResponse(resourceName, resourceGroupName, intentObjectName, Context.NONE) - .getValue(); - return this; - } - - public ReplicationProtectionIntent refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationProtectionIntents() - .getWithResponse(resourceName, resourceGroupName, intentObjectName, context) - .getValue(); - return this; - } - - public ReplicationProtectionIntentImpl withProperties(CreateProtectionIntentProperties properties) { - this.createInput.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionIntentsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionIntentsClientImpl.java deleted file mode 100644 index cd00a9bbbc45..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionIntentsClientImpl.java +++ /dev/null @@ -1,658 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectionIntentsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectionIntentInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntentCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationProtectionIntentsClient. - */ -public final class ReplicationProtectionIntentsClientImpl implements ReplicationProtectionIntentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationProtectionIntentsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationProtectionIntentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationProtectionIntentsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationProtectionIntentsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationProtectionIntents to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationProtectionIntentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionIntents") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("skipToken") String skipToken, - @QueryParam("takeToken") String takeToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionIntents/{intentObjectName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("intentObjectName") String intentObjectName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionIntents/{intentObjectName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("intentObjectName") String intentObjectName, - @BodyParam("application/json") CreateProtectionIntentInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of replication protection intent objects. - * - * Gets the list of ASR replication protection intent objects in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protection intent objects in the vault along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName, String skipToken, String takeToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), skipToken, takeToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of replication protection intent objects. - * - * Gets the list of ASR replication protection intent objects in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protection intent objects in the vault along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName, String skipToken, String takeToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), skipToken, takeToken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of replication protection intent objects. - * - * Gets the list of ASR replication protection intent objects in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protection intent objects in the vault as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, - String skipToken, String takeToken) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, skipToken, takeToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of replication protection intent objects. - * - * Gets the list of ASR replication protection intent objects in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protection intent objects in the vault as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - final String skipToken = null; - final String takeToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, skipToken, takeToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of replication protection intent objects. - * - * Gets the list of ASR replication protection intent objects in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protection intent objects in the vault as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, - String skipToken, String takeToken, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceName, resourceGroupName, skipToken, takeToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of replication protection intent objects. - * - * Gets the list of ASR replication protection intent objects in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protection intent objects in the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - final String skipToken = null; - final String takeToken = null; - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, skipToken, takeToken)); - } - - /** - * Gets the list of replication protection intent objects. - * - * Gets the list of ASR replication protection intent objects in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protection intent objects in the vault as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, - String skipToken, String takeToken, Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, skipToken, takeToken, context)); - } - - /** - * Gets the details of a Replication protection intent item. - * - * Gets the details of an ASR replication protection intent. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName Replication protection intent name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protection intent along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String intentObjectName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (intentObjectName == null) { - return Mono - .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), intentObjectName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the details of a Replication protection intent item. - * - * Gets the details of an ASR replication protection intent. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName Replication protection intent name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protection intent along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String intentObjectName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (intentObjectName == null) { - return Mono - .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), intentObjectName, accept, context); - } - - /** - * Gets the details of a Replication protection intent item. - * - * Gets the details of an ASR replication protection intent. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName Replication protection intent name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protection intent on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, - String intentObjectName) { - return getWithResponseAsync(resourceName, resourceGroupName, intentObjectName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the details of a Replication protection intent item. - * - * Gets the details of an ASR replication protection intent. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName Replication protection intent name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protection intent along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String intentObjectName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, intentObjectName, context).block(); - } - - /** - * Gets the details of a Replication protection intent item. - * - * Gets the details of an ASR replication protection intent. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName Replication protection intent name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protection intent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectionIntentInner get(String resourceName, String resourceGroupName, - String intentObjectName) { - return getWithResponse(resourceName, resourceGroupName, intentObjectName, Context.NONE).getValue(); - } - - /** - * Create protection intent Resource. - * - * The operation to create an ASR replication protection intent item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName A name for the replication protection item. - * @param input Create Protection Intent Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protection intent along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceName, - String resourceGroupName, String intentObjectName, CreateProtectionIntentInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (intentObjectName == null) { - return Mono - .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), intentObjectName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create protection intent Resource. - * - * The operation to create an ASR replication protection intent item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName A name for the replication protection item. - * @param input Create Protection Intent Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protection intent along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceName, - String resourceGroupName, String intentObjectName, CreateProtectionIntentInput input, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (intentObjectName == null) { - return Mono - .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), intentObjectName, input, accept, context); - } - - /** - * Create protection intent Resource. - * - * The operation to create an ASR replication protection intent item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName A name for the replication protection item. - * @param input Create Protection Intent Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protection intent on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, - String intentObjectName, CreateProtectionIntentInput input) { - return createWithResponseAsync(resourceName, resourceGroupName, intentObjectName, input) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create protection intent Resource. - * - * The operation to create an ASR replication protection intent item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName A name for the replication protection item. - * @param input Create Protection Intent Input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protection intent along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String resourceName, String resourceGroupName, - String intentObjectName, CreateProtectionIntentInput input, Context context) { - return createWithResponseAsync(resourceName, resourceGroupName, intentObjectName, input, context).block(); - } - - /** - * Create protection intent Resource. - * - * The operation to create an ASR replication protection intent item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName A name for the replication protection item. - * @param input Create Protection Intent Input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protection intent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationProtectionIntentInner create(String resourceName, String resourceGroupName, - String intentObjectName, CreateProtectionIntentInput input) { - return createWithResponse(resourceName, resourceGroupName, intentObjectName, input, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protection intent objects collection along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protection intent objects collection along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionIntentsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionIntentsImpl.java deleted file mode 100644 index 3dc692b96d00..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionIntentsImpl.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectionIntentsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectionIntentInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntent; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntents; - -public final class ReplicationProtectionIntentsImpl implements ReplicationProtectionIntents { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationProtectionIntentsImpl.class); - - private final ReplicationProtectionIntentsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationProtectionIntentsImpl(ReplicationProtectionIntentsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner - = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ReplicationProtectionIntentImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, - String skipToken, String takeToken, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceName, resourceGroupName, skipToken, takeToken, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ReplicationProtectionIntentImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, - String intentObjectName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, intentObjectName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ReplicationProtectionIntentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ReplicationProtectionIntent get(String resourceName, String resourceGroupName, String intentObjectName) { - ReplicationProtectionIntentInner inner - = this.serviceClient().get(resourceName, resourceGroupName, intentObjectName); - if (inner != null) { - return new ReplicationProtectionIntentImpl(inner, this.manager()); - } else { - return null; - } - } - - public ReplicationProtectionIntent getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String intentObjectName = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionIntents"); - if (intentObjectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionIntents'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, intentObjectName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String intentObjectName = ResourceManagerUtils.getValueFromIdByName(id, "replicationProtectionIntents"); - if (intentObjectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationProtectionIntents'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, intentObjectName, context); - } - - private ReplicationProtectionIntentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public ReplicationProtectionIntentImpl define(String name) { - return new ReplicationProtectionIntentImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryPlansClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryPlansClientImpl.java deleted file mode 100644 index 99bcb658ba02..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryPlansClientImpl.java +++ /dev/null @@ -1,3177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationRecoveryPlansClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPlanInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateRecoveryPlanInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateRecoveryPlanInput; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationRecoveryPlansClient. - */ -public final class ReplicationRecoveryPlansClientImpl implements ReplicationRecoveryPlansClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationRecoveryPlansService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationRecoveryPlansClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationRecoveryPlansClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationRecoveryPlansService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationRecoveryPlans to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationRecoveryPlansService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("recoveryPlanName") String recoveryPlanName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("recoveryPlanName") String recoveryPlanName, - @BodyParam("application/json") CreateRecoveryPlanInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("recoveryPlanName") String recoveryPlanName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("recoveryPlanName") String recoveryPlanName, - @BodyParam("application/json") UpdateRecoveryPlanInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCancel") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failoverCancel(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("recoveryPlanName") String recoveryPlanName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCommit") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failoverCommit(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("recoveryPlanName") String recoveryPlanName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/plannedFailover") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> plannedFailover(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("recoveryPlanName") String recoveryPlanName, - @BodyParam("application/json") RecoveryPlanPlannedFailoverInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/reProtect") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reprotect(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("recoveryPlanName") String recoveryPlanName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailover") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> testFailover(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("recoveryPlanName") String recoveryPlanName, - @BodyParam("application/json") RecoveryPlanTestFailoverInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailoverCleanup") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> testFailoverCleanup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("recoveryPlanName") String recoveryPlanName, - @BodyParam("application/json") RecoveryPlanTestFailoverCleanupInput input, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/unplannedFailover") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> unplannedFailover(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("recoveryPlanName") String recoveryPlanName, - @BodyParam("application/json") RecoveryPlanUnplannedFailoverInput input, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of recovery plans. - * - * Lists the recovery plans in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan collection details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of recovery plans. - * - * Lists the recovery plans in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan collection details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of recovery plans. - * - * Lists the recovery plans in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan collection details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of recovery plans. - * - * Lists the recovery plans in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan collection details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of recovery plans. - * - * Lists the recovery plans in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan collection details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * Gets the list of recovery plans. - * - * Lists the recovery plans in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan collection details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Gets the requested recovery plan. - * - * Gets the details of the recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Name of the recovery plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the recovery plan along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String recoveryPlanName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the requested recovery plan. - * - * Gets the details of the recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Name of the recovery plan. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the recovery plan along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), recoveryPlanName, accept, context); - } - - /** - * Gets the requested recovery plan. - * - * Gets the details of the recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Name of the recovery plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the recovery plan on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String recoveryPlanName) { - return getWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the requested recovery plan. - * - * Gets the details of the recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Name of the recovery plan. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the recovery plan along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String recoveryPlanName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, context).block(); - } - - /** - * Gets the requested recovery plan. - * - * Gets the details of the recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Name of the recovery plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the recovery plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner get(String resourceName, String resourceGroupName, String recoveryPlanName) { - return getWithResponse(resourceName, resourceGroupName, recoveryPlanName, Context.NONE).getValue(); - } - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, CreateRecoveryPlanInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, CreateRecoveryPlanInput input, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), recoveryPlanName, input, accept, context); - } - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginCreateAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, CreateRecoveryPlanInput input) { - Mono>> mono - = createWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, this.client.getContext()); - } - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginCreateAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, CreateRecoveryPlanInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, context); - } - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginCreate(String resourceName, - String resourceGroupName, String recoveryPlanName, CreateRecoveryPlanInput input) { - return this.beginCreateAsync(resourceName, resourceGroupName, recoveryPlanName, input).getSyncPoller(); - } - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginCreate(String resourceName, - String resourceGroupName, String recoveryPlanName, CreateRecoveryPlanInput input, Context context) { - return this.beginCreateAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).getSyncPoller(); - } - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String recoveryPlanName, - CreateRecoveryPlanInput input) { - return beginCreateAsync(resourceName, resourceGroupName, recoveryPlanName, input).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String recoveryPlanName, - CreateRecoveryPlanInput input, Context context) { - return beginCreateAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner create(String resourceName, String resourceGroupName, String recoveryPlanName, - CreateRecoveryPlanInput input) { - return createAsync(resourceName, resourceGroupName, recoveryPlanName, input).block(); - } - - /** - * Creates a recovery plan with the given details. - * - * The operation to create a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery Plan creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner create(String resourceName, String resourceGroupName, String recoveryPlanName, - CreateRecoveryPlanInput input, Context context) { - return createAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).block(); - } - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String recoveryPlanName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), recoveryPlanName, context); - } - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String recoveryPlanName) { - Mono>> mono - = deleteWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String recoveryPlanName) { - return this.beginDeleteAsync(resourceName, resourceGroupName, recoveryPlanName).getSyncPoller(); - } - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String recoveryPlanName, Context context) { - return this.beginDeleteAsync(resourceName, resourceGroupName, recoveryPlanName, context).getSyncPoller(); - } - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String recoveryPlanName) { - return beginDeleteAsync(resourceName, resourceGroupName, recoveryPlanName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context) { - return beginDeleteAsync(resourceName, resourceGroupName, recoveryPlanName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String recoveryPlanName) { - deleteAsync(resourceName, resourceGroupName, recoveryPlanName).block(); - } - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String recoveryPlanName, Context context) { - deleteAsync(resourceName, resourceGroupName, recoveryPlanName, context).block(); - } - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, UpdateRecoveryPlanInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, UpdateRecoveryPlanInput input, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), recoveryPlanName, input, accept, context); - } - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginUpdateAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, UpdateRecoveryPlanInput input) { - Mono>> mono - = updateWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, this.client.getContext()); - } - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginUpdateAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, UpdateRecoveryPlanInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, context); - } - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginUpdate(String resourceName, - String resourceGroupName, String recoveryPlanName, UpdateRecoveryPlanInput input) { - return this.beginUpdateAsync(resourceName, resourceGroupName, recoveryPlanName, input).getSyncPoller(); - } - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginUpdate(String resourceName, - String resourceGroupName, String recoveryPlanName, UpdateRecoveryPlanInput input, Context context) { - return this.beginUpdateAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).getSyncPoller(); - } - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, String recoveryPlanName, - UpdateRecoveryPlanInput input) { - return beginUpdateAsync(resourceName, resourceGroupName, recoveryPlanName, input).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, String recoveryPlanName, - UpdateRecoveryPlanInput input, Context context) { - return beginUpdateAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner update(String resourceName, String resourceGroupName, String recoveryPlanName, - UpdateRecoveryPlanInput input) { - return updateAsync(resourceName, resourceGroupName, recoveryPlanName, input).block(); - } - - /** - * Updates the given recovery plan. - * - * The operation to update a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Update recovery plan input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner update(String resourceName, String resourceGroupName, String recoveryPlanName, - UpdateRecoveryPlanInput input, Context context) { - return updateAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).block(); - } - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverCancelWithResponseAsync(String resourceName, - String resourceGroupName, String recoveryPlanName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.failoverCancel(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverCancelWithResponseAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.failoverCancel(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, accept, context); - } - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginFailoverCancelAsync(String resourceName, - String resourceGroupName, String recoveryPlanName) { - Mono>> mono - = failoverCancelWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, this.client.getContext()); - } - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginFailoverCancelAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = failoverCancelWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, context); - } - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginFailoverCancel(String resourceName, - String resourceGroupName, String recoveryPlanName) { - return this.beginFailoverCancelAsync(resourceName, resourceGroupName, recoveryPlanName).getSyncPoller(); - } - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginFailoverCancel(String resourceName, - String resourceGroupName, String recoveryPlanName, Context context) { - return this.beginFailoverCancelAsync(resourceName, resourceGroupName, recoveryPlanName, context) - .getSyncPoller(); - } - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverCancelAsync(String resourceName, String resourceGroupName, - String recoveryPlanName) { - return beginFailoverCancelAsync(resourceName, resourceGroupName, recoveryPlanName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverCancelAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, Context context) { - return beginFailoverCancelAsync(resourceName, resourceGroupName, recoveryPlanName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner failoverCancel(String resourceName, String resourceGroupName, String recoveryPlanName) { - return failoverCancelAsync(resourceName, resourceGroupName, recoveryPlanName).block(); - } - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner failoverCancel(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context) { - return failoverCancelAsync(resourceName, resourceGroupName, recoveryPlanName, context).block(); - } - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverCommitWithResponseAsync(String resourceName, - String resourceGroupName, String recoveryPlanName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.failoverCommit(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverCommitWithResponseAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.failoverCommit(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, accept, context); - } - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginFailoverCommitAsync(String resourceName, - String resourceGroupName, String recoveryPlanName) { - Mono>> mono - = failoverCommitWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, this.client.getContext()); - } - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginFailoverCommitAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = failoverCommitWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, context); - } - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginFailoverCommit(String resourceName, - String resourceGroupName, String recoveryPlanName) { - return this.beginFailoverCommitAsync(resourceName, resourceGroupName, recoveryPlanName).getSyncPoller(); - } - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginFailoverCommit(String resourceName, - String resourceGroupName, String recoveryPlanName, Context context) { - return this.beginFailoverCommitAsync(resourceName, resourceGroupName, recoveryPlanName, context) - .getSyncPoller(); - } - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverCommitAsync(String resourceName, String resourceGroupName, - String recoveryPlanName) { - return beginFailoverCommitAsync(resourceName, resourceGroupName, recoveryPlanName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverCommitAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, Context context) { - return beginFailoverCommitAsync(resourceName, resourceGroupName, recoveryPlanName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner failoverCommit(String resourceName, String resourceGroupName, String recoveryPlanName) { - return failoverCommitAsync(resourceName, resourceGroupName, recoveryPlanName).block(); - } - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner failoverCommit(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context) { - return failoverCommitAsync(resourceName, resourceGroupName, recoveryPlanName, context).block(); - } - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> plannedFailoverWithResponseAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanPlannedFailoverInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.plannedFailover(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> plannedFailoverWithResponseAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanPlannedFailoverInput input, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.plannedFailover(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, input, accept, context); - } - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginPlannedFailoverAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanPlannedFailoverInput input) { - Mono>> mono - = plannedFailoverWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, this.client.getContext()); - } - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginPlannedFailoverAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanPlannedFailoverInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = plannedFailoverWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, context); - } - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginPlannedFailover(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanPlannedFailoverInput input) { - return this.beginPlannedFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input).getSyncPoller(); - } - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginPlannedFailover(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanPlannedFailoverInput input, Context context) { - return this.beginPlannedFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input, context) - .getSyncPoller(); - } - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono plannedFailoverAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, RecoveryPlanPlannedFailoverInput input) { - return beginPlannedFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono plannedFailoverAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, RecoveryPlanPlannedFailoverInput input, Context context) { - return beginPlannedFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner plannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanPlannedFailoverInput input) { - return plannedFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input).block(); - } - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner plannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanPlannedFailoverInput input, Context context) { - return plannedFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).block(); - } - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reprotectWithResponseAsync(String resourceName, String resourceGroupName, - String recoveryPlanName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.reprotect(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reprotectWithResponseAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.reprotect(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, accept, context); - } - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginReprotectAsync(String resourceName, - String resourceGroupName, String recoveryPlanName) { - Mono>> mono - = reprotectWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, this.client.getContext()); - } - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginReprotectAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = reprotectWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, context); - } - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginReprotect(String resourceName, - String resourceGroupName, String recoveryPlanName) { - return this.beginReprotectAsync(resourceName, resourceGroupName, recoveryPlanName).getSyncPoller(); - } - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginReprotect(String resourceName, - String resourceGroupName, String recoveryPlanName, Context context) { - return this.beginReprotectAsync(resourceName, resourceGroupName, recoveryPlanName, context).getSyncPoller(); - } - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reprotectAsync(String resourceName, String resourceGroupName, - String recoveryPlanName) { - return beginReprotectAsync(resourceName, resourceGroupName, recoveryPlanName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reprotectAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, Context context) { - return beginReprotectAsync(resourceName, resourceGroupName, recoveryPlanName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner reprotect(String resourceName, String resourceGroupName, String recoveryPlanName) { - return reprotectAsync(resourceName, resourceGroupName, recoveryPlanName).block(); - } - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner reprotect(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context) { - return reprotectAsync(resourceName, resourceGroupName, recoveryPlanName, context).block(); - } - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testFailoverWithResponseAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.testFailover(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testFailoverWithResponseAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverInput input, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.testFailover(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, input, accept, context); - } - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginTestFailoverAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverInput input) { - Mono>> mono - = testFailoverWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, this.client.getContext()); - } - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginTestFailoverAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = testFailoverWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, context); - } - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginTestFailover(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverInput input) { - return this.beginTestFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input).getSyncPoller(); - } - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginTestFailover(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverInput input, Context context) { - return this.beginTestFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input, context) - .getSyncPoller(); - } - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testFailoverAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, RecoveryPlanTestFailoverInput input) { - return beginTestFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testFailoverAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, RecoveryPlanTestFailoverInput input, Context context) { - return beginTestFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner testFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverInput input) { - return testFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input).block(); - } - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner testFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverInput input, Context context) { - return testFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).block(); - } - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testFailoverCleanupWithResponseAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.testFailoverCleanup(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, input, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> testFailoverCleanupWithResponseAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.testFailoverCleanup(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, input, accept, context); - } - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginTestFailoverCleanupAsync( - String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverCleanupInput input) { - Mono>> mono - = testFailoverCleanupWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, this.client.getContext()); - } - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginTestFailoverCleanupAsync( - String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverCleanupInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = testFailoverCleanupWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, context); - } - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginTestFailoverCleanup(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input) { - return this.beginTestFailoverCleanupAsync(resourceName, resourceGroupName, recoveryPlanName, input) - .getSyncPoller(); - } - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginTestFailoverCleanup(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input, - Context context) { - return this.beginTestFailoverCleanupAsync(resourceName, resourceGroupName, recoveryPlanName, input, context) - .getSyncPoller(); - } - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testFailoverCleanupAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input) { - return beginTestFailoverCleanupAsync(resourceName, resourceGroupName, recoveryPlanName, input).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono testFailoverCleanupAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input, Context context) { - return beginTestFailoverCleanupAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner testFailoverCleanup(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverCleanupInput input) { - return testFailoverCleanupAsync(resourceName, resourceGroupName, recoveryPlanName, input).block(); - } - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner testFailoverCleanup(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverCleanupInput input, Context context) { - return testFailoverCleanupAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).block(); - } - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> unplannedFailoverWithResponseAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanUnplannedFailoverInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.unplannedFailover(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, input, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> unplannedFailoverWithResponseAsync(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanUnplannedFailoverInput input, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (recoveryPlanName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPlanName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.unplannedFailover(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), recoveryPlanName, input, accept, context); - } - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginUnplannedFailoverAsync( - String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanUnplannedFailoverInput input) { - Mono>> mono - = unplannedFailoverWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, this.client.getContext()); - } - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryPlanInner> beginUnplannedFailoverAsync( - String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanUnplannedFailoverInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = unplannedFailoverWithResponseAsync(resourceName, resourceGroupName, recoveryPlanName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RecoveryPlanInner.class, RecoveryPlanInner.class, context); - } - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginUnplannedFailover(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanUnplannedFailoverInput input) { - return this.beginUnplannedFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input) - .getSyncPoller(); - } - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of recovery plan details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryPlanInner> beginUnplannedFailover(String resourceName, - String resourceGroupName, String recoveryPlanName, RecoveryPlanUnplannedFailoverInput input, Context context) { - return this.beginUnplannedFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input, context) - .getSyncPoller(); - } - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono unplannedFailoverAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, RecoveryPlanUnplannedFailoverInput input) { - return beginUnplannedFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono unplannedFailoverAsync(String resourceName, String resourceGroupName, - String recoveryPlanName, RecoveryPlanUnplannedFailoverInput input, Context context) { - return beginUnplannedFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner unplannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanUnplannedFailoverInput input) { - return unplannedFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input).block(); - } - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPlanInner unplannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanUnplannedFailoverInput input, Context context) { - return unplannedFailoverAsync(resourceName, resourceGroupName, recoveryPlanName, input, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan collection details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan collection details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryPlansImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryPlansImpl.java deleted file mode 100644 index 1bc4556765de..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryPlansImpl.java +++ /dev/null @@ -1,310 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationRecoveryPlansClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPlanInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationRecoveryPlans; - -public final class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationRecoveryPlansImpl.class); - - private final ReplicationRecoveryPlansClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationRecoveryPlansImpl(ReplicationRecoveryPlansClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoveryPlanImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoveryPlanImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, - String recoveryPlanName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, recoveryPlanName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RecoveryPlanImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public RecoveryPlan get(String resourceName, String resourceGroupName, String recoveryPlanName) { - RecoveryPlanInner inner = this.serviceClient().get(resourceName, resourceGroupName, recoveryPlanName); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceName, String resourceGroupName, String recoveryPlanName) { - this.serviceClient().delete(resourceName, resourceGroupName, recoveryPlanName); - } - - public void delete(String resourceName, String resourceGroupName, String recoveryPlanName, Context context) { - this.serviceClient().delete(resourceName, resourceGroupName, recoveryPlanName, context); - } - - public RecoveryPlan failoverCancel(String resourceName, String resourceGroupName, String recoveryPlanName) { - RecoveryPlanInner inner - = this.serviceClient().failoverCancel(resourceName, resourceGroupName, recoveryPlanName); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan failoverCancel(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context) { - RecoveryPlanInner inner - = this.serviceClient().failoverCancel(resourceName, resourceGroupName, recoveryPlanName, context); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan failoverCommit(String resourceName, String resourceGroupName, String recoveryPlanName) { - RecoveryPlanInner inner - = this.serviceClient().failoverCommit(resourceName, resourceGroupName, recoveryPlanName); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan failoverCommit(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context) { - RecoveryPlanInner inner - = this.serviceClient().failoverCommit(resourceName, resourceGroupName, recoveryPlanName, context); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan plannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanPlannedFailoverInput input) { - RecoveryPlanInner inner - = this.serviceClient().plannedFailover(resourceName, resourceGroupName, recoveryPlanName, input); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan plannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanPlannedFailoverInput input, Context context) { - RecoveryPlanInner inner - = this.serviceClient().plannedFailover(resourceName, resourceGroupName, recoveryPlanName, input, context); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan reprotect(String resourceName, String resourceGroupName, String recoveryPlanName) { - RecoveryPlanInner inner = this.serviceClient().reprotect(resourceName, resourceGroupName, recoveryPlanName); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan reprotect(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context) { - RecoveryPlanInner inner - = this.serviceClient().reprotect(resourceName, resourceGroupName, recoveryPlanName, context); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan testFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverInput input) { - RecoveryPlanInner inner - = this.serviceClient().testFailover(resourceName, resourceGroupName, recoveryPlanName, input); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan testFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverInput input, Context context) { - RecoveryPlanInner inner - = this.serviceClient().testFailover(resourceName, resourceGroupName, recoveryPlanName, input, context); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan testFailoverCleanup(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverCleanupInput input) { - RecoveryPlanInner inner - = this.serviceClient().testFailoverCleanup(resourceName, resourceGroupName, recoveryPlanName, input); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan testFailoverCleanup(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverCleanupInput input, Context context) { - RecoveryPlanInner inner = this.serviceClient() - .testFailoverCleanup(resourceName, resourceGroupName, recoveryPlanName, input, context); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan unplannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanUnplannedFailoverInput input) { - RecoveryPlanInner inner - = this.serviceClient().unplannedFailover(resourceName, resourceGroupName, recoveryPlanName, input); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan unplannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanUnplannedFailoverInput input, Context context) { - RecoveryPlanInner inner - = this.serviceClient().unplannedFailover(resourceName, resourceGroupName, recoveryPlanName, input, context); - if (inner != null) { - return new RecoveryPlanImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryPlan getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String recoveryPlanName = ResourceManagerUtils.getValueFromIdByName(id, "replicationRecoveryPlans"); - if (recoveryPlanName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationRecoveryPlans'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, recoveryPlanName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String recoveryPlanName = ResourceManagerUtils.getValueFromIdByName(id, "replicationRecoveryPlans"); - if (recoveryPlanName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationRecoveryPlans'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, recoveryPlanName, context); - } - - public void deleteById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String recoveryPlanName = ResourceManagerUtils.getValueFromIdByName(id, "replicationRecoveryPlans"); - if (recoveryPlanName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationRecoveryPlans'.", id))); - } - this.delete(resourceName, resourceGroupName, recoveryPlanName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String recoveryPlanName = ResourceManagerUtils.getValueFromIdByName(id, "replicationRecoveryPlans"); - if (recoveryPlanName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationRecoveryPlans'.", id))); - } - this.delete(resourceName, resourceGroupName, recoveryPlanName, context); - } - - private ReplicationRecoveryPlansClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public RecoveryPlanImpl define(String name) { - return new RecoveryPlanImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryServicesProvidersClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryServicesProvidersClientImpl.java deleted file mode 100644 index 918c6e85289c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryServicesProvidersClientImpl.java +++ /dev/null @@ -1,1852 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationRecoveryServicesProvidersClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryServicesProviderInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddRecoveryServicesProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryServicesProviderCollection; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * ReplicationRecoveryServicesProvidersClient. - */ -public final class ReplicationRecoveryServicesProvidersClientImpl - implements ReplicationRecoveryServicesProvidersClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationRecoveryServicesProvidersService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationRecoveryServicesProvidersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationRecoveryServicesProvidersClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationRecoveryServicesProvidersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationRecoveryServicesProviders to - * be used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationRecoveryServicesProvidersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationFabrics(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("providerName") String providerName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("providerName") String providerName, - @BodyParam("application/json") AddRecoveryServicesProviderInput addProviderInput, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> purge(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("providerName") String providerName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/refreshProvider") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshProvider(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("providerName") String providerName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/remove") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("providerName") String providerName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryServicesProviders") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationFabricsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of registered recovery services providers for the fabric. - * - * Lists the registered recovery services providers for the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationFabricsSinglePageAsync(String resourceName, String resourceGroupName, String fabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of registered recovery services providers for the fabric. - * - * Lists the registered recovery services providers for the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of registered recovery services providers for the fabric. - * - * Lists the registered recovery services providers for the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationFabricsAsync(String resourceName, - String resourceGroupName, String fabricName) { - return new PagedFlux<>( - () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName), - nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of registered recovery services providers for the fabric. - * - * Lists the registered recovery services providers for the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationFabricsAsync(String resourceName, - String resourceGroupName, String fabricName, Context context) { - return new PagedFlux<>( - () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName, context), - nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of registered recovery services providers for the fabric. - * - * Lists the registered recovery services providers for the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationFabrics(String resourceName, - String resourceGroupName, String fabricName) { - return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName)); - } - - /** - * Gets the list of registered recovery services providers for the fabric. - * - * Lists the registered recovery services providers for the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationFabrics(String resourceName, - String resourceGroupName, String fabricName, Context context) { - return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName, context)); - } - - /** - * Gets the details of a recovery services provider. - * - * Gets the details of registered recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of registered recovery services provider along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String providerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (providerName == null) { - return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, providerName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the details of a recovery services provider. - * - * Gets the details of registered recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of registered recovery services provider along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String providerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (providerName == null) { - return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, providerName, accept, context); - } - - /** - * Gets the details of a recovery services provider. - * - * Gets the details of registered recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of registered recovery services provider on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the details of a recovery services provider. - * - * Gets the details of registered recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of registered recovery services provider along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String providerName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName, context).block(); - } - - /** - * Gets the details of a recovery services provider. - * - * Gets the details of registered recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of registered recovery services provider. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryServicesProviderInner get(String resourceName, String resourceGroupName, String fabricName, - String providerName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, providerName, Context.NONE).getValue(); - } - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName, AddRecoveryServicesProviderInput addProviderInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (providerName == null) { - return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null.")); - } - if (addProviderInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter addProviderInput is required and cannot be null.")); - } else { - addProviderInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, providerName, addProviderInput, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName, AddRecoveryServicesProviderInput addProviderInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (providerName == null) { - return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null.")); - } - if (addProviderInput == null) { - return Mono - .error(new IllegalArgumentException("Parameter addProviderInput is required and cannot be null.")); - } else { - addProviderInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, providerName, addProviderInput, accept, context); - } - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of provider details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryServicesProviderInner> beginCreateAsync( - String resourceName, String resourceGroupName, String fabricName, String providerName, - AddRecoveryServicesProviderInput addProviderInput) { - Mono>> mono - = createWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), RecoveryServicesProviderInner.class, RecoveryServicesProviderInner.class, - this.client.getContext()); - } - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of provider details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryServicesProviderInner> beginCreateAsync( - String resourceName, String resourceGroupName, String fabricName, String providerName, - AddRecoveryServicesProviderInput addProviderInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - providerName, addProviderInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), RecoveryServicesProviderInner.class, RecoveryServicesProviderInner.class, - context); - } - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of provider details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryServicesProviderInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String providerName, - AddRecoveryServicesProviderInput addProviderInput) { - return this.beginCreateAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput) - .getSyncPoller(); - } - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of provider details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryServicesProviderInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String providerName, - AddRecoveryServicesProviderInput addProviderInput, Context context) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput, context) - .getSyncPoller(); - } - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName, AddRecoveryServicesProviderInput addProviderInput) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName, AddRecoveryServicesProviderInput addProviderInput, Context context) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryServicesProviderInner create(String resourceName, String resourceGroupName, String fabricName, - String providerName, AddRecoveryServicesProviderInput addProviderInput) { - return createAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput).block(); - } - - /** - * Adds a recovery services provider. - * - * The operation to add a recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param addProviderInput Add provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryServicesProviderInner create(String resourceName, String resourceGroupName, String fabricName, - String providerName, AddRecoveryServicesProviderInput addProviderInput, Context context) { - return createAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput, context) - .block(); - } - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> purgeWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (providerName == null) { - return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.purge(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, providerName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> purgeWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (providerName == null) { - return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.purge(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, providerName, context); - } - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPurgeAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName) { - Mono>> mono - = purgeWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPurgeAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = purgeWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, - String fabricName, String providerName) { - return this.beginPurgeAsync(resourceName, resourceGroupName, fabricName, providerName).getSyncPoller(); - } - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPurge(String resourceName, String resourceGroupName, - String fabricName, String providerName, Context context) { - return this.beginPurgeAsync(resourceName, resourceGroupName, fabricName, providerName, context).getSyncPoller(); - } - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono purgeAsync(String resourceName, String resourceGroupName, String fabricName, - String providerName) { - return beginPurgeAsync(resourceName, resourceGroupName, fabricName, providerName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono purgeAsync(String resourceName, String resourceGroupName, String fabricName, String providerName, - Context context) { - return beginPurgeAsync(resourceName, resourceGroupName, fabricName, providerName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void purge(String resourceName, String resourceGroupName, String fabricName, String providerName) { - purgeAsync(resourceName, resourceGroupName, fabricName, providerName).block(); - } - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void purge(String resourceName, String resourceGroupName, String fabricName, String providerName, - Context context) { - purgeAsync(resourceName, resourceGroupName, fabricName, providerName, context).block(); - } - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshProviderWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String providerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (providerName == null) { - return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.refreshProvider(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, providerName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshProviderWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String providerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (providerName == null) { - return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.refreshProvider(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, providerName, accept, context); - } - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of provider details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryServicesProviderInner> - beginRefreshProviderAsync(String resourceName, String resourceGroupName, String fabricName, - String providerName) { - Mono>> mono - = refreshProviderWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), RecoveryServicesProviderInner.class, RecoveryServicesProviderInner.class, - this.client.getContext()); - } - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of provider details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RecoveryServicesProviderInner> - beginRefreshProviderAsync(String resourceName, String resourceGroupName, String fabricName, String providerName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = refreshProviderWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), RecoveryServicesProviderInner.class, RecoveryServicesProviderInner.class, - context); - } - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of provider details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryServicesProviderInner> - beginRefreshProvider(String resourceName, String resourceGroupName, String fabricName, String providerName) { - return this.beginRefreshProviderAsync(resourceName, resourceGroupName, fabricName, providerName) - .getSyncPoller(); - } - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of provider details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RecoveryServicesProviderInner> beginRefreshProvider( - String resourceName, String resourceGroupName, String fabricName, String providerName, Context context) { - return this.beginRefreshProviderAsync(resourceName, resourceGroupName, fabricName, providerName, context) - .getSyncPoller(); - } - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshProviderAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName) { - return beginRefreshProviderAsync(resourceName, resourceGroupName, fabricName, providerName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshProviderAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName, Context context) { - return beginRefreshProviderAsync(resourceName, resourceGroupName, fabricName, providerName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryServicesProviderInner refreshProvider(String resourceName, String resourceGroupName, - String fabricName, String providerName) { - return refreshProviderAsync(resourceName, resourceGroupName, fabricName, providerName).block(); - } - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryServicesProviderInner refreshProvider(String resourceName, String resourceGroupName, - String fabricName, String providerName, Context context) { - return refreshProviderAsync(resourceName, resourceGroupName, fabricName, providerName, context).block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (providerName == null) { - return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, providerName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (providerName == null) { - return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, providerName, context); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName) { - Mono>> mono - = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String providerName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String providerName) { - return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName, providerName).getSyncPoller(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String providerName, Context context) { - return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName, providerName, context) - .getSyncPoller(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String providerName) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, providerName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String providerName, Context context) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, providerName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String providerName) { - deleteAsync(resourceName, resourceGroupName, fabricName, providerName).block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String providerName, - Context context) { - deleteAsync(resourceName, resourceGroupName, fabricName, providerName, context).block(); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, - Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationFabricsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationFabricsNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryServicesProvidersImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryServicesProvidersImpl.java deleted file mode 100644 index 2dc4c4f72bf3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryServicesProvidersImpl.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationRecoveryServicesProvidersClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryServicesProviderInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryServicesProvider; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationRecoveryServicesProviders; - -public final class ReplicationRecoveryServicesProvidersImpl implements ReplicationRecoveryServicesProviders { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationRecoveryServicesProvidersImpl.class); - - private final ReplicationRecoveryServicesProvidersClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationRecoveryServicesProvidersImpl(ReplicationRecoveryServicesProvidersClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationFabrics(String resourceName, - String resourceGroupName, String fabricName) { - PagedIterable inner - = this.serviceClient().listByReplicationFabrics(resourceName, resourceGroupName, fabricName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoveryServicesProviderImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationFabrics(String resourceName, - String resourceGroupName, String fabricName, Context context) { - PagedIterable inner - = this.serviceClient().listByReplicationFabrics(resourceName, resourceGroupName, fabricName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoveryServicesProviderImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String providerName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, fabricName, providerName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RecoveryServicesProviderImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public RecoveryServicesProvider get(String resourceName, String resourceGroupName, String fabricName, - String providerName) { - RecoveryServicesProviderInner inner - = this.serviceClient().get(resourceName, resourceGroupName, fabricName, providerName); - if (inner != null) { - return new RecoveryServicesProviderImpl(inner, this.manager()); - } else { - return null; - } - } - - public void purge(String resourceName, String resourceGroupName, String fabricName, String providerName) { - this.serviceClient().purge(resourceName, resourceGroupName, fabricName, providerName); - } - - public void purge(String resourceName, String resourceGroupName, String fabricName, String providerName, - Context context) { - this.serviceClient().purge(resourceName, resourceGroupName, fabricName, providerName, context); - } - - public RecoveryServicesProvider refreshProvider(String resourceName, String resourceGroupName, String fabricName, - String providerName) { - RecoveryServicesProviderInner inner - = this.serviceClient().refreshProvider(resourceName, resourceGroupName, fabricName, providerName); - if (inner != null) { - return new RecoveryServicesProviderImpl(inner, this.manager()); - } else { - return null; - } - } - - public RecoveryServicesProvider refreshProvider(String resourceName, String resourceGroupName, String fabricName, - String providerName, Context context) { - RecoveryServicesProviderInner inner - = this.serviceClient().refreshProvider(resourceName, resourceGroupName, fabricName, providerName, context); - if (inner != null) { - return new RecoveryServicesProviderImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String providerName) { - this.serviceClient().delete(resourceName, resourceGroupName, fabricName, providerName); - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String providerName, - Context context) { - this.serviceClient().delete(resourceName, resourceGroupName, fabricName, providerName, context); - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoveryServicesProviderImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoveryServicesProviderImpl(inner1, this.manager())); - } - - public RecoveryServicesProvider getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String providerName = ResourceManagerUtils.getValueFromIdByName(id, "replicationRecoveryServicesProviders"); - if (providerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationRecoveryServicesProviders'.", - id))); - } - return this.getWithResponse(resourceName, resourceGroupName, fabricName, providerName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String providerName = ResourceManagerUtils.getValueFromIdByName(id, "replicationRecoveryServicesProviders"); - if (providerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationRecoveryServicesProviders'.", - id))); - } - return this.getWithResponse(resourceName, resourceGroupName, fabricName, providerName, context); - } - - private ReplicationRecoveryServicesProvidersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public RecoveryServicesProviderImpl define(String name) { - return new RecoveryServicesProviderImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationVaultHealthsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationVaultHealthsClientImpl.java deleted file mode 100644 index 88efb8b1cb87..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationVaultHealthsClientImpl.java +++ /dev/null @@ -1,415 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationVaultHealthsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultHealthDetailsInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationVaultHealthsClient. - */ -public final class ReplicationVaultHealthsClientImpl implements ReplicationVaultHealthsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationVaultHealthsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationVaultHealthsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationVaultHealthsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationVaultHealthsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationVaultHealths to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationVaultHealthsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth/default/refresh") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refresh(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the health summary for the vault. - * - * Gets the health details of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the health details of the vault along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the health summary for the vault. - * - * Gets the health details of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the health details of the vault along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context); - } - - /** - * Gets the health summary for the vault. - * - * Gets the health details of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the health details of the vault on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName) { - return getWithResponseAsync(resourceName, resourceGroupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the health summary for the vault. - * - * Gets the health details of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the health details of the vault along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, context).block(); - } - - /** - * Gets the health summary for the vault. - * - * Gets the health details of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the health details of the vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VaultHealthDetailsInner get(String resourceName, String resourceGroupName) { - return getWithResponse(resourceName, resourceGroupName, Context.NONE).getValue(); - } - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault health details definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshWithResponseAsync(String resourceName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.refresh(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault health details definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshWithResponseAsync(String resourceName, String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.refresh(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context); - } - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of vault health details definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VaultHealthDetailsInner> - beginRefreshAsync(String resourceName, String resourceGroupName) { - Mono>> mono = refreshWithResponseAsync(resourceName, resourceGroupName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), VaultHealthDetailsInner.class, VaultHealthDetailsInner.class, - this.client.getContext()); - } - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of vault health details definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VaultHealthDetailsInner> - beginRefreshAsync(String resourceName, String resourceGroupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = refreshWithResponseAsync(resourceName, resourceGroupName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), VaultHealthDetailsInner.class, VaultHealthDetailsInner.class, context); - } - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vault health details definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VaultHealthDetailsInner> beginRefresh(String resourceName, - String resourceGroupName) { - return this.beginRefreshAsync(resourceName, resourceGroupName).getSyncPoller(); - } - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vault health details definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VaultHealthDetailsInner> beginRefresh(String resourceName, - String resourceGroupName, Context context) { - return this.beginRefreshAsync(resourceName, resourceGroupName, context).getSyncPoller(); - } - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault health details definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshAsync(String resourceName, String resourceGroupName) { - return beginRefreshAsync(resourceName, resourceGroupName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault health details definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshAsync(String resourceName, String resourceGroupName, Context context) { - return beginRefreshAsync(resourceName, resourceGroupName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault health details definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VaultHealthDetailsInner refresh(String resourceName, String resourceGroupName) { - return refreshAsync(resourceName, resourceGroupName).block(); - } - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault health details definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VaultHealthDetailsInner refresh(String resourceName, String resourceGroupName, Context context) { - return refreshAsync(resourceName, resourceGroupName, context).block(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationVaultHealthsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationVaultHealthsImpl.java deleted file mode 100644 index 60c3d2b57711..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationVaultHealthsImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationVaultHealthsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultHealthDetailsInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationVaultHealths; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultHealthDetails; - -public final class ReplicationVaultHealthsImpl implements ReplicationVaultHealths { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationVaultHealthsImpl.class); - - private final ReplicationVaultHealthsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationVaultHealthsImpl(ReplicationVaultHealthsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceName, String resourceGroupName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VaultHealthDetailsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public VaultHealthDetails get(String resourceName, String resourceGroupName) { - VaultHealthDetailsInner inner = this.serviceClient().get(resourceName, resourceGroupName); - if (inner != null) { - return new VaultHealthDetailsImpl(inner, this.manager()); - } else { - return null; - } - } - - public VaultHealthDetails refresh(String resourceName, String resourceGroupName) { - VaultHealthDetailsInner inner = this.serviceClient().refresh(resourceName, resourceGroupName); - if (inner != null) { - return new VaultHealthDetailsImpl(inner, this.manager()); - } else { - return null; - } - } - - public VaultHealthDetails refresh(String resourceName, String resourceGroupName, Context context) { - VaultHealthDetailsInner inner = this.serviceClient().refresh(resourceName, resourceGroupName, context); - if (inner != null) { - return new VaultHealthDetailsImpl(inner, this.manager()); - } else { - return null; - } - } - - private ReplicationVaultHealthsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationVaultSettingsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationVaultSettingsClientImpl.java deleted file mode 100644 index 13ade66c7bfb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationVaultSettingsClientImpl.java +++ /dev/null @@ -1,721 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationVaultSettingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultSettingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingCreationInput; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationVaultSettingsClient. - */ -public final class ReplicationVaultSettingsClientImpl implements ReplicationVaultSettingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationVaultSettingsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationVaultSettingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationVaultSettingsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationVaultSettingsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationVaultSettings to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationVaultSettingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings/{vaultSettingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("vaultSettingName") String vaultSettingName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings/{vaultSettingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("vaultSettingName") String vaultSettingName, - @BodyParam("application/json") VaultSettingCreationInput input, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of vault setting. - * - * Gets the list of vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of vault setting along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of vault setting. - * - * Gets the list of vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of vault setting along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of vault setting. - * - * Gets the list of vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of vault setting as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of vault setting. - * - * Gets the list of vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of vault setting as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of vault setting. - * - * Gets the list of vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of vault setting as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * Gets the list of vault setting. - * - * Gets the list of vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of vault setting as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Gets the vault setting. - * - * Gets the vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the vault setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String vaultSettingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (vaultSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vaultSettingName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), vaultSettingName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the vault setting. - * - * Gets the vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the vault setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String vaultSettingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (vaultSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vaultSettingName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), vaultSettingName, accept, context); - } - - /** - * Gets the vault setting. - * - * Gets the vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the vault setting on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String vaultSettingName) { - return getWithResponseAsync(resourceName, resourceGroupName, vaultSettingName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the vault setting. - * - * Gets the vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the vault setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String vaultSettingName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, vaultSettingName, context).block(); - } - - /** - * Gets the vault setting. - * - * Gets the vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the vault setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VaultSettingInner get(String resourceName, String resourceGroupName, String vaultSettingName) { - return getWithResponse(resourceName, resourceGroupName, vaultSettingName, Context.NONE).getValue(); - } - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String vaultSettingName, VaultSettingCreationInput input) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (vaultSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vaultSettingName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), vaultSettingName, input, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String vaultSettingName, VaultSettingCreationInput input, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (vaultSettingName == null) { - return Mono - .error(new IllegalArgumentException("Parameter vaultSettingName is required and cannot be null.")); - } - if (input == null) { - return Mono.error(new IllegalArgumentException("Parameter input is required and cannot be null.")); - } else { - input.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), vaultSettingName, input, accept, context); - } - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of vault setting. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VaultSettingInner> beginCreateAsync(String resourceName, - String resourceGroupName, String vaultSettingName, VaultSettingCreationInput input) { - Mono>> mono - = createWithResponseAsync(resourceName, resourceGroupName, vaultSettingName, input); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VaultSettingInner.class, VaultSettingInner.class, this.client.getContext()); - } - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of vault setting. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VaultSettingInner> beginCreateAsync(String resourceName, - String resourceGroupName, String vaultSettingName, VaultSettingCreationInput input, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceName, resourceGroupName, vaultSettingName, input, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VaultSettingInner.class, VaultSettingInner.class, context); - } - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vault setting. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VaultSettingInner> beginCreate(String resourceName, - String resourceGroupName, String vaultSettingName, VaultSettingCreationInput input) { - return this.beginCreateAsync(resourceName, resourceGroupName, vaultSettingName, input).getSyncPoller(); - } - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vault setting. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VaultSettingInner> beginCreate(String resourceName, - String resourceGroupName, String vaultSettingName, VaultSettingCreationInput input, Context context) { - return this.beginCreateAsync(resourceName, resourceGroupName, vaultSettingName, input, context).getSyncPoller(); - } - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault setting on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String vaultSettingName, - VaultSettingCreationInput input) { - return beginCreateAsync(resourceName, resourceGroupName, vaultSettingName, input).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault setting on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String vaultSettingName, - VaultSettingCreationInput input, Context context) { - return beginCreateAsync(resourceName, resourceGroupName, vaultSettingName, input, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VaultSettingInner create(String resourceName, String resourceGroupName, String vaultSettingName, - VaultSettingCreationInput input) { - return createAsync(resourceName, resourceGroupName, vaultSettingName, input).block(); - } - - /** - * Updates vault setting. A vault setting object is a singleton per vault and it is always present by default. - * - * The operation to configure vault setting. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param input Vault setting creation input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VaultSettingInner create(String resourceName, String resourceGroupName, String vaultSettingName, - VaultSettingCreationInput input, Context context) { - return createAsync(resourceName, resourceGroupName, vaultSettingName, input, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault setting collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault setting collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationVaultSettingsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationVaultSettingsImpl.java deleted file mode 100644 index ccc1a736de73..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationVaultSettingsImpl.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationVaultSettingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultSettingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationVaultSettings; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSetting; - -public final class ReplicationVaultSettingsImpl implements ReplicationVaultSettings { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationVaultSettingsImpl.class); - - private final ReplicationVaultSettingsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationVaultSettingsImpl(ReplicationVaultSettingsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VaultSettingImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VaultSettingImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, - String vaultSettingName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, vaultSettingName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VaultSettingImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public VaultSetting get(String resourceName, String resourceGroupName, String vaultSettingName) { - VaultSettingInner inner = this.serviceClient().get(resourceName, resourceGroupName, vaultSettingName); - if (inner != null) { - return new VaultSettingImpl(inner, this.manager()); - } else { - return null; - } - } - - public VaultSetting getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String vaultSettingName = ResourceManagerUtils.getValueFromIdByName(id, "replicationVaultSettings"); - if (vaultSettingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationVaultSettings'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, vaultSettingName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String vaultSettingName = ResourceManagerUtils.getValueFromIdByName(id, "replicationVaultSettings"); - if (vaultSettingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'replicationVaultSettings'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, vaultSettingName, context); - } - - private ReplicationVaultSettingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public VaultSettingImpl define(String name) { - return new VaultSettingImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationvCentersClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationvCentersClientImpl.java deleted file mode 100644 index f01219e6d073..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationvCentersClientImpl.java +++ /dev/null @@ -1,1574 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationvCentersClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VCenterInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddVCenterRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateVCenterRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VCenterCollection; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ReplicationvCentersClient. - */ -public final class ReplicationvCentersClientImpl implements ReplicationvCentersClient { - /** - * The proxy service used to perform REST calls. - */ - private final ReplicationvCentersService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of ReplicationvCentersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ReplicationvCentersClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(ReplicationvCentersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientReplicationvCenters to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface ReplicationvCentersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationFabrics(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("vcenterName") String vcenterName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("vcenterName") String vcenterName, - @BodyParam("application/json") AddVCenterRequest addVCenterRequest, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("vcenterName") String vcenterName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("vcenterName") String vcenterName, - @BodyParam("application/json") UpdateVCenterRequest updateVCenterRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationvCenters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationFabricsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of vCenter registered under a fabric. - * - * Lists the vCenter servers registered in a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of vCenter registered under a fabric. - * - * Lists the vCenter servers registered in a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of vCenter registered under a fabric. - * - * Lists the vCenter servers registered in a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationFabricsAsync(String resourceName, String resourceGroupName, - String fabricName) { - return new PagedFlux<>( - () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName), - nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of vCenter registered under a fabric. - * - * Lists the vCenter servers registered in a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationFabricsAsync(String resourceName, String resourceGroupName, - String fabricName, Context context) { - return new PagedFlux<>( - () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName, context), - nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of vCenter registered under a fabric. - * - * Lists the vCenter servers registered in a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName) { - return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName)); - } - - /** - * Gets the list of vCenter registered under a fabric. - * - * Lists the vCenter servers registered in a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context) { - return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName, context)); - } - - /** - * Gets the details of a vCenter. - * - * Gets the details of a registered vCenter server(Add vCenter server). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a registered vCenter server(Add vCenter server) along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String vcenterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (vcenterName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcenterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, vcenterName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the details of a vCenter. - * - * Gets the details of a registered vCenter server(Add vCenter server). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a registered vCenter server(Add vCenter server) along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (vcenterName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcenterName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, vcenterName, accept, context); - } - - /** - * Gets the details of a vCenter. - * - * Gets the details of a registered vCenter server(Add vCenter server). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a registered vCenter server(Add vCenter server) on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String fabricName, - String vcenterName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, vcenterName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the details of a vCenter. - * - * Gets the details of a registered vCenter server(Add vCenter server). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a registered vCenter server(Add vCenter server) along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String vcenterName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, vcenterName, context).block(); - } - - /** - * Gets the details of a vCenter. - * - * Gets the details of a registered vCenter server(Add vCenter server). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a registered vCenter server(Add vCenter server). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VCenterInner get(String resourceName, String resourceGroupName, String fabricName, String vcenterName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, vcenterName, Context.NONE).getValue(); - } - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, AddVCenterRequest addVCenterRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (vcenterName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcenterName is required and cannot be null.")); - } - if (addVCenterRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter addVCenterRequest is required and cannot be null.")); - } else { - addVCenterRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, vcenterName, addVCenterRequest, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, AddVCenterRequest addVCenterRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (vcenterName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcenterName is required and cannot be null.")); - } - if (addVCenterRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter addVCenterRequest is required and cannot be null.")); - } else { - addVCenterRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, vcenterName, addVCenterRequest, accept, context); - } - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of vCenter definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VCenterInner> beginCreateAsync(String resourceName, - String resourceGroupName, String fabricName, String vcenterName, AddVCenterRequest addVCenterRequest) { - Mono>> mono - = createWithResponseAsync(resourceName, resourceGroupName, fabricName, vcenterName, addVCenterRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VCenterInner.class, VCenterInner.class, this.client.getContext()); - } - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of vCenter definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VCenterInner> beginCreateAsync(String resourceName, - String resourceGroupName, String fabricName, String vcenterName, AddVCenterRequest addVCenterRequest, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - vcenterName, addVCenterRequest, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VCenterInner.class, VCenterInner.class, context); - } - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vCenter definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VCenterInner> beginCreate(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, AddVCenterRequest addVCenterRequest) { - return this.beginCreateAsync(resourceName, resourceGroupName, fabricName, vcenterName, addVCenterRequest) - .getSyncPoller(); - } - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vCenter definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VCenterInner> beginCreate(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, AddVCenterRequest addVCenterRequest, Context context) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, vcenterName, addVCenterRequest, context) - .getSyncPoller(); - } - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String fabricName, - String vcenterName, AddVCenterRequest addVCenterRequest) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, vcenterName, addVCenterRequest).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, String fabricName, - String vcenterName, AddVCenterRequest addVCenterRequest, Context context) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, vcenterName, addVCenterRequest, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VCenterInner create(String resourceName, String resourceGroupName, String fabricName, String vcenterName, - AddVCenterRequest addVCenterRequest) { - return createAsync(resourceName, resourceGroupName, fabricName, vcenterName, addVCenterRequest).block(); - } - - /** - * Add vCenter. - * - * The operation to create a vCenter object.. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param addVCenterRequest The input to the add vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VCenterInner create(String resourceName, String resourceGroupName, String fabricName, String vcenterName, - AddVCenterRequest addVCenterRequest, Context context) { - return createAsync(resourceName, resourceGroupName, fabricName, vcenterName, addVCenterRequest, context) - .block(); - } - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String vcenterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (vcenterName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcenterName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, vcenterName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (vcenterName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcenterName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, vcenterName, context); - } - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String vcenterName) { - Mono>> mono - = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, vcenterName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, vcenterName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String vcenterName) { - return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName, vcenterName).getSyncPoller(); - } - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, Context context) { - return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName, vcenterName, context).getSyncPoller(); - } - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String vcenterName) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, vcenterName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, String vcenterName, - Context context) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, vcenterName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String vcenterName) { - deleteAsync(resourceName, resourceGroupName, fabricName, vcenterName).block(); - } - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, String vcenterName, - Context context) { - deleteAsync(resourceName, resourceGroupName, fabricName, vcenterName, context).block(); - } - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, UpdateVCenterRequest updateVCenterRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (vcenterName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcenterName is required and cannot be null.")); - } - if (updateVCenterRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter updateVCenterRequest is required and cannot be null.")); - } else { - updateVCenterRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, vcenterName, updateVCenterRequest, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, UpdateVCenterRequest updateVCenterRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (vcenterName == null) { - return Mono.error(new IllegalArgumentException("Parameter vcenterName is required and cannot be null.")); - } - if (updateVCenterRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter updateVCenterRequest is required and cannot be null.")); - } else { - updateVCenterRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, vcenterName, updateVCenterRequest, accept, context); - } - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of vCenter definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VCenterInner> beginUpdateAsync(String resourceName, - String resourceGroupName, String fabricName, String vcenterName, UpdateVCenterRequest updateVCenterRequest) { - Mono>> mono - = updateWithResponseAsync(resourceName, resourceGroupName, fabricName, vcenterName, updateVCenterRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VCenterInner.class, VCenterInner.class, this.client.getContext()); - } - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of vCenter definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VCenterInner> beginUpdateAsync(String resourceName, - String resourceGroupName, String fabricName, String vcenterName, UpdateVCenterRequest updateVCenterRequest, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceName, resourceGroupName, fabricName, - vcenterName, updateVCenterRequest, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VCenterInner.class, VCenterInner.class, context); - } - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vCenter definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VCenterInner> beginUpdate(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, UpdateVCenterRequest updateVCenterRequest) { - return this.beginUpdateAsync(resourceName, resourceGroupName, fabricName, vcenterName, updateVCenterRequest) - .getSyncPoller(); - } - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of vCenter definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VCenterInner> beginUpdate(String resourceName, String resourceGroupName, - String fabricName, String vcenterName, UpdateVCenterRequest updateVCenterRequest, Context context) { - return this - .beginUpdateAsync(resourceName, resourceGroupName, fabricName, vcenterName, updateVCenterRequest, context) - .getSyncPoller(); - } - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, String fabricName, - String vcenterName, UpdateVCenterRequest updateVCenterRequest) { - return beginUpdateAsync(resourceName, resourceGroupName, fabricName, vcenterName, updateVCenterRequest).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceName, String resourceGroupName, String fabricName, - String vcenterName, UpdateVCenterRequest updateVCenterRequest, Context context) { - return beginUpdateAsync(resourceName, resourceGroupName, fabricName, vcenterName, updateVCenterRequest, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VCenterInner update(String resourceName, String resourceGroupName, String fabricName, String vcenterName, - UpdateVCenterRequest updateVCenterRequest) { - return updateAsync(resourceName, resourceGroupName, fabricName, vcenterName, updateVCenterRequest).block(); - } - - /** - * Update vCenter operation. - * - * The operation to update a registered vCenter. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param updateVCenterRequest The input to the update vCenter operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vCenter definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VCenterInner update(String resourceName, String resourceGroupName, String fabricName, String vcenterName, - UpdateVCenterRequest updateVCenterRequest, Context context) { - return updateAsync(resourceName, resourceGroupName, fabricName, vcenterName, updateVCenterRequest, context) - .block(); - } - - /** - * Gets the list of vCenter registered under the vault. - * - * Lists the vCenter servers registered in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of vCenter registered under the vault. - * - * Lists the vCenter servers registered in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of vCenter registered under the vault. - * - * Lists the vCenter servers registered in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of vCenter registered under the vault. - * - * Lists the vCenter servers registered in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of vCenter registered under the vault. - * - * Lists the vCenter servers registered in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * Gets the list of vCenter registered under the vault. - * - * Lists the vCenter servers registered in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationvCentersImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationvCentersImpl.java deleted file mode 100644 index ddad51a15e54..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationvCentersImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationvCentersClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VCenterInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationvCenters; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VCenter; - -public final class ReplicationvCentersImpl implements ReplicationvCenters { - private static final ClientLogger LOGGER = new ClientLogger(ReplicationvCentersImpl.class); - - private final ReplicationvCentersClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public ReplicationvCentersImpl(ReplicationvCentersClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName) { - PagedIterable inner - = this.serviceClient().listByReplicationFabrics(resourceName, resourceGroupName, fabricName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VCenterImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context) { - PagedIterable inner - = this.serviceClient().listByReplicationFabrics(resourceName, resourceGroupName, fabricName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VCenterImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String vcenterName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, fabricName, vcenterName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VCenterImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public VCenter get(String resourceName, String resourceGroupName, String fabricName, String vcenterName) { - VCenterInner inner = this.serviceClient().get(resourceName, resourceGroupName, fabricName, vcenterName); - if (inner != null) { - return new VCenterImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String vcenterName) { - this.serviceClient().delete(resourceName, resourceGroupName, fabricName, vcenterName); - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, String vcenterName, - Context context) { - this.serviceClient().delete(resourceName, resourceGroupName, fabricName, vcenterName, context); - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VCenterImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VCenterImpl(inner1, this.manager())); - } - - public VCenter getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String vcenterName = ResourceManagerUtils.getValueFromIdByName(id, "replicationvCenters"); - if (vcenterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationvCenters'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, fabricName, vcenterName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String vcenterName = ResourceManagerUtils.getValueFromIdByName(id, "replicationvCenters"); - if (vcenterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationvCenters'.", id))); - } - return this.getWithResponse(resourceName, resourceGroupName, fabricName, vcenterName, context); - } - - public void deleteById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String vcenterName = ResourceManagerUtils.getValueFromIdByName(id, "replicationvCenters"); - if (vcenterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationvCenters'.", id))); - } - this.delete(resourceName, resourceGroupName, fabricName, vcenterName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String vcenterName = ResourceManagerUtils.getValueFromIdByName(id, "replicationvCenters"); - if (vcenterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationvCenters'.", id))); - } - this.delete(resourceName, resourceGroupName, fabricName, vcenterName, context); - } - - private ReplicationvCentersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public VCenterImpl define(String name) { - return new VCenterImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ResourceManagerUtils.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ResourceManagerUtils.java deleted file mode 100644 index 6a39fe9ec1d0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class ResourceManagerUtils { - private ResourceManagerUtils() { - } - - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (!segments.isEmpty() && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl<>(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux - .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SiteRecoveryManagementClientBuilder.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SiteRecoveryManagementClientBuilder.java deleted file mode 100644 index f2ca6cabb30e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SiteRecoveryManagementClientBuilder.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** - * A builder for creating a new instance of the SiteRecoveryManagementClientImpl type. - */ -@ServiceClientBuilder(serviceClients = { SiteRecoveryManagementClientImpl.class }) -public final class SiteRecoveryManagementClientBuilder { - /* - * The subscription Id. - */ - private String subscriptionId; - - /** - * Sets The subscription Id. - * - * @param subscriptionId the subscriptionId value. - * @return the SiteRecoveryManagementClientBuilder. - */ - public SiteRecoveryManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the SiteRecoveryManagementClientBuilder. - */ - public SiteRecoveryManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the SiteRecoveryManagementClientBuilder. - */ - public SiteRecoveryManagementClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the SiteRecoveryManagementClientBuilder. - */ - public SiteRecoveryManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the SiteRecoveryManagementClientBuilder. - */ - public SiteRecoveryManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the SiteRecoveryManagementClientBuilder. - */ - public SiteRecoveryManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of SiteRecoveryManagementClientImpl with the provided parameters. - * - * @return an instance of SiteRecoveryManagementClientImpl. - */ - public SiteRecoveryManagementClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval - = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - SiteRecoveryManagementClientImpl client = new SiteRecoveryManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); - return client; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SiteRecoveryManagementClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SiteRecoveryManagementClientImpl.java deleted file mode 100644 index 280274cfd6aa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SiteRecoveryManagementClientImpl.java +++ /dev/null @@ -1,720 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.MigrationRecoveryPointsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.OperationsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.RecoveryPointsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationAlertSettingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationAppliancesClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationEligibilityResultsOperationsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationEventsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationFabricsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationJobsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationLogicalNetworksClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationMigrationItemsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationNetworkMappingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationNetworksClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationPoliciesClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectableItemsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectedItemsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectionContainerMappingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectionContainersClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectionIntentsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationRecoveryPlansClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationRecoveryServicesProvidersClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationVaultHealthsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationVaultSettingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationvCentersClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.SiteRecoveryManagementClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.StorageClassificationMappingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.StorageClassificationsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.SupportedOperatingSystemsOperationsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.TargetComputeSizesClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * Initializes a new instance of the SiteRecoveryManagementClientImpl type. - */ -@ServiceClient(builder = SiteRecoveryManagementClientBuilder.class) -public final class SiteRecoveryManagementClientImpl implements SiteRecoveryManagementClient { - /** - * The subscription Id. - */ - private final String subscriptionId; - - /** - * Gets The subscription Id. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. - */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Api Version. - */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** - * The HTTP pipeline to send requests through. - */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** - * The serializer to serialize an object into a string. - */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The default poll interval for long-running operation. - */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The ReplicationAlertSettingsClient object to access its operations. - */ - private final ReplicationAlertSettingsClient replicationAlertSettings; - - /** - * Gets the ReplicationAlertSettingsClient object to access its operations. - * - * @return the ReplicationAlertSettingsClient object. - */ - public ReplicationAlertSettingsClient getReplicationAlertSettings() { - return this.replicationAlertSettings; - } - - /** - * The ReplicationAppliancesClient object to access its operations. - */ - private final ReplicationAppliancesClient replicationAppliances; - - /** - * Gets the ReplicationAppliancesClient object to access its operations. - * - * @return the ReplicationAppliancesClient object. - */ - public ReplicationAppliancesClient getReplicationAppliances() { - return this.replicationAppliances; - } - - /** - * The ReplicationEligibilityResultsOperationsClient object to access its operations. - */ - private final ReplicationEligibilityResultsOperationsClient replicationEligibilityResultsOperations; - - /** - * Gets the ReplicationEligibilityResultsOperationsClient object to access its operations. - * - * @return the ReplicationEligibilityResultsOperationsClient object. - */ - public ReplicationEligibilityResultsOperationsClient getReplicationEligibilityResultsOperations() { - return this.replicationEligibilityResultsOperations; - } - - /** - * The ReplicationEventsClient object to access its operations. - */ - private final ReplicationEventsClient replicationEvents; - - /** - * Gets the ReplicationEventsClient object to access its operations. - * - * @return the ReplicationEventsClient object. - */ - public ReplicationEventsClient getReplicationEvents() { - return this.replicationEvents; - } - - /** - * The ReplicationFabricsClient object to access its operations. - */ - private final ReplicationFabricsClient replicationFabrics; - - /** - * Gets the ReplicationFabricsClient object to access its operations. - * - * @return the ReplicationFabricsClient object. - */ - public ReplicationFabricsClient getReplicationFabrics() { - return this.replicationFabrics; - } - - /** - * The ReplicationLogicalNetworksClient object to access its operations. - */ - private final ReplicationLogicalNetworksClient replicationLogicalNetworks; - - /** - * Gets the ReplicationLogicalNetworksClient object to access its operations. - * - * @return the ReplicationLogicalNetworksClient object. - */ - public ReplicationLogicalNetworksClient getReplicationLogicalNetworks() { - return this.replicationLogicalNetworks; - } - - /** - * The ReplicationNetworksClient object to access its operations. - */ - private final ReplicationNetworksClient replicationNetworks; - - /** - * Gets the ReplicationNetworksClient object to access its operations. - * - * @return the ReplicationNetworksClient object. - */ - public ReplicationNetworksClient getReplicationNetworks() { - return this.replicationNetworks; - } - - /** - * The ReplicationNetworkMappingsClient object to access its operations. - */ - private final ReplicationNetworkMappingsClient replicationNetworkMappings; - - /** - * Gets the ReplicationNetworkMappingsClient object to access its operations. - * - * @return the ReplicationNetworkMappingsClient object. - */ - public ReplicationNetworkMappingsClient getReplicationNetworkMappings() { - return this.replicationNetworkMappings; - } - - /** - * The ReplicationProtectionContainersClient object to access its operations. - */ - private final ReplicationProtectionContainersClient replicationProtectionContainers; - - /** - * Gets the ReplicationProtectionContainersClient object to access its operations. - * - * @return the ReplicationProtectionContainersClient object. - */ - public ReplicationProtectionContainersClient getReplicationProtectionContainers() { - return this.replicationProtectionContainers; - } - - /** - * The ReplicationMigrationItemsClient object to access its operations. - */ - private final ReplicationMigrationItemsClient replicationMigrationItems; - - /** - * Gets the ReplicationMigrationItemsClient object to access its operations. - * - * @return the ReplicationMigrationItemsClient object. - */ - public ReplicationMigrationItemsClient getReplicationMigrationItems() { - return this.replicationMigrationItems; - } - - /** - * The MigrationRecoveryPointsClient object to access its operations. - */ - private final MigrationRecoveryPointsClient migrationRecoveryPoints; - - /** - * Gets the MigrationRecoveryPointsClient object to access its operations. - * - * @return the MigrationRecoveryPointsClient object. - */ - public MigrationRecoveryPointsClient getMigrationRecoveryPoints() { - return this.migrationRecoveryPoints; - } - - /** - * The ReplicationProtectableItemsClient object to access its operations. - */ - private final ReplicationProtectableItemsClient replicationProtectableItems; - - /** - * Gets the ReplicationProtectableItemsClient object to access its operations. - * - * @return the ReplicationProtectableItemsClient object. - */ - public ReplicationProtectableItemsClient getReplicationProtectableItems() { - return this.replicationProtectableItems; - } - - /** - * The ReplicationProtectedItemsClient object to access its operations. - */ - private final ReplicationProtectedItemsClient replicationProtectedItems; - - /** - * Gets the ReplicationProtectedItemsClient object to access its operations. - * - * @return the ReplicationProtectedItemsClient object. - */ - public ReplicationProtectedItemsClient getReplicationProtectedItems() { - return this.replicationProtectedItems; - } - - /** - * The RecoveryPointsClient object to access its operations. - */ - private final RecoveryPointsClient recoveryPoints; - - /** - * Gets the RecoveryPointsClient object to access its operations. - * - * @return the RecoveryPointsClient object. - */ - public RecoveryPointsClient getRecoveryPoints() { - return this.recoveryPoints; - } - - /** - * The TargetComputeSizesClient object to access its operations. - */ - private final TargetComputeSizesClient targetComputeSizes; - - /** - * Gets the TargetComputeSizesClient object to access its operations. - * - * @return the TargetComputeSizesClient object. - */ - public TargetComputeSizesClient getTargetComputeSizes() { - return this.targetComputeSizes; - } - - /** - * The ReplicationProtectionContainerMappingsClient object to access its operations. - */ - private final ReplicationProtectionContainerMappingsClient replicationProtectionContainerMappings; - - /** - * Gets the ReplicationProtectionContainerMappingsClient object to access its operations. - * - * @return the ReplicationProtectionContainerMappingsClient object. - */ - public ReplicationProtectionContainerMappingsClient getReplicationProtectionContainerMappings() { - return this.replicationProtectionContainerMappings; - } - - /** - * The ReplicationRecoveryServicesProvidersClient object to access its operations. - */ - private final ReplicationRecoveryServicesProvidersClient replicationRecoveryServicesProviders; - - /** - * Gets the ReplicationRecoveryServicesProvidersClient object to access its operations. - * - * @return the ReplicationRecoveryServicesProvidersClient object. - */ - public ReplicationRecoveryServicesProvidersClient getReplicationRecoveryServicesProviders() { - return this.replicationRecoveryServicesProviders; - } - - /** - * The StorageClassificationsClient object to access its operations. - */ - private final StorageClassificationsClient storageClassifications; - - /** - * Gets the StorageClassificationsClient object to access its operations. - * - * @return the StorageClassificationsClient object. - */ - public StorageClassificationsClient getStorageClassifications() { - return this.storageClassifications; - } - - /** - * The StorageClassificationMappingsClient object to access its operations. - */ - private final StorageClassificationMappingsClient storageClassificationMappings; - - /** - * Gets the StorageClassificationMappingsClient object to access its operations. - * - * @return the StorageClassificationMappingsClient object. - */ - public StorageClassificationMappingsClient getStorageClassificationMappings() { - return this.storageClassificationMappings; - } - - /** - * The ReplicationvCentersClient object to access its operations. - */ - private final ReplicationvCentersClient replicationvCenters; - - /** - * Gets the ReplicationvCentersClient object to access its operations. - * - * @return the ReplicationvCentersClient object. - */ - public ReplicationvCentersClient getReplicationvCenters() { - return this.replicationvCenters; - } - - /** - * The ReplicationJobsClient object to access its operations. - */ - private final ReplicationJobsClient replicationJobs; - - /** - * Gets the ReplicationJobsClient object to access its operations. - * - * @return the ReplicationJobsClient object. - */ - public ReplicationJobsClient getReplicationJobs() { - return this.replicationJobs; - } - - /** - * The ReplicationPoliciesClient object to access its operations. - */ - private final ReplicationPoliciesClient replicationPolicies; - - /** - * Gets the ReplicationPoliciesClient object to access its operations. - * - * @return the ReplicationPoliciesClient object. - */ - public ReplicationPoliciesClient getReplicationPolicies() { - return this.replicationPolicies; - } - - /** - * The ReplicationProtectionIntentsClient object to access its operations. - */ - private final ReplicationProtectionIntentsClient replicationProtectionIntents; - - /** - * Gets the ReplicationProtectionIntentsClient object to access its operations. - * - * @return the ReplicationProtectionIntentsClient object. - */ - public ReplicationProtectionIntentsClient getReplicationProtectionIntents() { - return this.replicationProtectionIntents; - } - - /** - * The ReplicationRecoveryPlansClient object to access its operations. - */ - private final ReplicationRecoveryPlansClient replicationRecoveryPlans; - - /** - * Gets the ReplicationRecoveryPlansClient object to access its operations. - * - * @return the ReplicationRecoveryPlansClient object. - */ - public ReplicationRecoveryPlansClient getReplicationRecoveryPlans() { - return this.replicationRecoveryPlans; - } - - /** - * The SupportedOperatingSystemsOperationsClient object to access its operations. - */ - private final SupportedOperatingSystemsOperationsClient supportedOperatingSystemsOperations; - - /** - * Gets the SupportedOperatingSystemsOperationsClient object to access its operations. - * - * @return the SupportedOperatingSystemsOperationsClient object. - */ - public SupportedOperatingSystemsOperationsClient getSupportedOperatingSystemsOperations() { - return this.supportedOperatingSystemsOperations; - } - - /** - * The ReplicationVaultHealthsClient object to access its operations. - */ - private final ReplicationVaultHealthsClient replicationVaultHealths; - - /** - * Gets the ReplicationVaultHealthsClient object to access its operations. - * - * @return the ReplicationVaultHealthsClient object. - */ - public ReplicationVaultHealthsClient getReplicationVaultHealths() { - return this.replicationVaultHealths; - } - - /** - * The ReplicationVaultSettingsClient object to access its operations. - */ - private final ReplicationVaultSettingsClient replicationVaultSettings; - - /** - * Gets the ReplicationVaultSettingsClient object to access its operations. - * - * @return the ReplicationVaultSettingsClient object. - */ - public ReplicationVaultSettingsClient getReplicationVaultSettings() { - return this.replicationVaultSettings; - } - - /** - * Initializes an instance of SiteRecoveryManagementClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param subscriptionId The subscription Id. - * @param endpoint server parameter. - */ - SiteRecoveryManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = "2023-08-01"; - this.operations = new OperationsClientImpl(this); - this.replicationAlertSettings = new ReplicationAlertSettingsClientImpl(this); - this.replicationAppliances = new ReplicationAppliancesClientImpl(this); - this.replicationEligibilityResultsOperations = new ReplicationEligibilityResultsOperationsClientImpl(this); - this.replicationEvents = new ReplicationEventsClientImpl(this); - this.replicationFabrics = new ReplicationFabricsClientImpl(this); - this.replicationLogicalNetworks = new ReplicationLogicalNetworksClientImpl(this); - this.replicationNetworks = new ReplicationNetworksClientImpl(this); - this.replicationNetworkMappings = new ReplicationNetworkMappingsClientImpl(this); - this.replicationProtectionContainers = new ReplicationProtectionContainersClientImpl(this); - this.replicationMigrationItems = new ReplicationMigrationItemsClientImpl(this); - this.migrationRecoveryPoints = new MigrationRecoveryPointsClientImpl(this); - this.replicationProtectableItems = new ReplicationProtectableItemsClientImpl(this); - this.replicationProtectedItems = new ReplicationProtectedItemsClientImpl(this); - this.recoveryPoints = new RecoveryPointsClientImpl(this); - this.targetComputeSizes = new TargetComputeSizesClientImpl(this); - this.replicationProtectionContainerMappings = new ReplicationProtectionContainerMappingsClientImpl(this); - this.replicationRecoveryServicesProviders = new ReplicationRecoveryServicesProvidersClientImpl(this); - this.storageClassifications = new StorageClassificationsClientImpl(this); - this.storageClassificationMappings = new StorageClassificationMappingsClientImpl(this); - this.replicationvCenters = new ReplicationvCentersClientImpl(this); - this.replicationJobs = new ReplicationJobsClientImpl(this); - this.replicationPolicies = new ReplicationPoliciesClientImpl(this); - this.replicationProtectionIntents = new ReplicationProtectionIntentsClientImpl(this); - this.replicationRecoveryPlans = new ReplicationRecoveryPlansClientImpl(this); - this.supportedOperatingSystemsOperations = new SupportedOperatingSystemsOperationsClientImpl(this); - this.replicationVaultHealths = new ReplicationVaultHealthsClientImpl(this); - this.replicationVaultSettings = new ReplicationVaultSettingsClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SiteRecoveryManagementClientImpl.class); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationImpl.java deleted file mode 100644 index 07e7e7cf122b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassification; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationProperties; - -public final class StorageClassificationImpl implements StorageClassification { - private StorageClassificationInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - StorageClassificationImpl(StorageClassificationInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public StorageClassificationProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public StorageClassificationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationMappingImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationMappingImpl.java deleted file mode 100644 index f936ccce20ea..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationMappingImpl.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMapping; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappingProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageMappingInputProperties; - -public final class StorageClassificationMappingImpl - implements StorageClassificationMapping, StorageClassificationMapping.Definition { - private StorageClassificationMappingInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - StorageClassificationMappingImpl(StorageClassificationMappingInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public StorageClassificationMappingProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public StorageClassificationMappingInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String fabricName; - - private String storageClassificationName; - - private String storageClassificationMappingName; - - private StorageClassificationMappingInput createPairingInput; - - public StorageClassificationMappingImpl withExistingReplicationStorageClassification(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - this.fabricName = fabricName; - this.storageClassificationName = storageClassificationName; - return this; - } - - public StorageClassificationMapping create() { - this.innerObject = serviceManager.serviceClient() - .getStorageClassificationMappings() - .create(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, createPairingInput, Context.NONE); - return this; - } - - public StorageClassificationMapping create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getStorageClassificationMappings() - .create(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, createPairingInput, context); - return this; - } - - StorageClassificationMappingImpl(String name, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new StorageClassificationMappingInner(); - this.serviceManager = serviceManager; - this.storageClassificationMappingName = name; - this.createPairingInput = new StorageClassificationMappingInput(); - } - - public StorageClassificationMapping refresh() { - this.innerObject = serviceManager.serviceClient() - .getStorageClassificationMappings() - .getWithResponse(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, Context.NONE) - .getValue(); - return this; - } - - public StorageClassificationMapping refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getStorageClassificationMappings() - .getWithResponse(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, context) - .getValue(); - return this; - } - - public StorageClassificationMappingImpl withProperties(StorageMappingInputProperties properties) { - this.createPairingInput.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationMappingsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationMappingsClientImpl.java deleted file mode 100644 index 5977d2442b22..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationMappingsClientImpl.java +++ /dev/null @@ -1,1398 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.StorageClassificationMappingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappingCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappingInput; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in StorageClassificationMappingsClient. - */ -public final class StorageClassificationMappingsClientImpl implements StorageClassificationMappingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final StorageClassificationMappingsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of StorageClassificationMappingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - StorageClassificationMappingsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(StorageClassificationMappingsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientStorageClassificationMappings to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface StorageClassificationMappingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationStorageClassifications( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("resourceName") String resourceName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("storageClassificationName") String storageClassificationName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("storageClassificationName") String storageClassificationName, - @PathParam("storageClassificationMappingName") String storageClassificationMappingName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("storageClassificationName") String storageClassificationName, - @PathParam("storageClassificationMappingName") String storageClassificationMappingName, - @BodyParam("application/json") StorageClassificationMappingInput pairingInput, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("storageClassificationName") String storageClassificationName, - @PathParam("storageClassificationMappingName") String storageClassificationMappingName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassificationMappings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationStorageClassificationsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of storage classification mappings objects under a storage. - * - * Lists the storage classification mappings for the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationStorageClassificationsSinglePageAsync(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (storageClassificationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationStorageClassifications(this.client.getEndpoint(), - this.client.getApiVersion(), resourceName, resourceGroupName, this.client.getSubscriptionId(), - fabricName, storageClassificationName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of storage classification mappings objects under a storage. - * - * Lists the storage classification mappings for the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationStorageClassificationsSinglePageAsync(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (storageClassificationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationStorageClassifications(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, storageClassificationName, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of storage classification mappings objects under a storage. - * - * Lists the storage classification mappings for the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationStorageClassificationsAsync( - String resourceName, String resourceGroupName, String fabricName, String storageClassificationName) { - return new PagedFlux<>( - () -> listByReplicationStorageClassificationsSinglePageAsync(resourceName, resourceGroupName, fabricName, - storageClassificationName), - nextLink -> listByReplicationStorageClassificationsNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of storage classification mappings objects under a storage. - * - * Lists the storage classification mappings for the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationStorageClassificationsAsync( - String resourceName, String resourceGroupName, String fabricName, String storageClassificationName, - Context context) { - return new PagedFlux<>( - () -> listByReplicationStorageClassificationsSinglePageAsync(resourceName, resourceGroupName, fabricName, - storageClassificationName, context), - nextLink -> listByReplicationStorageClassificationsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of storage classification mappings objects under a storage. - * - * Lists the storage classification mappings for the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationStorageClassifications(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName) { - return new PagedIterable<>(listByReplicationStorageClassificationsAsync(resourceName, resourceGroupName, - fabricName, storageClassificationName)); - } - - /** - * Gets the list of storage classification mappings objects under a storage. - * - * Lists the storage classification mappings for the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationStorageClassifications(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName, Context context) { - return new PagedIterable<>(listByReplicationStorageClassificationsAsync(resourceName, resourceGroupName, - fabricName, storageClassificationName, context)); - } - - /** - * Gets the details of a storage classification mapping. - * - * Gets the details of the specified storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification mapping along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName, - String storageClassificationMappingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (storageClassificationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null.")); - } - if (storageClassificationMappingName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter storageClassificationMappingName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, storageClassificationName, - storageClassificationMappingName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the details of a storage classification mapping. - * - * Gets the details of the specified storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification mapping along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName, - String storageClassificationMappingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (storageClassificationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null.")); - } - if (storageClassificationMappingName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter storageClassificationMappingName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, storageClassificationName, storageClassificationMappingName, - accept, context); - } - - /** - * Gets the details of a storage classification mapping. - * - * Gets the details of the specified storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification mapping on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the details of a storage classification mapping. - * - * Gets the details of the specified storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification mapping along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, context).block(); - } - - /** - * Gets the details of a storage classification mapping. - * - * Gets the details of the specified storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification mapping. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public StorageClassificationMappingInner get(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, Context.NONE).getValue(); - } - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage mapping object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName, - StorageClassificationMappingInput pairingInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (storageClassificationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null.")); - } - if (storageClassificationMappingName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter storageClassificationMappingName is required and cannot be null.")); - } - if (pairingInput == null) { - return Mono.error(new IllegalArgumentException("Parameter pairingInput is required and cannot be null.")); - } else { - pairingInput.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, storageClassificationName, - storageClassificationMappingName, pairingInput, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage mapping object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName, - StorageClassificationMappingInput pairingInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (storageClassificationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null.")); - } - if (storageClassificationMappingName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter storageClassificationMappingName is required and cannot be null.")); - } - if (pairingInput == null) { - return Mono.error(new IllegalArgumentException("Parameter pairingInput is required and cannot be null.")); - } else { - pairingInput.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, storageClassificationName, storageClassificationMappingName, - pairingInput, accept, context); - } - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of storage mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, StorageClassificationMappingInner> - beginCreateAsync(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName, - StorageClassificationMappingInput pairingInput) { - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - storageClassificationName, storageClassificationMappingName, pairingInput); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), StorageClassificationMappingInner.class, - StorageClassificationMappingInner.class, this.client.getContext()); - } - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of storage mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, StorageClassificationMappingInner> - beginCreateAsync(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName, - StorageClassificationMappingInput pairingInput, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName, - storageClassificationName, storageClassificationMappingName, pairingInput, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), StorageClassificationMappingInner.class, - StorageClassificationMappingInner.class, context); - } - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of storage mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StorageClassificationMappingInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String storageClassificationName, - String storageClassificationMappingName, StorageClassificationMappingInput pairingInput) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, pairingInput) - .getSyncPoller(); - } - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of storage mapping object. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StorageClassificationMappingInner> beginCreate( - String resourceName, String resourceGroupName, String fabricName, String storageClassificationName, - String storageClassificationMappingName, StorageClassificationMappingInput pairingInput, Context context) { - return this - .beginCreateAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, pairingInput, context) - .getSyncPoller(); - } - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage mapping object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName, - StorageClassificationMappingInput pairingInput) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, pairingInput).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage mapping object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName, - StorageClassificationMappingInput pairingInput, Context context) { - return beginCreateAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, pairingInput, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage mapping object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public StorageClassificationMappingInner create(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName, - StorageClassificationMappingInput pairingInput) { - return createAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, pairingInput).block(); - } - - /** - * Create storage classification mapping. - * - * The operation to create a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param pairingInput Pairing input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage mapping object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public StorageClassificationMappingInner create(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName, - StorageClassificationMappingInput pairingInput, Context context) { - return createAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, pairingInput, context).block(); - } - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (storageClassificationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null.")); - } - if (storageClassificationMappingName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter storageClassificationMappingName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, storageClassificationName, - storageClassificationMappingName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (storageClassificationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null.")); - } - if (storageClassificationMappingName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter storageClassificationMappingName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, storageClassificationName, storageClassificationMappingName, - context); - } - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName) { - Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, - storageClassificationName, storageClassificationMappingName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, - storageClassificationName, storageClassificationMappingName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName) { - return this - .beginDeleteAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName) - .getSyncPoller(); - } - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName, Context context) { - return this - .beginDeleteAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, context) - .getSyncPoller(); - } - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName, Context context) { - return beginDeleteAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName) { - deleteAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName).block(); - } - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName, Context context) { - deleteAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, context).block(); - } - - /** - * Gets the list of storage classification mappings objects under a vault. - * - * Lists the storage classification mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of storage classification mappings objects under a vault. - * - * Lists the storage classification mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of storage classification mappings objects under a vault. - * - * Lists the storage classification mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of storage classification mappings objects under a vault. - * - * Lists the storage classification mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of storage classification mappings objects under a vault. - * - * Lists the storage classification mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * Gets the list of storage classification mappings objects under a vault. - * - * Lists the storage classification mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, - Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationStorageClassificationsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationStorageClassificationsNext(nextLink, - this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationStorageClassificationsNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationStorageClassificationsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationMappingsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationMappingsImpl.java deleted file mode 100644 index 57564a0ce5a1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationMappingsImpl.java +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.StorageClassificationMappingsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMapping; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappings; - -public final class StorageClassificationMappingsImpl implements StorageClassificationMappings { - private static final ClientLogger LOGGER = new ClientLogger(StorageClassificationMappingsImpl.class); - - private final StorageClassificationMappingsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public StorageClassificationMappingsImpl(StorageClassificationMappingsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationStorageClassifications(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName) { - PagedIterable inner = this.serviceClient() - .listByReplicationStorageClassifications(resourceName, resourceGroupName, fabricName, - storageClassificationName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StorageClassificationMappingImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationStorageClassifications(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName, Context context) { - PagedIterable inner = this.serviceClient() - .listByReplicationStorageClassifications(resourceName, resourceGroupName, fabricName, - storageClassificationName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StorageClassificationMappingImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new StorageClassificationMappingImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public StorageClassificationMapping get(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName) { - StorageClassificationMappingInner inner = this.serviceClient() - .get(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName); - if (inner != null) { - return new StorageClassificationMappingImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName) { - this.serviceClient() - .delete(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName); - } - - public void delete(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName, Context context) { - this.serviceClient() - .delete(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, context); - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner - = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StorageClassificationMappingImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StorageClassificationMappingImpl(inner1, this.manager())); - } - - public StorageClassificationMapping getById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String storageClassificationName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationStorageClassifications"); - if (storageClassificationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationStorageClassifications'.", id))); - } - String storageClassificationMappingName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationStorageClassificationMappings"); - if (storageClassificationMappingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationStorageClassificationMappings'.", - id))); - } - return this - .getWithResponse(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String storageClassificationName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationStorageClassifications"); - if (storageClassificationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationStorageClassifications'.", id))); - } - String storageClassificationMappingName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationStorageClassificationMappings"); - if (storageClassificationMappingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationStorageClassificationMappings'.", - id))); - } - return this.getWithResponse(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, context); - } - - public void deleteById(String id) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String storageClassificationName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationStorageClassifications"); - if (storageClassificationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationStorageClassifications'.", id))); - } - String storageClassificationMappingName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationStorageClassificationMappings"); - if (storageClassificationMappingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationStorageClassificationMappings'.", - id))); - } - this.delete(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vaults'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String fabricName = ResourceManagerUtils.getValueFromIdByName(id, "replicationFabrics"); - if (fabricName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicationFabrics'.", id))); - } - String storageClassificationName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationStorageClassifications"); - if (storageClassificationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationStorageClassifications'.", id))); - } - String storageClassificationMappingName - = ResourceManagerUtils.getValueFromIdByName(id, "replicationStorageClassificationMappings"); - if (storageClassificationMappingName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'replicationStorageClassificationMappings'.", - id))); - } - this.delete(resourceName, resourceGroupName, fabricName, storageClassificationName, - storageClassificationMappingName, context); - } - - private StorageClassificationMappingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - public StorageClassificationMappingImpl define(String name) { - return new StorageClassificationMappingImpl(name, this.manager()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationsClientImpl.java deleted file mode 100644 index d37a8d0201c4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationsClientImpl.java +++ /dev/null @@ -1,699 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.StorageClassificationsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in StorageClassificationsClient. - */ -public final class StorageClassificationsClientImpl implements StorageClassificationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final StorageClassificationsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of StorageClassificationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - StorageClassificationsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(StorageClassificationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientStorageClassifications to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface StorageClassificationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationFabrics(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("storageClassificationName") String storageClassificationName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassifications") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationFabricsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of storage classification objects under a fabric. - * - * Lists the storage classifications available in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Site name of interest. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), - resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of storage classification objects under a fabric. - * - * Lists the storage classifications available in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Site name of interest. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsSinglePageAsync(String resourceName, - String resourceGroupName, String fabricName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of storage classification objects under a fabric. - * - * Lists the storage classifications available in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Site name of interest. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationFabricsAsync(String resourceName, - String resourceGroupName, String fabricName) { - return new PagedFlux<>( - () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName), - nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of storage classification objects under a fabric. - * - * Lists the storage classifications available in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Site name of interest. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationFabricsAsync(String resourceName, - String resourceGroupName, String fabricName, Context context) { - return new PagedFlux<>( - () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName, context), - nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of storage classification objects under a fabric. - * - * Lists the storage classifications available in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Site name of interest. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationFabrics(String resourceName, - String resourceGroupName, String fabricName) { - return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName)); - } - - /** - * Gets the list of storage classification objects under a fabric. - * - * Lists the storage classifications available in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Site name of interest. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationFabrics(String resourceName, - String resourceGroupName, String fabricName, Context context) { - return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName, context)); - } - - /** - * Gets the details of a storage classification. - * - * Gets the details of the specified storage classification. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (storageClassificationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, storageClassificationName, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the details of a storage classification. - * - * Gets the details of the specified storage classification. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (storageClassificationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter storageClassificationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, storageClassificationName, accept, context); - } - - /** - * Gets the details of a storage classification. - * - * Gets the details of the specified storage classification. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, storageClassificationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the details of a storage classification. - * - * Gets the details of the specified storage classification. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, fabricName, storageClassificationName, context) - .block(); - } - - /** - * Gets the details of a storage classification. - * - * Gets the details of the specified storage classification. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public StorageClassificationInner get(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName) { - return getWithResponse(resourceName, resourceGroupName, fabricName, storageClassificationName, Context.NONE) - .getValue(); - } - - /** - * Gets the list of storage classification objects under a vault. - * - * Lists the storage classifications in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of storage classification objects under a vault. - * - * Lists the storage classifications in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceName, - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of storage classification objects under a vault. - * - * Lists the storage classifications in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of storage classification objects under a vault. - * - * Lists the storage classifications in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceName, String resourceGroupName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of storage classification objects under a vault. - * - * Lists the storage classifications in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName)); - } - - /** - * Gets the list of storage classification objects under a vault. - * - * Lists the storage classifications in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceName, String resourceGroupName, - Context context) { - return new PagedIterable<>(listAsync(resourceName, resourceGroupName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationFabricsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationFabricsNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationsImpl.java deleted file mode 100644 index 57934f0bf94d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/StorageClassificationsImpl.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.StorageClassificationsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassification; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassifications; - -public final class StorageClassificationsImpl implements StorageClassifications { - private static final ClientLogger LOGGER = new ClientLogger(StorageClassificationsImpl.class); - - private final StorageClassificationsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public StorageClassificationsImpl(StorageClassificationsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName) { - PagedIterable inner - = this.serviceClient().listByReplicationFabrics(resourceName, resourceGroupName, fabricName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageClassificationImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context) { - PagedIterable inner - = this.serviceClient().listByReplicationFabrics(resourceName, resourceGroupName, fabricName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageClassificationImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceName, resourceGroupName, fabricName, storageClassificationName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new StorageClassificationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public StorageClassification get(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName) { - StorageClassificationInner inner - = this.serviceClient().get(resourceName, resourceGroupName, fabricName, storageClassificationName); - if (inner != null) { - return new StorageClassificationImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(resourceName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageClassificationImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceName, String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageClassificationImpl(inner1, this.manager())); - } - - private StorageClassificationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SupportedOperatingSystemsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SupportedOperatingSystemsImpl.java deleted file mode 100644 index 74933695c644..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SupportedOperatingSystemsImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.SupportedOperatingSystemsInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOSProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOperatingSystems; - -public final class SupportedOperatingSystemsImpl implements SupportedOperatingSystems { - private SupportedOperatingSystemsInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - SupportedOperatingSystemsImpl(SupportedOperatingSystemsInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SupportedOSProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public SupportedOperatingSystemsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SupportedOperatingSystemsOperationsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SupportedOperatingSystemsOperationsClientImpl.java deleted file mode 100644 index 735b9710a135..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SupportedOperatingSystemsOperationsClientImpl.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.SupportedOperatingSystemsOperationsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.SupportedOperatingSystemsInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SupportedOperatingSystemsOperationsClient. - */ -public final class SupportedOperatingSystemsOperationsClientImpl implements SupportedOperatingSystemsOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final SupportedOperatingSystemsOperationsService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of SupportedOperatingSystemsOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SupportedOperatingSystemsOperationsClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(SupportedOperatingSystemsOperationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientSupportedOperatingSystemsOperations to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface SupportedOperatingSystemsOperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationSupportedOperatingSystems") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("instanceType") String instanceType, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the data of supported operating systems by SRS. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param instanceType The instance type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the data of supported operating systems by SRS along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String instanceType) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), instanceType, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the data of supported operating systems by SRS. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param instanceType The instance type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the data of supported operating systems by SRS along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceName, - String resourceGroupName, String instanceType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName, - this.client.getSubscriptionId(), instanceType, accept, context); - } - - /** - * Gets the data of supported operating systems by SRS. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the data of supported operating systems by SRS on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceName, String resourceGroupName) { - final String instanceType = null; - return getWithResponseAsync(resourceName, resourceGroupName, instanceType) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the data of supported operating systems by SRS. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param instanceType The instance type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the data of supported operating systems by SRS along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceName, String resourceGroupName, - String instanceType, Context context) { - return getWithResponseAsync(resourceName, resourceGroupName, instanceType, context).block(); - } - - /** - * Gets the data of supported operating systems by SRS. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the data of supported operating systems by SRS. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SupportedOperatingSystemsInner get(String resourceName, String resourceGroupName) { - final String instanceType = null; - return getWithResponse(resourceName, resourceGroupName, instanceType, Context.NONE).getValue(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SupportedOperatingSystemsOperationsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SupportedOperatingSystemsOperationsImpl.java deleted file mode 100644 index 17e0fe5620f7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SupportedOperatingSystemsOperationsImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.SupportedOperatingSystemsOperationsClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.SupportedOperatingSystemsInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOperatingSystems; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOperatingSystemsOperations; - -public final class SupportedOperatingSystemsOperationsImpl implements SupportedOperatingSystemsOperations { - private static final ClientLogger LOGGER = new ClientLogger(SupportedOperatingSystemsOperationsImpl.class); - - private final SupportedOperatingSystemsOperationsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public SupportedOperatingSystemsOperationsImpl(SupportedOperatingSystemsOperationsClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceName, String resourceGroupName, - String instanceType, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceName, resourceGroupName, instanceType, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new SupportedOperatingSystemsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public SupportedOperatingSystems get(String resourceName, String resourceGroupName) { - SupportedOperatingSystemsInner inner = this.serviceClient().get(resourceName, resourceGroupName); - if (inner != null) { - return new SupportedOperatingSystemsImpl(inner, this.manager()); - } else { - return null; - } - } - - private SupportedOperatingSystemsOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/TargetComputeSizeImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/TargetComputeSizeImpl.java deleted file mode 100644 index 424600d08088..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/TargetComputeSizeImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.TargetComputeSizeInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TargetComputeSize; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TargetComputeSizeProperties; - -public final class TargetComputeSizeImpl implements TargetComputeSize { - private TargetComputeSizeInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - TargetComputeSizeImpl(TargetComputeSizeInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public TargetComputeSizeProperties properties() { - return this.innerModel().properties(); - } - - public TargetComputeSizeInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/TargetComputeSizesClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/TargetComputeSizesClientImpl.java deleted file mode 100644 index a697f7b98a83..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/TargetComputeSizesClientImpl.java +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.TargetComputeSizesClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.TargetComputeSizeInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TargetComputeSizeCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in TargetComputeSizesClient. - */ -public final class TargetComputeSizesClientImpl implements TargetComputeSizesClient { - /** - * The proxy service used to perform REST calls. - */ - private final TargetComputeSizesService service; - - /** - * The service client containing this operation class. - */ - private final SiteRecoveryManagementClientImpl client; - - /** - * Initializes an instance of TargetComputeSizesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - TargetComputeSizesClientImpl(SiteRecoveryManagementClientImpl client) { - this.service = RestProxy.create(TargetComputeSizesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SiteRecoveryManagementClientTargetComputeSizes to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SiteRecoveryManageme") - public interface TargetComputeSizesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/targetComputeSizes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationProtectedItems(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("protectionContainerName") String protectionContainerName, - @PathParam("replicatedProtectedItemName") String replicatedProtectedItemName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByReplicationProtectedItemsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the list of target compute sizes for the replication protected item. - * - * Lists the available target compute sizes for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return target compute size collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectedItemsSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationProtectedItems(this.client.getEndpoint(), - this.client.getApiVersion(), resourceName, resourceGroupName, this.client.getSubscriptionId(), - fabricName, protectionContainerName, replicatedProtectedItemName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of target compute sizes for the replication protected item. - * - * Lists the available target compute sizes for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return target compute size collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByReplicationProtectedItemsSinglePageAsync( - String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (protectionContainerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null.")); - } - if (replicatedProtectedItemName == null) { - return Mono.error( - new IllegalArgumentException("Parameter replicatedProtectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByReplicationProtectedItems(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, - replicatedProtectedItemName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of target compute sizes for the replication protected item. - * - * Lists the available target compute sizes for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return target compute size collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectedItemsAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - return new PagedFlux<>( - () -> listByReplicationProtectedItemsSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName), - nextLink -> listByReplicationProtectedItemsNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of target compute sizes for the replication protected item. - * - * Lists the available target compute sizes for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return target compute size collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByReplicationProtectedItemsAsync(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - Context context) { - return new PagedFlux<>( - () -> listByReplicationProtectedItemsSinglePageAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, context), - nextLink -> listByReplicationProtectedItemsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of target compute sizes for the replication protected item. - * - * Lists the available target compute sizes for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return target compute size collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationProtectedItems(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - return new PagedIterable<>(listByReplicationProtectedItemsAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName)); - } - - /** - * Gets the list of target compute sizes for the replication protected item. - * - * Lists the available target compute sizes for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return target compute size collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByReplicationProtectedItems(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - Context context) { - return new PagedIterable<>(listByReplicationProtectedItemsAsync(resourceName, resourceGroupName, fabricName, - protectionContainerName, replicatedProtectedItemName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return target compute size collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationProtectedItemsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByReplicationProtectedItemsNext(nextLink, this.client.getEndpoint(), - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return target compute size collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByReplicationProtectedItemsNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByReplicationProtectedItemsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/TargetComputeSizesImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/TargetComputeSizesImpl.java deleted file mode 100644 index 2c3ba1b24044..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/TargetComputeSizesImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.TargetComputeSizesClient; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.TargetComputeSizeInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TargetComputeSize; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TargetComputeSizes; - -public final class TargetComputeSizesImpl implements TargetComputeSizes { - private static final ClientLogger LOGGER = new ClientLogger(TargetComputeSizesImpl.class); - - private final TargetComputeSizesClient innerClient; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public TargetComputeSizesImpl(TargetComputeSizesClient innerClient, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByReplicationProtectedItems(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName) { - PagedIterable inner = this.serviceClient() - .listByReplicationProtectedItems(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TargetComputeSizeImpl(inner1, this.manager())); - } - - public PagedIterable listByReplicationProtectedItems(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, String replicatedProtectedItemName, - Context context) { - PagedIterable inner = this.serviceClient() - .listByReplicationProtectedItems(resourceName, resourceGroupName, fabricName, protectionContainerName, - replicatedProtectedItemName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TargetComputeSizeImpl(inner1, this.manager())); - } - - private TargetComputeSizesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/VCenterImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/VCenterImpl.java deleted file mode 100644 index 07f274fc614b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/VCenterImpl.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VCenterInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddVCenterRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddVCenterRequestProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateVCenterRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateVCenterRequestProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VCenter; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VCenterProperties; - -public final class VCenterImpl implements VCenter, VCenter.Definition, VCenter.Update { - private VCenterInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public VCenterProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public VCenterInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String fabricName; - - private String vcenterName; - - private AddVCenterRequest createAddVCenterRequest; - - private UpdateVCenterRequest updateUpdateVCenterRequest; - - public VCenterImpl withExistingReplicationFabric(String resourceName, String resourceGroupName, String fabricName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - this.fabricName = fabricName; - return this; - } - - public VCenter create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationvCenters() - .create(resourceName, resourceGroupName, fabricName, vcenterName, createAddVCenterRequest, Context.NONE); - return this; - } - - public VCenter create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationvCenters() - .create(resourceName, resourceGroupName, fabricName, vcenterName, createAddVCenterRequest, context); - return this; - } - - VCenterImpl(String name, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new VCenterInner(); - this.serviceManager = serviceManager; - this.vcenterName = name; - this.createAddVCenterRequest = new AddVCenterRequest(); - } - - public VCenterImpl update() { - this.updateUpdateVCenterRequest = new UpdateVCenterRequest(); - return this; - } - - public VCenter apply() { - this.innerObject = serviceManager.serviceClient() - .getReplicationvCenters() - .update(resourceName, resourceGroupName, fabricName, vcenterName, updateUpdateVCenterRequest, Context.NONE); - return this; - } - - public VCenter apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationvCenters() - .update(resourceName, resourceGroupName, fabricName, vcenterName, updateUpdateVCenterRequest, context); - return this; - } - - VCenterImpl(VCenterInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "vaults"); - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.fabricName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationFabrics"); - this.vcenterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicationvCenters"); - } - - public VCenter refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplicationvCenters() - .getWithResponse(resourceName, resourceGroupName, fabricName, vcenterName, Context.NONE) - .getValue(); - return this; - } - - public VCenter refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationvCenters() - .getWithResponse(resourceName, resourceGroupName, fabricName, vcenterName, context) - .getValue(); - return this; - } - - public VCenterImpl withProperties(AddVCenterRequestProperties properties) { - this.createAddVCenterRequest.withProperties(properties); - return this; - } - - public VCenterImpl withProperties(UpdateVCenterRequestProperties properties) { - this.updateUpdateVCenterRequest.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/VaultHealthDetailsImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/VaultHealthDetailsImpl.java deleted file mode 100644 index b2c3331c865b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/VaultHealthDetailsImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultHealthDetailsInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultHealthDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultHealthProperties; - -public final class VaultHealthDetailsImpl implements VaultHealthDetails { - private VaultHealthDetailsInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - VaultHealthDetailsImpl(VaultHealthDetailsInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public VaultHealthProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public VaultHealthDetailsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/VaultSettingImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/VaultSettingImpl.java deleted file mode 100644 index 6509d32dbe7d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/VaultSettingImpl.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultSettingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSetting; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingCreationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingCreationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingProperties; - -public final class VaultSettingImpl implements VaultSetting, VaultSetting.Definition { - private VaultSettingInner innerObject; - - private final com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager; - - VaultSettingImpl(VaultSettingInner innerObject, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public VaultSettingProperties properties() { - return this.innerModel().properties(); - } - - public String location() { - return this.innerModel().location(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public VaultSettingInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager() { - return this.serviceManager; - } - - private String resourceName; - - private String resourceGroupName; - - private String vaultSettingName; - - private VaultSettingCreationInput createInput; - - public VaultSettingImpl withExistingVault(String resourceName, String resourceGroupName) { - this.resourceName = resourceName; - this.resourceGroupName = resourceGroupName; - return this; - } - - public VaultSetting create() { - this.innerObject = serviceManager.serviceClient() - .getReplicationVaultSettings() - .create(resourceName, resourceGroupName, vaultSettingName, createInput, Context.NONE); - return this; - } - - public VaultSetting create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationVaultSettings() - .create(resourceName, resourceGroupName, vaultSettingName, createInput, context); - return this; - } - - VaultSettingImpl(String name, - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager serviceManager) { - this.innerObject = new VaultSettingInner(); - this.serviceManager = serviceManager; - this.vaultSettingName = name; - this.createInput = new VaultSettingCreationInput(); - } - - public VaultSetting refresh() { - this.innerObject = serviceManager.serviceClient() - .getReplicationVaultSettings() - .getWithResponse(resourceName, resourceGroupName, vaultSettingName, Context.NONE) - .getValue(); - return this; - } - - public VaultSetting refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getReplicationVaultSettings() - .getWithResponse(resourceName, resourceGroupName, vaultSettingName, context) - .getValue(); - return this; - } - - public VaultSettingImpl withProperties(VaultSettingCreationInputProperties properties) { - this.createInput.withProperties(properties); - return this; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/package-info.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/package-info.java deleted file mode 100644 index 94f7e9a728b3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the implementations for SiteRecoveryManagementClient. - * null. - */ -package com.azure.resourcemanager.recoveryservicessiterecovery.implementation; diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AAddDisksInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AAddDisksInput.java deleted file mode 100644 index e706fbb7a0bb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AAddDisksInput.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A2A add disk(s) input. - */ -@Fluent -public final class A2AAddDisksInput extends AddDisksProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /* - * The list of vm disk details. - */ - private List vmDisks; - - /* - * The list of vm managed disk details. - */ - private List vmManagedDisks; - - /** - * Creates an instance of A2AAddDisksInput class. - */ - public A2AAddDisksInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the vmDisks property: The list of vm disk details. - * - * @return the vmDisks value. - */ - public List vmDisks() { - return this.vmDisks; - } - - /** - * Set the vmDisks property: The list of vm disk details. - * - * @param vmDisks the vmDisks value to set. - * @return the A2AAddDisksInput object itself. - */ - public A2AAddDisksInput withVmDisks(List vmDisks) { - this.vmDisks = vmDisks; - return this; - } - - /** - * Get the vmManagedDisks property: The list of vm managed disk details. - * - * @return the vmManagedDisks value. - */ - public List vmManagedDisks() { - return this.vmManagedDisks; - } - - /** - * Set the vmManagedDisks property: The list of vm managed disk details. - * - * @param vmManagedDisks the vmManagedDisks value to set. - * @return the A2AAddDisksInput object itself. - */ - public A2AAddDisksInput withVmManagedDisks(List vmManagedDisks) { - this.vmManagedDisks = vmManagedDisks; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmDisks() != null) { - vmDisks().forEach(e -> e.validate()); - } - if (vmManagedDisks() != null) { - vmManagedDisks().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("vmDisks", this.vmDisks, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("vmManagedDisks", this.vmManagedDisks, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AAddDisksInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AAddDisksInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AAddDisksInput. - */ - public static A2AAddDisksInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AAddDisksInput deserializedA2AAddDisksInput = new A2AAddDisksInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2AAddDisksInput.instanceType = reader.getString(); - } else if ("vmDisks".equals(fieldName)) { - List vmDisks - = reader.readArray(reader1 -> A2AVmDiskInputDetails.fromJson(reader1)); - deserializedA2AAddDisksInput.vmDisks = vmDisks; - } else if ("vmManagedDisks".equals(fieldName)) { - List vmManagedDisks - = reader.readArray(reader1 -> A2AVmManagedDiskInputDetails.fromJson(reader1)); - deserializedA2AAddDisksInput.vmManagedDisks = vmManagedDisks; - } else { - reader.skipChildren(); - } - } - - return deserializedA2AAddDisksInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AApplyRecoveryPointInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AApplyRecoveryPointInput.java deleted file mode 100644 index daaf20259daf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AApplyRecoveryPointInput.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * ApplyRecoveryPoint input specific to A2A provider. - */ -@Immutable -public final class A2AApplyRecoveryPointInput extends ApplyRecoveryPointProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /** - * Creates an instance of A2AApplyRecoveryPointInput class. - */ - public A2AApplyRecoveryPointInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AApplyRecoveryPointInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AApplyRecoveryPointInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AApplyRecoveryPointInput. - */ - public static A2AApplyRecoveryPointInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AApplyRecoveryPointInput deserializedA2AApplyRecoveryPointInput = new A2AApplyRecoveryPointInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2AApplyRecoveryPointInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AApplyRecoveryPointInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AContainerCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AContainerCreationInput.java deleted file mode 100644 index bd2975484fcc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AContainerCreationInput.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A cloud creation input. - */ -@Immutable -public final class A2AContainerCreationInput extends ReplicationProviderSpecificContainerCreationInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /** - * Creates an instance of A2AContainerCreationInput class. - */ - public A2AContainerCreationInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AContainerCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AContainerCreationInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AContainerCreationInput. - */ - public static A2AContainerCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AContainerCreationInput deserializedA2AContainerCreationInput = new A2AContainerCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2AContainerCreationInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AContainerCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AContainerMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AContainerMappingInput.java deleted file mode 100644 index 5fe1bbce00df..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AContainerMappingInput.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A container mapping input. - */ -@Fluent -public final class A2AContainerMappingInput extends ReplicationProviderSpecificContainerMappingInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /* - * A value indicating whether the auto update is enabled. - */ - private AgentAutoUpdateStatus agentAutoUpdateStatus; - - /* - * The automation account arm id. - */ - private String automationAccountArmId; - - /* - * A value indicating the type authentication to use for automation Account. - */ - private AutomationAccountAuthenticationType automationAccountAuthenticationType; - - /** - * Creates an instance of A2AContainerMappingInput class. - */ - public A2AContainerMappingInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the agentAutoUpdateStatus property: A value indicating whether the auto update is enabled. - * - * @return the agentAutoUpdateStatus value. - */ - public AgentAutoUpdateStatus agentAutoUpdateStatus() { - return this.agentAutoUpdateStatus; - } - - /** - * Set the agentAutoUpdateStatus property: A value indicating whether the auto update is enabled. - * - * @param agentAutoUpdateStatus the agentAutoUpdateStatus value to set. - * @return the A2AContainerMappingInput object itself. - */ - public A2AContainerMappingInput withAgentAutoUpdateStatus(AgentAutoUpdateStatus agentAutoUpdateStatus) { - this.agentAutoUpdateStatus = agentAutoUpdateStatus; - return this; - } - - /** - * Get the automationAccountArmId property: The automation account arm id. - * - * @return the automationAccountArmId value. - */ - public String automationAccountArmId() { - return this.automationAccountArmId; - } - - /** - * Set the automationAccountArmId property: The automation account arm id. - * - * @param automationAccountArmId the automationAccountArmId value to set. - * @return the A2AContainerMappingInput object itself. - */ - public A2AContainerMappingInput withAutomationAccountArmId(String automationAccountArmId) { - this.automationAccountArmId = automationAccountArmId; - return this; - } - - /** - * Get the automationAccountAuthenticationType property: A value indicating the type authentication to use for - * automation Account. - * - * @return the automationAccountAuthenticationType value. - */ - public AutomationAccountAuthenticationType automationAccountAuthenticationType() { - return this.automationAccountAuthenticationType; - } - - /** - * Set the automationAccountAuthenticationType property: A value indicating the type authentication to use for - * automation Account. - * - * @param automationAccountAuthenticationType the automationAccountAuthenticationType value to set. - * @return the A2AContainerMappingInput object itself. - */ - public A2AContainerMappingInput withAutomationAccountAuthenticationType( - AutomationAccountAuthenticationType automationAccountAuthenticationType) { - this.automationAccountAuthenticationType = automationAccountAuthenticationType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("agentAutoUpdateStatus", - this.agentAutoUpdateStatus == null ? null : this.agentAutoUpdateStatus.toString()); - jsonWriter.writeStringField("automationAccountArmId", this.automationAccountArmId); - jsonWriter.writeStringField("automationAccountAuthenticationType", - this.automationAccountAuthenticationType == null - ? null - : this.automationAccountAuthenticationType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AContainerMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AContainerMappingInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AContainerMappingInput. - */ - public static A2AContainerMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AContainerMappingInput deserializedA2AContainerMappingInput = new A2AContainerMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2AContainerMappingInput.instanceType = reader.getString(); - } else if ("agentAutoUpdateStatus".equals(fieldName)) { - deserializedA2AContainerMappingInput.agentAutoUpdateStatus - = AgentAutoUpdateStatus.fromString(reader.getString()); - } else if ("automationAccountArmId".equals(fieldName)) { - deserializedA2AContainerMappingInput.automationAccountArmId = reader.getString(); - } else if ("automationAccountAuthenticationType".equals(fieldName)) { - deserializedA2AContainerMappingInput.automationAccountAuthenticationType - = AutomationAccountAuthenticationType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AContainerMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACreateProtectionIntentInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACreateProtectionIntentInput.java deleted file mode 100644 index d49523ff7299..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACreateProtectionIntentInput.java +++ /dev/null @@ -1,797 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A2A create protection intent input. - */ -@Fluent -public final class A2ACreateProtectionIntentInput extends CreateProtectionIntentProviderSpecificDetails { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /* - * The fabric specific object Id of the virtual machine. - */ - private String fabricObjectId; - - /* - * The primary location for the virtual machine. - */ - private String primaryLocation; - - /* - * The recovery location for the virtual machine. - */ - private String recoveryLocation; - - /* - * The recovery subscription Id of the virtual machine. - */ - private String recoverySubscriptionId; - - /* - * The recovery availability type of the virtual machine. - */ - private A2ARecoveryAvailabilityType recoveryAvailabilityType; - - /* - * The protection profile custom inputs. - */ - private ProtectionProfileCustomDetails protectionProfileCustomInput; - - /* - * The recovery resource group Id. Valid for V2 scenarios. - */ - private String recoveryResourceGroupId; - - /* - * The primary staging storage account input. - */ - private StorageAccountCustomDetails primaryStagingStorageAccountCustomInput; - - /* - * The recovery availability set input. - */ - private RecoveryAvailabilitySetCustomDetails recoveryAvailabilitySetCustomInput; - - /* - * The recovery virtual network input. - */ - private RecoveryVirtualNetworkCustomDetails recoveryVirtualNetworkCustomInput; - - /* - * The recovery proximity placement group custom input. - */ - private RecoveryProximityPlacementGroupCustomDetails recoveryProximityPlacementGroupCustomInput; - - /* - * A value indicating whether the auto protection is enabled. - */ - private AutoProtectionOfDataDisk autoProtectionOfDataDisk; - - /* - * The list of vm disk inputs. - */ - private List vmDisks; - - /* - * The list of vm managed disk inputs. - */ - private List vmManagedDisks; - - /* - * The multi vm group name. - */ - private String multiVmGroupName; - - /* - * The multi vm group id. - */ - private String multiVmGroupId; - - /* - * The boot diagnostic storage account. - */ - private StorageAccountCustomDetails recoveryBootDiagStorageAccount; - - /* - * The recovery disk encryption information (for two pass flows). - */ - private DiskEncryptionInfo diskEncryptionInfo; - - /* - * The recovery availability zone. - */ - private String recoveryAvailabilityZone; - - /* - * A value indicating whether the auto update is enabled. - */ - private AgentAutoUpdateStatus agentAutoUpdateStatus; - - /* - * A value indicating the authentication type for automation account. The default value is "RunAsAccount". - */ - private AutomationAccountAuthenticationType automationAccountAuthenticationType; - - /* - * The automation account arm id. - */ - private String automationAccountArmId; - - /** - * Creates an instance of A2ACreateProtectionIntentInput class. - */ - public A2ACreateProtectionIntentInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the fabricObjectId property: The fabric specific object Id of the virtual machine. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Set the fabricObjectId property: The fabric specific object Id of the virtual machine. - * - * @param fabricObjectId the fabricObjectId value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withFabricObjectId(String fabricObjectId) { - this.fabricObjectId = fabricObjectId; - return this; - } - - /** - * Get the primaryLocation property: The primary location for the virtual machine. - * - * @return the primaryLocation value. - */ - public String primaryLocation() { - return this.primaryLocation; - } - - /** - * Set the primaryLocation property: The primary location for the virtual machine. - * - * @param primaryLocation the primaryLocation value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withPrimaryLocation(String primaryLocation) { - this.primaryLocation = primaryLocation; - return this; - } - - /** - * Get the recoveryLocation property: The recovery location for the virtual machine. - * - * @return the recoveryLocation value. - */ - public String recoveryLocation() { - return this.recoveryLocation; - } - - /** - * Set the recoveryLocation property: The recovery location for the virtual machine. - * - * @param recoveryLocation the recoveryLocation value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withRecoveryLocation(String recoveryLocation) { - this.recoveryLocation = recoveryLocation; - return this; - } - - /** - * Get the recoverySubscriptionId property: The recovery subscription Id of the virtual machine. - * - * @return the recoverySubscriptionId value. - */ - public String recoverySubscriptionId() { - return this.recoverySubscriptionId; - } - - /** - * Set the recoverySubscriptionId property: The recovery subscription Id of the virtual machine. - * - * @param recoverySubscriptionId the recoverySubscriptionId value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withRecoverySubscriptionId(String recoverySubscriptionId) { - this.recoverySubscriptionId = recoverySubscriptionId; - return this; - } - - /** - * Get the recoveryAvailabilityType property: The recovery availability type of the virtual machine. - * - * @return the recoveryAvailabilityType value. - */ - public A2ARecoveryAvailabilityType recoveryAvailabilityType() { - return this.recoveryAvailabilityType; - } - - /** - * Set the recoveryAvailabilityType property: The recovery availability type of the virtual machine. - * - * @param recoveryAvailabilityType the recoveryAvailabilityType value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput - withRecoveryAvailabilityType(A2ARecoveryAvailabilityType recoveryAvailabilityType) { - this.recoveryAvailabilityType = recoveryAvailabilityType; - return this; - } - - /** - * Get the protectionProfileCustomInput property: The protection profile custom inputs. - * - * @return the protectionProfileCustomInput value. - */ - public ProtectionProfileCustomDetails protectionProfileCustomInput() { - return this.protectionProfileCustomInput; - } - - /** - * Set the protectionProfileCustomInput property: The protection profile custom inputs. - * - * @param protectionProfileCustomInput the protectionProfileCustomInput value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput - withProtectionProfileCustomInput(ProtectionProfileCustomDetails protectionProfileCustomInput) { - this.protectionProfileCustomInput = protectionProfileCustomInput; - return this; - } - - /** - * Get the recoveryResourceGroupId property: The recovery resource group Id. Valid for V2 scenarios. - * - * @return the recoveryResourceGroupId value. - */ - public String recoveryResourceGroupId() { - return this.recoveryResourceGroupId; - } - - /** - * Set the recoveryResourceGroupId property: The recovery resource group Id. Valid for V2 scenarios. - * - * @param recoveryResourceGroupId the recoveryResourceGroupId value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withRecoveryResourceGroupId(String recoveryResourceGroupId) { - this.recoveryResourceGroupId = recoveryResourceGroupId; - return this; - } - - /** - * Get the primaryStagingStorageAccountCustomInput property: The primary staging storage account input. - * - * @return the primaryStagingStorageAccountCustomInput value. - */ - public StorageAccountCustomDetails primaryStagingStorageAccountCustomInput() { - return this.primaryStagingStorageAccountCustomInput; - } - - /** - * Set the primaryStagingStorageAccountCustomInput property: The primary staging storage account input. - * - * @param primaryStagingStorageAccountCustomInput the primaryStagingStorageAccountCustomInput value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withPrimaryStagingStorageAccountCustomInput( - StorageAccountCustomDetails primaryStagingStorageAccountCustomInput) { - this.primaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput; - return this; - } - - /** - * Get the recoveryAvailabilitySetCustomInput property: The recovery availability set input. - * - * @return the recoveryAvailabilitySetCustomInput value. - */ - public RecoveryAvailabilitySetCustomDetails recoveryAvailabilitySetCustomInput() { - return this.recoveryAvailabilitySetCustomInput; - } - - /** - * Set the recoveryAvailabilitySetCustomInput property: The recovery availability set input. - * - * @param recoveryAvailabilitySetCustomInput the recoveryAvailabilitySetCustomInput value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withRecoveryAvailabilitySetCustomInput( - RecoveryAvailabilitySetCustomDetails recoveryAvailabilitySetCustomInput) { - this.recoveryAvailabilitySetCustomInput = recoveryAvailabilitySetCustomInput; - return this; - } - - /** - * Get the recoveryVirtualNetworkCustomInput property: The recovery virtual network input. - * - * @return the recoveryVirtualNetworkCustomInput value. - */ - public RecoveryVirtualNetworkCustomDetails recoveryVirtualNetworkCustomInput() { - return this.recoveryVirtualNetworkCustomInput; - } - - /** - * Set the recoveryVirtualNetworkCustomInput property: The recovery virtual network input. - * - * @param recoveryVirtualNetworkCustomInput the recoveryVirtualNetworkCustomInput value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput - withRecoveryVirtualNetworkCustomInput(RecoveryVirtualNetworkCustomDetails recoveryVirtualNetworkCustomInput) { - this.recoveryVirtualNetworkCustomInput = recoveryVirtualNetworkCustomInput; - return this; - } - - /** - * Get the recoveryProximityPlacementGroupCustomInput property: The recovery proximity placement group custom input. - * - * @return the recoveryProximityPlacementGroupCustomInput value. - */ - public RecoveryProximityPlacementGroupCustomDetails recoveryProximityPlacementGroupCustomInput() { - return this.recoveryProximityPlacementGroupCustomInput; - } - - /** - * Set the recoveryProximityPlacementGroupCustomInput property: The recovery proximity placement group custom input. - * - * @param recoveryProximityPlacementGroupCustomInput the recoveryProximityPlacementGroupCustomInput value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withRecoveryProximityPlacementGroupCustomInput( - RecoveryProximityPlacementGroupCustomDetails recoveryProximityPlacementGroupCustomInput) { - this.recoveryProximityPlacementGroupCustomInput = recoveryProximityPlacementGroupCustomInput; - return this; - } - - /** - * Get the autoProtectionOfDataDisk property: A value indicating whether the auto protection is enabled. - * - * @return the autoProtectionOfDataDisk value. - */ - public AutoProtectionOfDataDisk autoProtectionOfDataDisk() { - return this.autoProtectionOfDataDisk; - } - - /** - * Set the autoProtectionOfDataDisk property: A value indicating whether the auto protection is enabled. - * - * @param autoProtectionOfDataDisk the autoProtectionOfDataDisk value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput - withAutoProtectionOfDataDisk(AutoProtectionOfDataDisk autoProtectionOfDataDisk) { - this.autoProtectionOfDataDisk = autoProtectionOfDataDisk; - return this; - } - - /** - * Get the vmDisks property: The list of vm disk inputs. - * - * @return the vmDisks value. - */ - public List vmDisks() { - return this.vmDisks; - } - - /** - * Set the vmDisks property: The list of vm disk inputs. - * - * @param vmDisks the vmDisks value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withVmDisks(List vmDisks) { - this.vmDisks = vmDisks; - return this; - } - - /** - * Get the vmManagedDisks property: The list of vm managed disk inputs. - * - * @return the vmManagedDisks value. - */ - public List vmManagedDisks() { - return this.vmManagedDisks; - } - - /** - * Set the vmManagedDisks property: The list of vm managed disk inputs. - * - * @param vmManagedDisks the vmManagedDisks value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput - withVmManagedDisks(List vmManagedDisks) { - this.vmManagedDisks = vmManagedDisks; - return this; - } - - /** - * Get the multiVmGroupName property: The multi vm group name. - * - * @return the multiVmGroupName value. - */ - public String multiVmGroupName() { - return this.multiVmGroupName; - } - - /** - * Set the multiVmGroupName property: The multi vm group name. - * - * @param multiVmGroupName the multiVmGroupName value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withMultiVmGroupName(String multiVmGroupName) { - this.multiVmGroupName = multiVmGroupName; - return this; - } - - /** - * Get the multiVmGroupId property: The multi vm group id. - * - * @return the multiVmGroupId value. - */ - public String multiVmGroupId() { - return this.multiVmGroupId; - } - - /** - * Set the multiVmGroupId property: The multi vm group id. - * - * @param multiVmGroupId the multiVmGroupId value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withMultiVmGroupId(String multiVmGroupId) { - this.multiVmGroupId = multiVmGroupId; - return this; - } - - /** - * Get the recoveryBootDiagStorageAccount property: The boot diagnostic storage account. - * - * @return the recoveryBootDiagStorageAccount value. - */ - public StorageAccountCustomDetails recoveryBootDiagStorageAccount() { - return this.recoveryBootDiagStorageAccount; - } - - /** - * Set the recoveryBootDiagStorageAccount property: The boot diagnostic storage account. - * - * @param recoveryBootDiagStorageAccount the recoveryBootDiagStorageAccount value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput - withRecoveryBootDiagStorageAccount(StorageAccountCustomDetails recoveryBootDiagStorageAccount) { - this.recoveryBootDiagStorageAccount = recoveryBootDiagStorageAccount; - return this; - } - - /** - * Get the diskEncryptionInfo property: The recovery disk encryption information (for two pass flows). - * - * @return the diskEncryptionInfo value. - */ - public DiskEncryptionInfo diskEncryptionInfo() { - return this.diskEncryptionInfo; - } - - /** - * Set the diskEncryptionInfo property: The recovery disk encryption information (for two pass flows). - * - * @param diskEncryptionInfo the diskEncryptionInfo value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withDiskEncryptionInfo(DiskEncryptionInfo diskEncryptionInfo) { - this.diskEncryptionInfo = diskEncryptionInfo; - return this; - } - - /** - * Get the recoveryAvailabilityZone property: The recovery availability zone. - * - * @return the recoveryAvailabilityZone value. - */ - public String recoveryAvailabilityZone() { - return this.recoveryAvailabilityZone; - } - - /** - * Set the recoveryAvailabilityZone property: The recovery availability zone. - * - * @param recoveryAvailabilityZone the recoveryAvailabilityZone value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withRecoveryAvailabilityZone(String recoveryAvailabilityZone) { - this.recoveryAvailabilityZone = recoveryAvailabilityZone; - return this; - } - - /** - * Get the agentAutoUpdateStatus property: A value indicating whether the auto update is enabled. - * - * @return the agentAutoUpdateStatus value. - */ - public AgentAutoUpdateStatus agentAutoUpdateStatus() { - return this.agentAutoUpdateStatus; - } - - /** - * Set the agentAutoUpdateStatus property: A value indicating whether the auto update is enabled. - * - * @param agentAutoUpdateStatus the agentAutoUpdateStatus value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withAgentAutoUpdateStatus(AgentAutoUpdateStatus agentAutoUpdateStatus) { - this.agentAutoUpdateStatus = agentAutoUpdateStatus; - return this; - } - - /** - * Get the automationAccountAuthenticationType property: A value indicating the authentication type for automation - * account. The default value is "RunAsAccount". - * - * @return the automationAccountAuthenticationType value. - */ - public AutomationAccountAuthenticationType automationAccountAuthenticationType() { - return this.automationAccountAuthenticationType; - } - - /** - * Set the automationAccountAuthenticationType property: A value indicating the authentication type for automation - * account. The default value is "RunAsAccount". - * - * @param automationAccountAuthenticationType the automationAccountAuthenticationType value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withAutomationAccountAuthenticationType( - AutomationAccountAuthenticationType automationAccountAuthenticationType) { - this.automationAccountAuthenticationType = automationAccountAuthenticationType; - return this; - } - - /** - * Get the automationAccountArmId property: The automation account arm id. - * - * @return the automationAccountArmId value. - */ - public String automationAccountArmId() { - return this.automationAccountArmId; - } - - /** - * Set the automationAccountArmId property: The automation account arm id. - * - * @param automationAccountArmId the automationAccountArmId value to set. - * @return the A2ACreateProtectionIntentInput object itself. - */ - public A2ACreateProtectionIntentInput withAutomationAccountArmId(String automationAccountArmId) { - this.automationAccountArmId = automationAccountArmId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (fabricObjectId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property fabricObjectId in model A2ACreateProtectionIntentInput")); - } - if (primaryLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property primaryLocation in model A2ACreateProtectionIntentInput")); - } - if (recoveryLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryLocation in model A2ACreateProtectionIntentInput")); - } - if (recoverySubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoverySubscriptionId in model A2ACreateProtectionIntentInput")); - } - if (recoveryAvailabilityType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryAvailabilityType in model A2ACreateProtectionIntentInput")); - } - if (protectionProfileCustomInput() != null) { - protectionProfileCustomInput().validate(); - } - if (recoveryResourceGroupId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryResourceGroupId in model A2ACreateProtectionIntentInput")); - } - if (primaryStagingStorageAccountCustomInput() != null) { - primaryStagingStorageAccountCustomInput().validate(); - } - if (recoveryAvailabilitySetCustomInput() != null) { - recoveryAvailabilitySetCustomInput().validate(); - } - if (recoveryVirtualNetworkCustomInput() != null) { - recoveryVirtualNetworkCustomInput().validate(); - } - if (recoveryProximityPlacementGroupCustomInput() != null) { - recoveryProximityPlacementGroupCustomInput().validate(); - } - if (vmDisks() != null) { - vmDisks().forEach(e -> e.validate()); - } - if (vmManagedDisks() != null) { - vmManagedDisks().forEach(e -> e.validate()); - } - if (recoveryBootDiagStorageAccount() != null) { - recoveryBootDiagStorageAccount().validate(); - } - if (diskEncryptionInfo() != null) { - diskEncryptionInfo().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(A2ACreateProtectionIntentInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fabricObjectId", this.fabricObjectId); - jsonWriter.writeStringField("primaryLocation", this.primaryLocation); - jsonWriter.writeStringField("recoveryLocation", this.recoveryLocation); - jsonWriter.writeStringField("recoverySubscriptionId", this.recoverySubscriptionId); - jsonWriter.writeStringField("recoveryAvailabilityType", - this.recoveryAvailabilityType == null ? null : this.recoveryAvailabilityType.toString()); - jsonWriter.writeStringField("recoveryResourceGroupId", this.recoveryResourceGroupId); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeJsonField("protectionProfileCustomInput", this.protectionProfileCustomInput); - jsonWriter.writeJsonField("primaryStagingStorageAccountCustomInput", - this.primaryStagingStorageAccountCustomInput); - jsonWriter.writeJsonField("recoveryAvailabilitySetCustomInput", this.recoveryAvailabilitySetCustomInput); - jsonWriter.writeJsonField("recoveryVirtualNetworkCustomInput", this.recoveryVirtualNetworkCustomInput); - jsonWriter.writeJsonField("recoveryProximityPlacementGroupCustomInput", - this.recoveryProximityPlacementGroupCustomInput); - jsonWriter.writeStringField("autoProtectionOfDataDisk", - this.autoProtectionOfDataDisk == null ? null : this.autoProtectionOfDataDisk.toString()); - jsonWriter.writeArrayField("vmDisks", this.vmDisks, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("vmManagedDisks", this.vmManagedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("multiVmGroupName", this.multiVmGroupName); - jsonWriter.writeStringField("multiVmGroupId", this.multiVmGroupId); - jsonWriter.writeJsonField("recoveryBootDiagStorageAccount", this.recoveryBootDiagStorageAccount); - jsonWriter.writeJsonField("diskEncryptionInfo", this.diskEncryptionInfo); - jsonWriter.writeStringField("recoveryAvailabilityZone", this.recoveryAvailabilityZone); - jsonWriter.writeStringField("agentAutoUpdateStatus", - this.agentAutoUpdateStatus == null ? null : this.agentAutoUpdateStatus.toString()); - jsonWriter.writeStringField("automationAccountAuthenticationType", - this.automationAccountAuthenticationType == null - ? null - : this.automationAccountAuthenticationType.toString()); - jsonWriter.writeStringField("automationAccountArmId", this.automationAccountArmId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2ACreateProtectionIntentInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2ACreateProtectionIntentInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the A2ACreateProtectionIntentInput. - */ - public static A2ACreateProtectionIntentInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2ACreateProtectionIntentInput deserializedA2ACreateProtectionIntentInput - = new A2ACreateProtectionIntentInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fabricObjectId".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.fabricObjectId = reader.getString(); - } else if ("primaryLocation".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.primaryLocation = reader.getString(); - } else if ("recoveryLocation".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.recoveryLocation = reader.getString(); - } else if ("recoverySubscriptionId".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.recoverySubscriptionId = reader.getString(); - } else if ("recoveryAvailabilityType".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.recoveryAvailabilityType - = A2ARecoveryAvailabilityType.fromString(reader.getString()); - } else if ("recoveryResourceGroupId".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.recoveryResourceGroupId = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.instanceType = reader.getString(); - } else if ("protectionProfileCustomInput".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.protectionProfileCustomInput - = ProtectionProfileCustomDetails.fromJson(reader); - } else if ("primaryStagingStorageAccountCustomInput".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.primaryStagingStorageAccountCustomInput - = StorageAccountCustomDetails.fromJson(reader); - } else if ("recoveryAvailabilitySetCustomInput".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.recoveryAvailabilitySetCustomInput - = RecoveryAvailabilitySetCustomDetails.fromJson(reader); - } else if ("recoveryVirtualNetworkCustomInput".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.recoveryVirtualNetworkCustomInput - = RecoveryVirtualNetworkCustomDetails.fromJson(reader); - } else if ("recoveryProximityPlacementGroupCustomInput".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.recoveryProximityPlacementGroupCustomInput - = RecoveryProximityPlacementGroupCustomDetails.fromJson(reader); - } else if ("autoProtectionOfDataDisk".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.autoProtectionOfDataDisk - = AutoProtectionOfDataDisk.fromString(reader.getString()); - } else if ("vmDisks".equals(fieldName)) { - List vmDisks - = reader.readArray(reader1 -> A2AProtectionIntentDiskInputDetails.fromJson(reader1)); - deserializedA2ACreateProtectionIntentInput.vmDisks = vmDisks; - } else if ("vmManagedDisks".equals(fieldName)) { - List vmManagedDisks - = reader.readArray(reader1 -> A2AProtectionIntentManagedDiskInputDetails.fromJson(reader1)); - deserializedA2ACreateProtectionIntentInput.vmManagedDisks = vmManagedDisks; - } else if ("multiVmGroupName".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.multiVmGroupName = reader.getString(); - } else if ("multiVmGroupId".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.multiVmGroupId = reader.getString(); - } else if ("recoveryBootDiagStorageAccount".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.recoveryBootDiagStorageAccount - = StorageAccountCustomDetails.fromJson(reader); - } else if ("diskEncryptionInfo".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.diskEncryptionInfo = DiskEncryptionInfo.fromJson(reader); - } else if ("recoveryAvailabilityZone".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.recoveryAvailabilityZone = reader.getString(); - } else if ("agentAutoUpdateStatus".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.agentAutoUpdateStatus - = AgentAutoUpdateStatus.fromString(reader.getString()); - } else if ("automationAccountAuthenticationType".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.automationAccountAuthenticationType - = AutomationAccountAuthenticationType.fromString(reader.getString()); - } else if ("automationAccountArmId".equals(fieldName)) { - deserializedA2ACreateProtectionIntentInput.automationAccountArmId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2ACreateProtectionIntentInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationApplyRecoveryPointInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationApplyRecoveryPointInput.java deleted file mode 100644 index 59c0b6108d9d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationApplyRecoveryPointInput.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * ApplyRecoveryPoint input specific to A2ACrossClusterMigration provider. - */ -@Immutable -public final class A2ACrossClusterMigrationApplyRecoveryPointInput extends ApplyRecoveryPointProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "A2ACrossClusterMigration"; - - /** - * Creates an instance of A2ACrossClusterMigrationApplyRecoveryPointInput class. - */ - public A2ACrossClusterMigrationApplyRecoveryPointInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2ACrossClusterMigrationApplyRecoveryPointInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2ACrossClusterMigrationApplyRecoveryPointInput if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2ACrossClusterMigrationApplyRecoveryPointInput. - */ - public static A2ACrossClusterMigrationApplyRecoveryPointInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2ACrossClusterMigrationApplyRecoveryPointInput deserializedA2ACrossClusterMigrationApplyRecoveryPointInput - = new A2ACrossClusterMigrationApplyRecoveryPointInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2ACrossClusterMigrationApplyRecoveryPointInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2ACrossClusterMigrationApplyRecoveryPointInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationContainerCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationContainerCreationInput.java deleted file mode 100644 index 1e6c7bde97b5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationContainerCreationInput.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2ACrossClusterMigration cloud creation input. - */ -@Immutable -public final class A2ACrossClusterMigrationContainerCreationInput - extends ReplicationProviderSpecificContainerCreationInput { - /* - * The class type. - */ - private String instanceType = "A2ACrossClusterMigration"; - - /** - * Creates an instance of A2ACrossClusterMigrationContainerCreationInput class. - */ - public A2ACrossClusterMigrationContainerCreationInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2ACrossClusterMigrationContainerCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2ACrossClusterMigrationContainerCreationInput if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2ACrossClusterMigrationContainerCreationInput. - */ - public static A2ACrossClusterMigrationContainerCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2ACrossClusterMigrationContainerCreationInput deserializedA2ACrossClusterMigrationContainerCreationInput - = new A2ACrossClusterMigrationContainerCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2ACrossClusterMigrationContainerCreationInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2ACrossClusterMigrationContainerCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationEnableProtectionInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationEnableProtectionInput.java deleted file mode 100644 index d0ad8222dbfd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationEnableProtectionInput.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A Cross-Cluster Migration enable protection input. - */ -@Fluent -public final class A2ACrossClusterMigrationEnableProtectionInput extends EnableProtectionProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "A2ACrossClusterMigration"; - - /* - * The fabric specific object Id of the virtual machine. - */ - private String fabricObjectId; - - /* - * The recovery container Id. - */ - private String recoveryContainerId; - - /** - * Creates an instance of A2ACrossClusterMigrationEnableProtectionInput class. - */ - public A2ACrossClusterMigrationEnableProtectionInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the fabricObjectId property: The fabric specific object Id of the virtual machine. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Set the fabricObjectId property: The fabric specific object Id of the virtual machine. - * - * @param fabricObjectId the fabricObjectId value to set. - * @return the A2ACrossClusterMigrationEnableProtectionInput object itself. - */ - public A2ACrossClusterMigrationEnableProtectionInput withFabricObjectId(String fabricObjectId) { - this.fabricObjectId = fabricObjectId; - return this; - } - - /** - * Get the recoveryContainerId property: The recovery container Id. - * - * @return the recoveryContainerId value. - */ - public String recoveryContainerId() { - return this.recoveryContainerId; - } - - /** - * Set the recoveryContainerId property: The recovery container Id. - * - * @param recoveryContainerId the recoveryContainerId value to set. - * @return the A2ACrossClusterMigrationEnableProtectionInput object itself. - */ - public A2ACrossClusterMigrationEnableProtectionInput withRecoveryContainerId(String recoveryContainerId) { - this.recoveryContainerId = recoveryContainerId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("fabricObjectId", this.fabricObjectId); - jsonWriter.writeStringField("recoveryContainerId", this.recoveryContainerId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2ACrossClusterMigrationEnableProtectionInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2ACrossClusterMigrationEnableProtectionInput if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2ACrossClusterMigrationEnableProtectionInput. - */ - public static A2ACrossClusterMigrationEnableProtectionInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2ACrossClusterMigrationEnableProtectionInput deserializedA2ACrossClusterMigrationEnableProtectionInput - = new A2ACrossClusterMigrationEnableProtectionInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2ACrossClusterMigrationEnableProtectionInput.instanceType = reader.getString(); - } else if ("fabricObjectId".equals(fieldName)) { - deserializedA2ACrossClusterMigrationEnableProtectionInput.fabricObjectId = reader.getString(); - } else if ("recoveryContainerId".equals(fieldName)) { - deserializedA2ACrossClusterMigrationEnableProtectionInput.recoveryContainerId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2ACrossClusterMigrationEnableProtectionInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationPolicyCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationPolicyCreationInput.java deleted file mode 100644 index 070317bc1397..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationPolicyCreationInput.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A Cross-Cluster Migration Policy creation input. - */ -@Immutable -public final class A2ACrossClusterMigrationPolicyCreationInput extends PolicyProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "A2ACrossClusterMigration"; - - /** - * Creates an instance of A2ACrossClusterMigrationPolicyCreationInput class. - */ - public A2ACrossClusterMigrationPolicyCreationInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2ACrossClusterMigrationPolicyCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2ACrossClusterMigrationPolicyCreationInput if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2ACrossClusterMigrationPolicyCreationInput. - */ - public static A2ACrossClusterMigrationPolicyCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2ACrossClusterMigrationPolicyCreationInput deserializedA2ACrossClusterMigrationPolicyCreationInput - = new A2ACrossClusterMigrationPolicyCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2ACrossClusterMigrationPolicyCreationInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2ACrossClusterMigrationPolicyCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationReplicationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationReplicationDetails.java deleted file mode 100644 index 1e4f07f8121c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ACrossClusterMigrationReplicationDetails.java +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A provider specific settings. - */ -@Fluent -public final class A2ACrossClusterMigrationReplicationDetails extends ReplicationProviderSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "A2ACrossClusterMigration"; - - /* - * The fabric specific object Id of the virtual machine. - */ - private String fabricObjectId; - - /* - * Primary fabric location. - */ - private String primaryFabricLocation; - - /* - * The type of operating system. - */ - private String osType; - - /* - * The protection state for the vm. - */ - private String vmProtectionState; - - /* - * The protection state description for the vm. - */ - 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. - */ - private String lifecycleId; - - /** - * Creates an instance of A2ACrossClusterMigrationReplicationDetails class. - */ - public A2ACrossClusterMigrationReplicationDetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the fabricObjectId property: The fabric specific object Id of the virtual machine. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Set the fabricObjectId property: The fabric specific object Id of the virtual machine. - * - * @param fabricObjectId the fabricObjectId value to set. - * @return the A2ACrossClusterMigrationReplicationDetails object itself. - */ - public A2ACrossClusterMigrationReplicationDetails withFabricObjectId(String fabricObjectId) { - this.fabricObjectId = fabricObjectId; - return this; - } - - /** - * Get the primaryFabricLocation property: Primary fabric location. - * - * @return the primaryFabricLocation value. - */ - public String primaryFabricLocation() { - return this.primaryFabricLocation; - } - - /** - * Set the primaryFabricLocation property: Primary fabric location. - * - * @param primaryFabricLocation the primaryFabricLocation value to set. - * @return the A2ACrossClusterMigrationReplicationDetails object itself. - */ - public A2ACrossClusterMigrationReplicationDetails withPrimaryFabricLocation(String primaryFabricLocation) { - this.primaryFabricLocation = primaryFabricLocation; - return this; - } - - /** - * Get the osType property: The type of operating system. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: The type of operating system. - * - * @param osType the osType value to set. - * @return the A2ACrossClusterMigrationReplicationDetails object itself. - */ - public A2ACrossClusterMigrationReplicationDetails withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Get the vmProtectionState property: The protection state for the vm. - * - * @return the vmProtectionState value. - */ - public String vmProtectionState() { - return this.vmProtectionState; - } - - /** - * Set the vmProtectionState property: The protection state for the vm. - * - * @param vmProtectionState the vmProtectionState value to set. - * @return the A2ACrossClusterMigrationReplicationDetails object itself. - */ - public A2ACrossClusterMigrationReplicationDetails withVmProtectionState(String vmProtectionState) { - this.vmProtectionState = vmProtectionState; - return this; - } - - /** - * Get the vmProtectionStateDescription property: The protection state description for the vm. - * - * @return the vmProtectionStateDescription value. - */ - public String vmProtectionStateDescription() { - return this.vmProtectionStateDescription; - } - - /** - * Set the vmProtectionStateDescription property: The protection state description for the vm. - * - * @param vmProtectionStateDescription the vmProtectionStateDescription value to set. - * @return the A2ACrossClusterMigrationReplicationDetails object itself. - */ - public A2ACrossClusterMigrationReplicationDetails - withVmProtectionStateDescription(String vmProtectionStateDescription) { - this.vmProtectionStateDescription = vmProtectionStateDescription; - return this; - } - - /** - * Get the lifecycleId property: 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 the lifecycleId property: 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 A2ACrossClusterMigrationReplicationDetails object itself. - */ - public A2ACrossClusterMigrationReplicationDetails withLifecycleId(String lifecycleId) { - this.lifecycleId = lifecycleId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("fabricObjectId", this.fabricObjectId); - jsonWriter.writeStringField("primaryFabricLocation", this.primaryFabricLocation); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeStringField("vmProtectionState", this.vmProtectionState); - jsonWriter.writeStringField("vmProtectionStateDescription", this.vmProtectionStateDescription); - jsonWriter.writeStringField("lifecycleId", this.lifecycleId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2ACrossClusterMigrationReplicationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2ACrossClusterMigrationReplicationDetails if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2ACrossClusterMigrationReplicationDetails. - */ - public static A2ACrossClusterMigrationReplicationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2ACrossClusterMigrationReplicationDetails deserializedA2ACrossClusterMigrationReplicationDetails - = new A2ACrossClusterMigrationReplicationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2ACrossClusterMigrationReplicationDetails.instanceType = reader.getString(); - } else if ("fabricObjectId".equals(fieldName)) { - deserializedA2ACrossClusterMigrationReplicationDetails.fabricObjectId = reader.getString(); - } else if ("primaryFabricLocation".equals(fieldName)) { - deserializedA2ACrossClusterMigrationReplicationDetails.primaryFabricLocation = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedA2ACrossClusterMigrationReplicationDetails.osType = reader.getString(); - } else if ("vmProtectionState".equals(fieldName)) { - deserializedA2ACrossClusterMigrationReplicationDetails.vmProtectionState = reader.getString(); - } else if ("vmProtectionStateDescription".equals(fieldName)) { - deserializedA2ACrossClusterMigrationReplicationDetails.vmProtectionStateDescription - = reader.getString(); - } else if ("lifecycleId".equals(fieldName)) { - deserializedA2ACrossClusterMigrationReplicationDetails.lifecycleId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2ACrossClusterMigrationReplicationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AEnableProtectionInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AEnableProtectionInput.java deleted file mode 100644 index e490a1dbb051..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AEnableProtectionInput.java +++ /dev/null @@ -1,644 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A2A enable protection input. - */ -@Fluent -public final class A2AEnableProtectionInput extends EnableProtectionProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /* - * The fabric specific object Id of the virtual machine. - */ - private String fabricObjectId; - - /* - * The recovery container Id. - */ - private String recoveryContainerId; - - /* - * The recovery resource group Id. Valid for V2 scenarios. - */ - private String recoveryResourceGroupId; - - /* - * The recovery cloud service Id. Valid for V1 scenarios. - */ - private String recoveryCloudServiceId; - - /* - * The recovery availability set Id. - */ - private String recoveryAvailabilitySetId; - - /* - * The recovery proximity placement group Id. - */ - private String recoveryProximityPlacementGroupId; - - /* - * The list of vm disk details. - */ - private List vmDisks; - - /* - * The list of vm managed disk details. - */ - private List vmManagedDisks; - - /* - * The multi vm group name. - */ - private String multiVmGroupName; - - /* - * The multi vm group id. - */ - private String multiVmGroupId; - - /* - * The boot diagnostic storage account. - */ - private String recoveryBootDiagStorageAccountId; - - /* - * The recovery disk encryption information (for two pass flows). - */ - private DiskEncryptionInfo diskEncryptionInfo; - - /* - * The recovery availability zone. - */ - private String recoveryAvailabilityZone; - - /* - * The recovery extended location. - */ - private ExtendedLocation recoveryExtendedLocation; - - /* - * The recovery Azure virtual network ARM id. - */ - private String recoveryAzureNetworkId; - - /* - * The recovery subnet name. - */ - private String recoverySubnetName; - - /* - * The virtual machine scale set Id. - */ - private String recoveryVirtualMachineScaleSetId; - - /* - * The recovery capacity reservation group Id. - */ - private String recoveryCapacityReservationGroupId; - - /* - * A value indicating whether the auto protection is enabled. - */ - private AutoProtectionOfDataDisk autoProtectionOfDataDisk; - - /** - * Creates an instance of A2AEnableProtectionInput class. - */ - public A2AEnableProtectionInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the fabricObjectId property: The fabric specific object Id of the virtual machine. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Set the fabricObjectId property: 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 recoveryContainerId property: The recovery container Id. - * - * @return the recoveryContainerId value. - */ - public String recoveryContainerId() { - return this.recoveryContainerId; - } - - /** - * Set the recoveryContainerId property: 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 recoveryResourceGroupId property: The recovery resource group Id. Valid for V2 scenarios. - * - * @return the recoveryResourceGroupId value. - */ - public String recoveryResourceGroupId() { - return this.recoveryResourceGroupId; - } - - /** - * Set the recoveryResourceGroupId property: 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 recoveryCloudServiceId property: The recovery cloud service Id. Valid for V1 scenarios. - * - * @return the recoveryCloudServiceId value. - */ - public String recoveryCloudServiceId() { - return this.recoveryCloudServiceId; - } - - /** - * Set the recoveryCloudServiceId property: 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 recoveryAvailabilitySetId property: The recovery availability set Id. - * - * @return the recoveryAvailabilitySetId value. - */ - public String recoveryAvailabilitySetId() { - return this.recoveryAvailabilitySetId; - } - - /** - * Set the recoveryAvailabilitySetId property: 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 recoveryProximityPlacementGroupId property: The recovery proximity placement group Id. - * - * @return the recoveryProximityPlacementGroupId value. - */ - public String recoveryProximityPlacementGroupId() { - return this.recoveryProximityPlacementGroupId; - } - - /** - * Set the recoveryProximityPlacementGroupId property: The recovery proximity placement group Id. - * - * @param recoveryProximityPlacementGroupId the recoveryProximityPlacementGroupId value to set. - * @return the A2AEnableProtectionInput object itself. - */ - public A2AEnableProtectionInput withRecoveryProximityPlacementGroupId(String recoveryProximityPlacementGroupId) { - this.recoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; - return this; - } - - /** - * Get the vmDisks property: The list of vm disk details. - * - * @return the vmDisks value. - */ - public List vmDisks() { - return this.vmDisks; - } - - /** - * Set the vmDisks property: 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 vmManagedDisks property: The list of vm managed disk details. - * - * @return the vmManagedDisks value. - */ - public List vmManagedDisks() { - return this.vmManagedDisks; - } - - /** - * Set the vmManagedDisks property: 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; - } - - /** - * Get the multiVmGroupName property: The multi vm group name. - * - * @return the multiVmGroupName value. - */ - public String multiVmGroupName() { - return this.multiVmGroupName; - } - - /** - * Set the multiVmGroupName property: The multi vm group name. - * - * @param multiVmGroupName the multiVmGroupName value to set. - * @return the A2AEnableProtectionInput object itself. - */ - public A2AEnableProtectionInput withMultiVmGroupName(String multiVmGroupName) { - this.multiVmGroupName = multiVmGroupName; - return this; - } - - /** - * Get the multiVmGroupId property: The multi vm group id. - * - * @return the multiVmGroupId value. - */ - public String multiVmGroupId() { - return this.multiVmGroupId; - } - - /** - * Set the multiVmGroupId property: The multi vm group id. - * - * @param multiVmGroupId the multiVmGroupId value to set. - * @return the A2AEnableProtectionInput object itself. - */ - public A2AEnableProtectionInput withMultiVmGroupId(String multiVmGroupId) { - this.multiVmGroupId = multiVmGroupId; - return this; - } - - /** - * Get the recoveryBootDiagStorageAccountId property: The boot diagnostic storage account. - * - * @return the recoveryBootDiagStorageAccountId value. - */ - public String recoveryBootDiagStorageAccountId() { - return this.recoveryBootDiagStorageAccountId; - } - - /** - * Set the recoveryBootDiagStorageAccountId property: The boot diagnostic storage account. - * - * @param recoveryBootDiagStorageAccountId the recoveryBootDiagStorageAccountId value to set. - * @return the A2AEnableProtectionInput object itself. - */ - public A2AEnableProtectionInput withRecoveryBootDiagStorageAccountId(String recoveryBootDiagStorageAccountId) { - this.recoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; - return this; - } - - /** - * Get the diskEncryptionInfo property: The recovery disk encryption information (for two pass flows). - * - * @return the diskEncryptionInfo value. - */ - public DiskEncryptionInfo diskEncryptionInfo() { - return this.diskEncryptionInfo; - } - - /** - * Set the diskEncryptionInfo property: The recovery disk encryption information (for two pass flows). - * - * @param diskEncryptionInfo the diskEncryptionInfo value to set. - * @return the A2AEnableProtectionInput object itself. - */ - public A2AEnableProtectionInput withDiskEncryptionInfo(DiskEncryptionInfo diskEncryptionInfo) { - this.diskEncryptionInfo = diskEncryptionInfo; - return this; - } - - /** - * Get the recoveryAvailabilityZone property: The recovery availability zone. - * - * @return the recoveryAvailabilityZone value. - */ - public String recoveryAvailabilityZone() { - return this.recoveryAvailabilityZone; - } - - /** - * Set the recoveryAvailabilityZone property: The recovery availability zone. - * - * @param recoveryAvailabilityZone the recoveryAvailabilityZone value to set. - * @return the A2AEnableProtectionInput object itself. - */ - public A2AEnableProtectionInput withRecoveryAvailabilityZone(String recoveryAvailabilityZone) { - this.recoveryAvailabilityZone = recoveryAvailabilityZone; - return this; - } - - /** - * Get the recoveryExtendedLocation property: The recovery extended location. - * - * @return the recoveryExtendedLocation value. - */ - public ExtendedLocation recoveryExtendedLocation() { - return this.recoveryExtendedLocation; - } - - /** - * Set the recoveryExtendedLocation property: The recovery extended location. - * - * @param recoveryExtendedLocation the recoveryExtendedLocation value to set. - * @return the A2AEnableProtectionInput object itself. - */ - public A2AEnableProtectionInput withRecoveryExtendedLocation(ExtendedLocation recoveryExtendedLocation) { - this.recoveryExtendedLocation = recoveryExtendedLocation; - return this; - } - - /** - * Get the recoveryAzureNetworkId property: The recovery Azure virtual network ARM id. - * - * @return the recoveryAzureNetworkId value. - */ - public String recoveryAzureNetworkId() { - return this.recoveryAzureNetworkId; - } - - /** - * Set the recoveryAzureNetworkId property: The recovery Azure virtual network ARM id. - * - * @param recoveryAzureNetworkId the recoveryAzureNetworkId value to set. - * @return the A2AEnableProtectionInput object itself. - */ - public A2AEnableProtectionInput withRecoveryAzureNetworkId(String recoveryAzureNetworkId) { - this.recoveryAzureNetworkId = recoveryAzureNetworkId; - return this; - } - - /** - * Get the recoverySubnetName property: The recovery subnet name. - * - * @return the recoverySubnetName value. - */ - public String recoverySubnetName() { - return this.recoverySubnetName; - } - - /** - * Set the recoverySubnetName property: The recovery subnet name. - * - * @param recoverySubnetName the recoverySubnetName value to set. - * @return the A2AEnableProtectionInput object itself. - */ - public A2AEnableProtectionInput withRecoverySubnetName(String recoverySubnetName) { - this.recoverySubnetName = recoverySubnetName; - return this; - } - - /** - * Get the recoveryVirtualMachineScaleSetId property: The virtual machine scale set Id. - * - * @return the recoveryVirtualMachineScaleSetId value. - */ - public String recoveryVirtualMachineScaleSetId() { - return this.recoveryVirtualMachineScaleSetId; - } - - /** - * Set the recoveryVirtualMachineScaleSetId property: The virtual machine scale set Id. - * - * @param recoveryVirtualMachineScaleSetId the recoveryVirtualMachineScaleSetId value to set. - * @return the A2AEnableProtectionInput object itself. - */ - public A2AEnableProtectionInput withRecoveryVirtualMachineScaleSetId(String recoveryVirtualMachineScaleSetId) { - this.recoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId; - return this; - } - - /** - * Get the recoveryCapacityReservationGroupId property: The recovery capacity reservation group Id. - * - * @return the recoveryCapacityReservationGroupId value. - */ - public String recoveryCapacityReservationGroupId() { - return this.recoveryCapacityReservationGroupId; - } - - /** - * Set the recoveryCapacityReservationGroupId property: The recovery capacity reservation group Id. - * - * @param recoveryCapacityReservationGroupId the recoveryCapacityReservationGroupId value to set. - * @return the A2AEnableProtectionInput object itself. - */ - public A2AEnableProtectionInput withRecoveryCapacityReservationGroupId(String recoveryCapacityReservationGroupId) { - this.recoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId; - return this; - } - - /** - * Get the autoProtectionOfDataDisk property: A value indicating whether the auto protection is enabled. - * - * @return the autoProtectionOfDataDisk value. - */ - public AutoProtectionOfDataDisk autoProtectionOfDataDisk() { - return this.autoProtectionOfDataDisk; - } - - /** - * Set the autoProtectionOfDataDisk property: A value indicating whether the auto protection is enabled. - * - * @param autoProtectionOfDataDisk the autoProtectionOfDataDisk value to set. - * @return the A2AEnableProtectionInput object itself. - */ - public A2AEnableProtectionInput withAutoProtectionOfDataDisk(AutoProtectionOfDataDisk autoProtectionOfDataDisk) { - this.autoProtectionOfDataDisk = autoProtectionOfDataDisk; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (fabricObjectId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property fabricObjectId in model A2AEnableProtectionInput")); - } - if (vmDisks() != null) { - vmDisks().forEach(e -> e.validate()); - } - if (vmManagedDisks() != null) { - vmManagedDisks().forEach(e -> e.validate()); - } - if (diskEncryptionInfo() != null) { - diskEncryptionInfo().validate(); - } - if (recoveryExtendedLocation() != null) { - recoveryExtendedLocation().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(A2AEnableProtectionInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fabricObjectId", this.fabricObjectId); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryContainerId", this.recoveryContainerId); - jsonWriter.writeStringField("recoveryResourceGroupId", this.recoveryResourceGroupId); - jsonWriter.writeStringField("recoveryCloudServiceId", this.recoveryCloudServiceId); - jsonWriter.writeStringField("recoveryAvailabilitySetId", this.recoveryAvailabilitySetId); - jsonWriter.writeStringField("recoveryProximityPlacementGroupId", this.recoveryProximityPlacementGroupId); - jsonWriter.writeArrayField("vmDisks", this.vmDisks, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("vmManagedDisks", this.vmManagedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("multiVmGroupName", this.multiVmGroupName); - jsonWriter.writeStringField("multiVmGroupId", this.multiVmGroupId); - jsonWriter.writeStringField("recoveryBootDiagStorageAccountId", this.recoveryBootDiagStorageAccountId); - jsonWriter.writeJsonField("diskEncryptionInfo", this.diskEncryptionInfo); - jsonWriter.writeStringField("recoveryAvailabilityZone", this.recoveryAvailabilityZone); - jsonWriter.writeJsonField("recoveryExtendedLocation", this.recoveryExtendedLocation); - jsonWriter.writeStringField("recoveryAzureNetworkId", this.recoveryAzureNetworkId); - jsonWriter.writeStringField("recoverySubnetName", this.recoverySubnetName); - jsonWriter.writeStringField("recoveryVirtualMachineScaleSetId", this.recoveryVirtualMachineScaleSetId); - jsonWriter.writeStringField("recoveryCapacityReservationGroupId", this.recoveryCapacityReservationGroupId); - jsonWriter.writeStringField("autoProtectionOfDataDisk", - this.autoProtectionOfDataDisk == null ? null : this.autoProtectionOfDataDisk.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AEnableProtectionInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AEnableProtectionInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the A2AEnableProtectionInput. - */ - public static A2AEnableProtectionInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AEnableProtectionInput deserializedA2AEnableProtectionInput = new A2AEnableProtectionInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fabricObjectId".equals(fieldName)) { - deserializedA2AEnableProtectionInput.fabricObjectId = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedA2AEnableProtectionInput.instanceType = reader.getString(); - } else if ("recoveryContainerId".equals(fieldName)) { - deserializedA2AEnableProtectionInput.recoveryContainerId = reader.getString(); - } else if ("recoveryResourceGroupId".equals(fieldName)) { - deserializedA2AEnableProtectionInput.recoveryResourceGroupId = reader.getString(); - } else if ("recoveryCloudServiceId".equals(fieldName)) { - deserializedA2AEnableProtectionInput.recoveryCloudServiceId = reader.getString(); - } else if ("recoveryAvailabilitySetId".equals(fieldName)) { - deserializedA2AEnableProtectionInput.recoveryAvailabilitySetId = reader.getString(); - } else if ("recoveryProximityPlacementGroupId".equals(fieldName)) { - deserializedA2AEnableProtectionInput.recoveryProximityPlacementGroupId = reader.getString(); - } else if ("vmDisks".equals(fieldName)) { - List vmDisks - = reader.readArray(reader1 -> A2AVmDiskInputDetails.fromJson(reader1)); - deserializedA2AEnableProtectionInput.vmDisks = vmDisks; - } else if ("vmManagedDisks".equals(fieldName)) { - List vmManagedDisks - = reader.readArray(reader1 -> A2AVmManagedDiskInputDetails.fromJson(reader1)); - deserializedA2AEnableProtectionInput.vmManagedDisks = vmManagedDisks; - } else if ("multiVmGroupName".equals(fieldName)) { - deserializedA2AEnableProtectionInput.multiVmGroupName = reader.getString(); - } else if ("multiVmGroupId".equals(fieldName)) { - deserializedA2AEnableProtectionInput.multiVmGroupId = reader.getString(); - } else if ("recoveryBootDiagStorageAccountId".equals(fieldName)) { - deserializedA2AEnableProtectionInput.recoveryBootDiagStorageAccountId = reader.getString(); - } else if ("diskEncryptionInfo".equals(fieldName)) { - deserializedA2AEnableProtectionInput.diskEncryptionInfo = DiskEncryptionInfo.fromJson(reader); - } else if ("recoveryAvailabilityZone".equals(fieldName)) { - deserializedA2AEnableProtectionInput.recoveryAvailabilityZone = reader.getString(); - } else if ("recoveryExtendedLocation".equals(fieldName)) { - deserializedA2AEnableProtectionInput.recoveryExtendedLocation = ExtendedLocation.fromJson(reader); - } else if ("recoveryAzureNetworkId".equals(fieldName)) { - deserializedA2AEnableProtectionInput.recoveryAzureNetworkId = reader.getString(); - } else if ("recoverySubnetName".equals(fieldName)) { - deserializedA2AEnableProtectionInput.recoverySubnetName = reader.getString(); - } else if ("recoveryVirtualMachineScaleSetId".equals(fieldName)) { - deserializedA2AEnableProtectionInput.recoveryVirtualMachineScaleSetId = reader.getString(); - } else if ("recoveryCapacityReservationGroupId".equals(fieldName)) { - deserializedA2AEnableProtectionInput.recoveryCapacityReservationGroupId = reader.getString(); - } else if ("autoProtectionOfDataDisk".equals(fieldName)) { - deserializedA2AEnableProtectionInput.autoProtectionOfDataDisk - = AutoProtectionOfDataDisk.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AEnableProtectionInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AEventDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AEventDetails.java deleted file mode 100644 index 4155ed11832c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AEventDetails.java +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model class for event details of a A2A event. - */ -@Fluent -public final class A2AEventDetails extends EventProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "A2A"; - - /* - * The protected item arm name. - */ - private String protectedItemName; - - /* - * The azure vm arm id. - */ - private String fabricObjectId; - - /* - * Fabric arm name. - */ - private String fabricName; - - /* - * The fabric location. - */ - private String fabricLocation; - - /* - * Remote fabric arm name. - */ - private String remoteFabricName; - - /* - * Remote fabric location. - */ - private String remoteFabricLocation; - - /** - * Creates an instance of A2AEventDetails class. - */ - public A2AEventDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the protectedItemName property: The protected item arm name. - * - * @return the protectedItemName value. - */ - public String protectedItemName() { - return this.protectedItemName; - } - - /** - * Set the protectedItemName property: 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 fabricObjectId property: The azure vm arm id. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Set the fabricObjectId property: 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 the fabricName property: Fabric arm name. - * - * @return the fabricName value. - */ - public String fabricName() { - return this.fabricName; - } - - /** - * Set the fabricName property: 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 fabricLocation property: The fabric location. - * - * @return the fabricLocation value. - */ - public String fabricLocation() { - return this.fabricLocation; - } - - /** - * Set the fabricLocation property: 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 the remoteFabricName property: Remote fabric arm name. - * - * @return the remoteFabricName value. - */ - public String remoteFabricName() { - return this.remoteFabricName; - } - - /** - * Set the remoteFabricName property: 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 the remoteFabricLocation property: Remote fabric location. - * - * @return the remoteFabricLocation value. - */ - public String remoteFabricLocation() { - return this.remoteFabricLocation; - } - - /** - * Set the remoteFabricLocation property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("protectedItemName", this.protectedItemName); - jsonWriter.writeStringField("fabricObjectId", this.fabricObjectId); - jsonWriter.writeStringField("fabricName", this.fabricName); - jsonWriter.writeStringField("fabricLocation", this.fabricLocation); - jsonWriter.writeStringField("remoteFabricName", this.remoteFabricName); - jsonWriter.writeStringField("remoteFabricLocation", this.remoteFabricLocation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AEventDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AEventDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AEventDetails. - */ - public static A2AEventDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AEventDetails deserializedA2AEventDetails = new A2AEventDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2AEventDetails.instanceType = reader.getString(); - } else if ("protectedItemName".equals(fieldName)) { - deserializedA2AEventDetails.protectedItemName = reader.getString(); - } else if ("fabricObjectId".equals(fieldName)) { - deserializedA2AEventDetails.fabricObjectId = reader.getString(); - } else if ("fabricName".equals(fieldName)) { - deserializedA2AEventDetails.fabricName = reader.getString(); - } else if ("fabricLocation".equals(fieldName)) { - deserializedA2AEventDetails.fabricLocation = reader.getString(); - } else if ("remoteFabricName".equals(fieldName)) { - deserializedA2AEventDetails.remoteFabricName = reader.getString(); - } else if ("remoteFabricLocation".equals(fieldName)) { - deserializedA2AEventDetails.remoteFabricLocation = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AEventDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AExtendedLocationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AExtendedLocationDetails.java deleted file mode 100644 index 3e09d86842bf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AExtendedLocationDetails.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * ExtendedLocation details data. - */ -@Fluent -public final class A2AExtendedLocationDetails implements JsonSerializable { - /* - * The primary ExtendedLocation. - */ - private ExtendedLocation primaryExtendedLocation; - - /* - * The recovery ExtendedLocation. - */ - private ExtendedLocation recoveryExtendedLocation; - - /** - * Creates an instance of A2AExtendedLocationDetails class. - */ - public A2AExtendedLocationDetails() { - } - - /** - * Get the primaryExtendedLocation property: The primary ExtendedLocation. - * - * @return the primaryExtendedLocation value. - */ - public ExtendedLocation primaryExtendedLocation() { - return this.primaryExtendedLocation; - } - - /** - * Set the primaryExtendedLocation property: The primary ExtendedLocation. - * - * @param primaryExtendedLocation the primaryExtendedLocation value to set. - * @return the A2AExtendedLocationDetails object itself. - */ - public A2AExtendedLocationDetails withPrimaryExtendedLocation(ExtendedLocation primaryExtendedLocation) { - this.primaryExtendedLocation = primaryExtendedLocation; - return this; - } - - /** - * Get the recoveryExtendedLocation property: The recovery ExtendedLocation. - * - * @return the recoveryExtendedLocation value. - */ - public ExtendedLocation recoveryExtendedLocation() { - return this.recoveryExtendedLocation; - } - - /** - * Set the recoveryExtendedLocation property: The recovery ExtendedLocation. - * - * @param recoveryExtendedLocation the recoveryExtendedLocation value to set. - * @return the A2AExtendedLocationDetails object itself. - */ - public A2AExtendedLocationDetails withRecoveryExtendedLocation(ExtendedLocation recoveryExtendedLocation) { - this.recoveryExtendedLocation = recoveryExtendedLocation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (primaryExtendedLocation() != null) { - primaryExtendedLocation().validate(); - } - if (recoveryExtendedLocation() != null) { - recoveryExtendedLocation().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("primaryExtendedLocation", this.primaryExtendedLocation); - jsonWriter.writeJsonField("recoveryExtendedLocation", this.recoveryExtendedLocation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AExtendedLocationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AExtendedLocationDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AExtendedLocationDetails. - */ - public static A2AExtendedLocationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AExtendedLocationDetails deserializedA2AExtendedLocationDetails = new A2AExtendedLocationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primaryExtendedLocation".equals(fieldName)) { - deserializedA2AExtendedLocationDetails.primaryExtendedLocation = ExtendedLocation.fromJson(reader); - } else if ("recoveryExtendedLocation".equals(fieldName)) { - deserializedA2AExtendedLocationDetails.recoveryExtendedLocation = ExtendedLocation.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AExtendedLocationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AFabricSpecificLocationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AFabricSpecificLocationDetails.java deleted file mode 100644 index 87998c451558..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AFabricSpecificLocationDetails.java +++ /dev/null @@ -1,420 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * ExtendedLocation details data. - */ -@Fluent -public final class A2AFabricSpecificLocationDetails implements JsonSerializable { - /* - * The initial source zone info. - */ - private String initialPrimaryZone; - - /* - * The initial target zone info. - */ - private String initialRecoveryZone; - - /* - * The initial primary ExtendedLocation. - */ - private ExtendedLocation initialPrimaryExtendedLocation; - - /* - * The initial recovery ExtendedLocation. - */ - private ExtendedLocation initialRecoveryExtendedLocation; - - /* - * Initial primary fabric location info. - */ - private String initialPrimaryFabricLocation; - - /* - * The initial recovery fabric location info. - */ - private String initialRecoveryFabricLocation; - - /* - * Source zone info. - */ - private String primaryZone; - - /* - * The target zone info. - */ - private String recoveryZone; - - /* - * The primary ExtendedLocation. - */ - private ExtendedLocation primaryExtendedLocation; - - /* - * The recovery ExtendedLocation. - */ - private ExtendedLocation recoveryExtendedLocation; - - /* - * Primary fabric location info. - */ - private String primaryFabricLocation; - - /* - * The recovery fabric location info. - */ - private String recoveryFabricLocation; - - /** - * Creates an instance of A2AFabricSpecificLocationDetails class. - */ - public A2AFabricSpecificLocationDetails() { - } - - /** - * Get the initialPrimaryZone property: The initial source zone info. - * - * @return the initialPrimaryZone value. - */ - public String initialPrimaryZone() { - return this.initialPrimaryZone; - } - - /** - * Set the initialPrimaryZone property: The initial source zone info. - * - * @param initialPrimaryZone the initialPrimaryZone value to set. - * @return the A2AFabricSpecificLocationDetails object itself. - */ - public A2AFabricSpecificLocationDetails withInitialPrimaryZone(String initialPrimaryZone) { - this.initialPrimaryZone = initialPrimaryZone; - return this; - } - - /** - * Get the initialRecoveryZone property: The initial target zone info. - * - * @return the initialRecoveryZone value. - */ - public String initialRecoveryZone() { - return this.initialRecoveryZone; - } - - /** - * Set the initialRecoveryZone property: The initial target zone info. - * - * @param initialRecoveryZone the initialRecoveryZone value to set. - * @return the A2AFabricSpecificLocationDetails object itself. - */ - public A2AFabricSpecificLocationDetails withInitialRecoveryZone(String initialRecoveryZone) { - this.initialRecoveryZone = initialRecoveryZone; - return this; - } - - /** - * Get the initialPrimaryExtendedLocation property: The initial primary ExtendedLocation. - * - * @return the initialPrimaryExtendedLocation value. - */ - public ExtendedLocation initialPrimaryExtendedLocation() { - return this.initialPrimaryExtendedLocation; - } - - /** - * Set the initialPrimaryExtendedLocation property: The initial primary ExtendedLocation. - * - * @param initialPrimaryExtendedLocation the initialPrimaryExtendedLocation value to set. - * @return the A2AFabricSpecificLocationDetails object itself. - */ - public A2AFabricSpecificLocationDetails - withInitialPrimaryExtendedLocation(ExtendedLocation initialPrimaryExtendedLocation) { - this.initialPrimaryExtendedLocation = initialPrimaryExtendedLocation; - return this; - } - - /** - * Get the initialRecoveryExtendedLocation property: The initial recovery ExtendedLocation. - * - * @return the initialRecoveryExtendedLocation value. - */ - public ExtendedLocation initialRecoveryExtendedLocation() { - return this.initialRecoveryExtendedLocation; - } - - /** - * Set the initialRecoveryExtendedLocation property: The initial recovery ExtendedLocation. - * - * @param initialRecoveryExtendedLocation the initialRecoveryExtendedLocation value to set. - * @return the A2AFabricSpecificLocationDetails object itself. - */ - public A2AFabricSpecificLocationDetails - withInitialRecoveryExtendedLocation(ExtendedLocation initialRecoveryExtendedLocation) { - this.initialRecoveryExtendedLocation = initialRecoveryExtendedLocation; - return this; - } - - /** - * Get the initialPrimaryFabricLocation property: Initial primary fabric location info. - * - * @return the initialPrimaryFabricLocation value. - */ - public String initialPrimaryFabricLocation() { - return this.initialPrimaryFabricLocation; - } - - /** - * Set the initialPrimaryFabricLocation property: Initial primary fabric location info. - * - * @param initialPrimaryFabricLocation the initialPrimaryFabricLocation value to set. - * @return the A2AFabricSpecificLocationDetails object itself. - */ - public A2AFabricSpecificLocationDetails withInitialPrimaryFabricLocation(String initialPrimaryFabricLocation) { - this.initialPrimaryFabricLocation = initialPrimaryFabricLocation; - return this; - } - - /** - * Get the initialRecoveryFabricLocation property: The initial recovery fabric location info. - * - * @return the initialRecoveryFabricLocation value. - */ - public String initialRecoveryFabricLocation() { - return this.initialRecoveryFabricLocation; - } - - /** - * Set the initialRecoveryFabricLocation property: The initial recovery fabric location info. - * - * @param initialRecoveryFabricLocation the initialRecoveryFabricLocation value to set. - * @return the A2AFabricSpecificLocationDetails object itself. - */ - public A2AFabricSpecificLocationDetails withInitialRecoveryFabricLocation(String initialRecoveryFabricLocation) { - this.initialRecoveryFabricLocation = initialRecoveryFabricLocation; - return this; - } - - /** - * Get the primaryZone property: Source zone info. - * - * @return the primaryZone value. - */ - public String primaryZone() { - return this.primaryZone; - } - - /** - * Set the primaryZone property: Source zone info. - * - * @param primaryZone the primaryZone value to set. - * @return the A2AFabricSpecificLocationDetails object itself. - */ - public A2AFabricSpecificLocationDetails withPrimaryZone(String primaryZone) { - this.primaryZone = primaryZone; - return this; - } - - /** - * Get the recoveryZone property: The target zone info. - * - * @return the recoveryZone value. - */ - public String recoveryZone() { - return this.recoveryZone; - } - - /** - * Set the recoveryZone property: The target zone info. - * - * @param recoveryZone the recoveryZone value to set. - * @return the A2AFabricSpecificLocationDetails object itself. - */ - public A2AFabricSpecificLocationDetails withRecoveryZone(String recoveryZone) { - this.recoveryZone = recoveryZone; - return this; - } - - /** - * Get the primaryExtendedLocation property: The primary ExtendedLocation. - * - * @return the primaryExtendedLocation value. - */ - public ExtendedLocation primaryExtendedLocation() { - return this.primaryExtendedLocation; - } - - /** - * Set the primaryExtendedLocation property: The primary ExtendedLocation. - * - * @param primaryExtendedLocation the primaryExtendedLocation value to set. - * @return the A2AFabricSpecificLocationDetails object itself. - */ - public A2AFabricSpecificLocationDetails withPrimaryExtendedLocation(ExtendedLocation primaryExtendedLocation) { - this.primaryExtendedLocation = primaryExtendedLocation; - return this; - } - - /** - * Get the recoveryExtendedLocation property: The recovery ExtendedLocation. - * - * @return the recoveryExtendedLocation value. - */ - public ExtendedLocation recoveryExtendedLocation() { - return this.recoveryExtendedLocation; - } - - /** - * Set the recoveryExtendedLocation property: The recovery ExtendedLocation. - * - * @param recoveryExtendedLocation the recoveryExtendedLocation value to set. - * @return the A2AFabricSpecificLocationDetails object itself. - */ - public A2AFabricSpecificLocationDetails withRecoveryExtendedLocation(ExtendedLocation recoveryExtendedLocation) { - this.recoveryExtendedLocation = recoveryExtendedLocation; - return this; - } - - /** - * Get the primaryFabricLocation property: Primary fabric location info. - * - * @return the primaryFabricLocation value. - */ - public String primaryFabricLocation() { - return this.primaryFabricLocation; - } - - /** - * Set the primaryFabricLocation property: Primary fabric location info. - * - * @param primaryFabricLocation the primaryFabricLocation value to set. - * @return the A2AFabricSpecificLocationDetails object itself. - */ - public A2AFabricSpecificLocationDetails withPrimaryFabricLocation(String primaryFabricLocation) { - this.primaryFabricLocation = primaryFabricLocation; - return this; - } - - /** - * Get the recoveryFabricLocation property: The recovery fabric location info. - * - * @return the recoveryFabricLocation value. - */ - public String recoveryFabricLocation() { - return this.recoveryFabricLocation; - } - - /** - * Set the recoveryFabricLocation property: The recovery fabric location info. - * - * @param recoveryFabricLocation the recoveryFabricLocation value to set. - * @return the A2AFabricSpecificLocationDetails object itself. - */ - public A2AFabricSpecificLocationDetails withRecoveryFabricLocation(String recoveryFabricLocation) { - this.recoveryFabricLocation = recoveryFabricLocation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (initialPrimaryExtendedLocation() != null) { - initialPrimaryExtendedLocation().validate(); - } - if (initialRecoveryExtendedLocation() != null) { - initialRecoveryExtendedLocation().validate(); - } - if (primaryExtendedLocation() != null) { - primaryExtendedLocation().validate(); - } - if (recoveryExtendedLocation() != null) { - recoveryExtendedLocation().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("initialPrimaryZone", this.initialPrimaryZone); - jsonWriter.writeStringField("initialRecoveryZone", this.initialRecoveryZone); - jsonWriter.writeJsonField("initialPrimaryExtendedLocation", this.initialPrimaryExtendedLocation); - jsonWriter.writeJsonField("initialRecoveryExtendedLocation", this.initialRecoveryExtendedLocation); - jsonWriter.writeStringField("initialPrimaryFabricLocation", this.initialPrimaryFabricLocation); - jsonWriter.writeStringField("initialRecoveryFabricLocation", this.initialRecoveryFabricLocation); - jsonWriter.writeStringField("primaryZone", this.primaryZone); - jsonWriter.writeStringField("recoveryZone", this.recoveryZone); - jsonWriter.writeJsonField("primaryExtendedLocation", this.primaryExtendedLocation); - jsonWriter.writeJsonField("recoveryExtendedLocation", this.recoveryExtendedLocation); - jsonWriter.writeStringField("primaryFabricLocation", this.primaryFabricLocation); - jsonWriter.writeStringField("recoveryFabricLocation", this.recoveryFabricLocation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AFabricSpecificLocationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AFabricSpecificLocationDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AFabricSpecificLocationDetails. - */ - public static A2AFabricSpecificLocationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AFabricSpecificLocationDetails deserializedA2AFabricSpecificLocationDetails - = new A2AFabricSpecificLocationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("initialPrimaryZone".equals(fieldName)) { - deserializedA2AFabricSpecificLocationDetails.initialPrimaryZone = reader.getString(); - } else if ("initialRecoveryZone".equals(fieldName)) { - deserializedA2AFabricSpecificLocationDetails.initialRecoveryZone = reader.getString(); - } else if ("initialPrimaryExtendedLocation".equals(fieldName)) { - deserializedA2AFabricSpecificLocationDetails.initialPrimaryExtendedLocation - = ExtendedLocation.fromJson(reader); - } else if ("initialRecoveryExtendedLocation".equals(fieldName)) { - deserializedA2AFabricSpecificLocationDetails.initialRecoveryExtendedLocation - = ExtendedLocation.fromJson(reader); - } else if ("initialPrimaryFabricLocation".equals(fieldName)) { - deserializedA2AFabricSpecificLocationDetails.initialPrimaryFabricLocation = reader.getString(); - } else if ("initialRecoveryFabricLocation".equals(fieldName)) { - deserializedA2AFabricSpecificLocationDetails.initialRecoveryFabricLocation = reader.getString(); - } else if ("primaryZone".equals(fieldName)) { - deserializedA2AFabricSpecificLocationDetails.primaryZone = reader.getString(); - } else if ("recoveryZone".equals(fieldName)) { - deserializedA2AFabricSpecificLocationDetails.recoveryZone = reader.getString(); - } else if ("primaryExtendedLocation".equals(fieldName)) { - deserializedA2AFabricSpecificLocationDetails.primaryExtendedLocation - = ExtendedLocation.fromJson(reader); - } else if ("recoveryExtendedLocation".equals(fieldName)) { - deserializedA2AFabricSpecificLocationDetails.recoveryExtendedLocation - = ExtendedLocation.fromJson(reader); - } else if ("primaryFabricLocation".equals(fieldName)) { - deserializedA2AFabricSpecificLocationDetails.primaryFabricLocation = reader.getString(); - } else if ("recoveryFabricLocation".equals(fieldName)) { - deserializedA2AFabricSpecificLocationDetails.recoveryFabricLocation = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AFabricSpecificLocationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2APolicyCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2APolicyCreationInput.java deleted file mode 100644 index 423638dccb90..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2APolicyCreationInput.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A Policy creation input. - */ -@Fluent -public final class A2APolicyCreationInput extends PolicyProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /* - * The duration in minutes until which the recovery points need to be stored. - */ - private Integer recoveryPointHistory; - - /* - * The crash consistent snapshot frequency (in minutes). - */ - private Integer crashConsistentFrequencyInMinutes; - - /* - * The app consistent snapshot frequency (in minutes). - */ - private Integer appConsistentFrequencyInMinutes; - - /* - * A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. - */ - private SetMultiVmSyncStatus multiVmSyncStatus; - - /** - * Creates an instance of A2APolicyCreationInput class. - */ - public A2APolicyCreationInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointHistory property: 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 recoveryPointHistory property: 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 crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency (in minutes). - * - * @return the crashConsistentFrequencyInMinutes value. - */ - public Integer crashConsistentFrequencyInMinutes() { - return this.crashConsistentFrequencyInMinutes; - } - - /** - * Set the crashConsistentFrequencyInMinutes property: 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 appConsistentFrequencyInMinutes property: The app consistent snapshot frequency (in minutes). - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: 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 the multiVmSyncStatus property: A value indicating whether multi-VM sync has to be enabled. Value should be - * 'Enabled' or 'Disabled'. - * - * @return the multiVmSyncStatus value. - */ - public SetMultiVmSyncStatus multiVmSyncStatus() { - return this.multiVmSyncStatus; - } - - /** - * Set the multiVmSyncStatus property: A value indicating whether multi-VM sync has to be enabled. Value should be - * 'Enabled' or 'Disabled'. - * - * @param multiVmSyncStatus the multiVmSyncStatus value to set. - * @return the A2APolicyCreationInput object itself. - */ - public A2APolicyCreationInput withMultiVmSyncStatus(SetMultiVmSyncStatus multiVmSyncStatus) { - this.multiVmSyncStatus = multiVmSyncStatus; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (multiVmSyncStatus() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property multiVmSyncStatus in model A2APolicyCreationInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(A2APolicyCreationInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("multiVmSyncStatus", - this.multiVmSyncStatus == null ? null : this.multiVmSyncStatus.toString()); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPointHistory", this.recoveryPointHistory); - jsonWriter.writeNumberField("crashConsistentFrequencyInMinutes", this.crashConsistentFrequencyInMinutes); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2APolicyCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2APolicyCreationInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the A2APolicyCreationInput. - */ - public static A2APolicyCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2APolicyCreationInput deserializedA2APolicyCreationInput = new A2APolicyCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("multiVmSyncStatus".equals(fieldName)) { - deserializedA2APolicyCreationInput.multiVmSyncStatus - = SetMultiVmSyncStatus.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedA2APolicyCreationInput.instanceType = reader.getString(); - } else if ("recoveryPointHistory".equals(fieldName)) { - deserializedA2APolicyCreationInput.recoveryPointHistory = reader.getNullable(JsonReader::getInt); - } else if ("crashConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedA2APolicyCreationInput.crashConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedA2APolicyCreationInput.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedA2APolicyCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2APolicyDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2APolicyDetails.java deleted file mode 100644 index 03d334f4d0bb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2APolicyDetails.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A specific policy details. - */ -@Fluent -public final class A2APolicyDetails extends PolicyProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "A2A"; - - /* - * The recovery point threshold in minutes. - */ - private Integer recoveryPointThresholdInMinutes; - - /* - * The duration in minutes until which the recovery points need to be stored. - */ - private Integer recoveryPointHistory; - - /* - * The app consistent snapshot frequency in minutes. - */ - private Integer appConsistentFrequencyInMinutes; - - /* - * A value indicating whether multi-VM sync has to be enabled. - */ - private String multiVmSyncStatus; - - /* - * The crash consistent snapshot frequency in minutes. - */ - private Integer crashConsistentFrequencyInMinutes; - - /** - * Creates an instance of A2APolicyDetails class. - */ - public A2APolicyDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointThresholdInMinutes property: The recovery point threshold in minutes. - * - * @return the recoveryPointThresholdInMinutes value. - */ - public Integer recoveryPointThresholdInMinutes() { - return this.recoveryPointThresholdInMinutes; - } - - /** - * Set the recoveryPointThresholdInMinutes property: 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 recoveryPointHistory property: 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 recoveryPointHistory property: 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 appConsistentFrequencyInMinutes property: The app consistent snapshot frequency in minutes. - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: 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 the multiVmSyncStatus property: A value indicating whether multi-VM sync has to be enabled. - * - * @return the multiVmSyncStatus value. - */ - public String multiVmSyncStatus() { - return this.multiVmSyncStatus; - } - - /** - * Set the multiVmSyncStatus property: 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 crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency in minutes. - * - * @return the crashConsistentFrequencyInMinutes value. - */ - public Integer crashConsistentFrequencyInMinutes() { - return this.crashConsistentFrequencyInMinutes; - } - - /** - * Set the crashConsistentFrequencyInMinutes property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPointThresholdInMinutes", this.recoveryPointThresholdInMinutes); - jsonWriter.writeNumberField("recoveryPointHistory", this.recoveryPointHistory); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - jsonWriter.writeStringField("multiVmSyncStatus", this.multiVmSyncStatus); - jsonWriter.writeNumberField("crashConsistentFrequencyInMinutes", this.crashConsistentFrequencyInMinutes); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2APolicyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2APolicyDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the A2APolicyDetails. - */ - public static A2APolicyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2APolicyDetails deserializedA2APolicyDetails = new A2APolicyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2APolicyDetails.instanceType = reader.getString(); - } else if ("recoveryPointThresholdInMinutes".equals(fieldName)) { - deserializedA2APolicyDetails.recoveryPointThresholdInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("recoveryPointHistory".equals(fieldName)) { - deserializedA2APolicyDetails.recoveryPointHistory = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedA2APolicyDetails.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("multiVmSyncStatus".equals(fieldName)) { - deserializedA2APolicyDetails.multiVmSyncStatus = reader.getString(); - } else if ("crashConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedA2APolicyDetails.crashConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedA2APolicyDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectedDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectedDiskDetails.java deleted file mode 100644 index 023a326403bd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectedDiskDetails.java +++ /dev/null @@ -1,723 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A2A protected disk details. - */ -@Fluent -public final class A2AProtectedDiskDetails implements JsonSerializable { - /* - * The disk uri. - */ - private String diskUri; - - /* - * The recovery disk storage account. - */ - private String recoveryAzureStorageAccountId; - - /* - * The primary disk storage account. - */ - private String primaryDiskAzureStorageAccountId; - - /* - * Recovery disk uri. - */ - private String recoveryDiskUri; - - /* - * The disk name. - */ - private String diskName; - - /* - * The disk capacity in bytes. - */ - private Long diskCapacityInBytes; - - /* - * The primary staging storage account. - */ - private String primaryStagingAzureStorageAccountId; - - /* - * The type of disk. - */ - private String diskType; - - /* - * A value indicating whether resync is required for this disk. - */ - private Boolean resyncRequired; - - /* - * The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. - */ - private Integer monitoringPercentageCompletion; - - /* - * The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. - */ - private String monitoringJobType; - - /* - * The data pending for replication in MB at staging account. - */ - private Double dataPendingInStagingStorageAccountInMB; - - /* - * The data pending at source virtual machine in MB. - */ - private Double dataPendingAtSourceAgentInMB; - - /* - * The disk state. - */ - private String diskState; - - /* - * The disk level operations list. - */ - private List allowedDiskLevelOperation; - - /* - * A value indicating whether vm has encrypted os disk or not. - */ - private Boolean isDiskEncrypted; - - /* - * The secret URL / identifier (BEK). - */ - private String secretIdentifier; - - /* - * The KeyVault resource id for secret (BEK). - */ - private String dekKeyVaultArmId; - - /* - * A value indicating whether disk key got encrypted or not. - */ - private Boolean isDiskKeyEncrypted; - - /* - * The key URL / identifier (KEK). - */ - private String keyIdentifier; - - /* - * The KeyVault resource id for key (KEK). - */ - private String kekKeyVaultArmId; - - /* - * The failover name for the managed disk. - */ - private String failoverDiskName; - - /* - * The test failover name for the managed disk. - */ - private String tfoDiskName; - - /** - * Creates an instance of A2AProtectedDiskDetails class. - */ - public A2AProtectedDiskDetails() { - } - - /** - * Get the diskUri property: The disk uri. - * - * @return the diskUri value. - */ - public String diskUri() { - return this.diskUri; - } - - /** - * Set the diskUri property: 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 recoveryAzureStorageAccountId property: The recovery disk storage account. - * - * @return the recoveryAzureStorageAccountId value. - */ - public String recoveryAzureStorageAccountId() { - return this.recoveryAzureStorageAccountId; - } - - /** - * Set the recoveryAzureStorageAccountId property: 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 primaryDiskAzureStorageAccountId property: The primary disk storage account. - * - * @return the primaryDiskAzureStorageAccountId value. - */ - public String primaryDiskAzureStorageAccountId() { - return this.primaryDiskAzureStorageAccountId; - } - - /** - * Set the primaryDiskAzureStorageAccountId property: 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 the recoveryDiskUri property: Recovery disk uri. - * - * @return the recoveryDiskUri value. - */ - public String recoveryDiskUri() { - return this.recoveryDiskUri; - } - - /** - * Set the recoveryDiskUri property: 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 diskName property: The disk name. - * - * @return the diskName value. - */ - public String diskName() { - return this.diskName; - } - - /** - * Set the diskName property: 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 diskCapacityInBytes property: The disk capacity in bytes. - * - * @return the diskCapacityInBytes value. - */ - public Long diskCapacityInBytes() { - return this.diskCapacityInBytes; - } - - /** - * Set the diskCapacityInBytes property: 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 primaryStagingAzureStorageAccountId property: The primary staging storage account. - * - * @return the primaryStagingAzureStorageAccountId value. - */ - public String primaryStagingAzureStorageAccountId() { - return this.primaryStagingAzureStorageAccountId; - } - - /** - * Set the primaryStagingAzureStorageAccountId property: 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 diskType property: The type of disk. - * - * @return the diskType value. - */ - public String diskType() { - return this.diskType; - } - - /** - * Set the diskType property: 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 the resyncRequired property: A value indicating whether resync is required for this disk. - * - * @return the resyncRequired value. - */ - public Boolean resyncRequired() { - return this.resyncRequired; - } - - /** - * Set the resyncRequired property: 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 monitoringPercentageCompletion property: 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 monitoringPercentageCompletion property: 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 monitoringJobType property: 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 monitoringJobType property: 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 dataPendingInStagingStorageAccountInMB property: The data pending for replication in MB at staging - * account. - * - * @return the dataPendingInStagingStorageAccountInMB value. - */ - public Double dataPendingInStagingStorageAccountInMB() { - return this.dataPendingInStagingStorageAccountInMB; - } - - /** - * Set the dataPendingInStagingStorageAccountInMB property: 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 dataPendingAtSourceAgentInMB property: The data pending at source virtual machine in MB. - * - * @return the dataPendingAtSourceAgentInMB value. - */ - public Double dataPendingAtSourceAgentInMB() { - return this.dataPendingAtSourceAgentInMB; - } - - /** - * Set the dataPendingAtSourceAgentInMB property: 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; - } - - /** - * Get the diskState property: The disk state. - * - * @return the diskState value. - */ - public String diskState() { - return this.diskState; - } - - /** - * Set the diskState property: The disk state. - * - * @param diskState the diskState value to set. - * @return the A2AProtectedDiskDetails object itself. - */ - public A2AProtectedDiskDetails withDiskState(String diskState) { - this.diskState = diskState; - return this; - } - - /** - * Get the allowedDiskLevelOperation property: The disk level operations list. - * - * @return the allowedDiskLevelOperation value. - */ - public List allowedDiskLevelOperation() { - return this.allowedDiskLevelOperation; - } - - /** - * Set the allowedDiskLevelOperation property: The disk level operations list. - * - * @param allowedDiskLevelOperation the allowedDiskLevelOperation value to set. - * @return the A2AProtectedDiskDetails object itself. - */ - public A2AProtectedDiskDetails withAllowedDiskLevelOperation(List allowedDiskLevelOperation) { - this.allowedDiskLevelOperation = allowedDiskLevelOperation; - return this; - } - - /** - * Get the isDiskEncrypted property: A value indicating whether vm has encrypted os disk or not. - * - * @return the isDiskEncrypted value. - */ - public Boolean isDiskEncrypted() { - return this.isDiskEncrypted; - } - - /** - * Set the isDiskEncrypted property: A value indicating whether vm has encrypted os disk or not. - * - * @param isDiskEncrypted the isDiskEncrypted value to set. - * @return the A2AProtectedDiskDetails object itself. - */ - public A2AProtectedDiskDetails withIsDiskEncrypted(Boolean isDiskEncrypted) { - this.isDiskEncrypted = isDiskEncrypted; - return this; - } - - /** - * Get the secretIdentifier property: The secret URL / identifier (BEK). - * - * @return the secretIdentifier value. - */ - public String secretIdentifier() { - return this.secretIdentifier; - } - - /** - * Set the secretIdentifier property: The secret URL / identifier (BEK). - * - * @param secretIdentifier the secretIdentifier value to set. - * @return the A2AProtectedDiskDetails object itself. - */ - public A2AProtectedDiskDetails withSecretIdentifier(String secretIdentifier) { - this.secretIdentifier = secretIdentifier; - return this; - } - - /** - * Get the dekKeyVaultArmId property: The KeyVault resource id for secret (BEK). - * - * @return the dekKeyVaultArmId value. - */ - public String dekKeyVaultArmId() { - return this.dekKeyVaultArmId; - } - - /** - * Set the dekKeyVaultArmId property: The KeyVault resource id for secret (BEK). - * - * @param dekKeyVaultArmId the dekKeyVaultArmId value to set. - * @return the A2AProtectedDiskDetails object itself. - */ - public A2AProtectedDiskDetails withDekKeyVaultArmId(String dekKeyVaultArmId) { - this.dekKeyVaultArmId = dekKeyVaultArmId; - return this; - } - - /** - * Get the isDiskKeyEncrypted property: A value indicating whether disk key got encrypted or not. - * - * @return the isDiskKeyEncrypted value. - */ - public Boolean isDiskKeyEncrypted() { - return this.isDiskKeyEncrypted; - } - - /** - * Set the isDiskKeyEncrypted property: A value indicating whether disk key got encrypted or not. - * - * @param isDiskKeyEncrypted the isDiskKeyEncrypted value to set. - * @return the A2AProtectedDiskDetails object itself. - */ - public A2AProtectedDiskDetails withIsDiskKeyEncrypted(Boolean isDiskKeyEncrypted) { - this.isDiskKeyEncrypted = isDiskKeyEncrypted; - return this; - } - - /** - * Get the keyIdentifier property: The key URL / identifier (KEK). - * - * @return the keyIdentifier value. - */ - public String keyIdentifier() { - return this.keyIdentifier; - } - - /** - * Set the keyIdentifier property: The key URL / identifier (KEK). - * - * @param keyIdentifier the keyIdentifier value to set. - * @return the A2AProtectedDiskDetails object itself. - */ - public A2AProtectedDiskDetails withKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - return this; - } - - /** - * Get the kekKeyVaultArmId property: The KeyVault resource id for key (KEK). - * - * @return the kekKeyVaultArmId value. - */ - public String kekKeyVaultArmId() { - return this.kekKeyVaultArmId; - } - - /** - * Set the kekKeyVaultArmId property: The KeyVault resource id for key (KEK). - * - * @param kekKeyVaultArmId the kekKeyVaultArmId value to set. - * @return the A2AProtectedDiskDetails object itself. - */ - public A2AProtectedDiskDetails withKekKeyVaultArmId(String kekKeyVaultArmId) { - this.kekKeyVaultArmId = kekKeyVaultArmId; - return this; - } - - /** - * Get the failoverDiskName property: The failover name for the managed disk. - * - * @return the failoverDiskName value. - */ - public String failoverDiskName() { - return this.failoverDiskName; - } - - /** - * Set the failoverDiskName property: The failover name for the managed disk. - * - * @param failoverDiskName the failoverDiskName value to set. - * @return the A2AProtectedDiskDetails object itself. - */ - public A2AProtectedDiskDetails withFailoverDiskName(String failoverDiskName) { - this.failoverDiskName = failoverDiskName; - return this; - } - - /** - * Get the tfoDiskName property: The test failover name for the managed disk. - * - * @return the tfoDiskName value. - */ - public String tfoDiskName() { - return this.tfoDiskName; - } - - /** - * Set the tfoDiskName property: The test failover name for the managed disk. - * - * @param tfoDiskName the tfoDiskName value to set. - * @return the A2AProtectedDiskDetails object itself. - */ - public A2AProtectedDiskDetails withTfoDiskName(String tfoDiskName) { - this.tfoDiskName = tfoDiskName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskUri", this.diskUri); - jsonWriter.writeStringField("recoveryAzureStorageAccountId", this.recoveryAzureStorageAccountId); - jsonWriter.writeStringField("primaryDiskAzureStorageAccountId", this.primaryDiskAzureStorageAccountId); - jsonWriter.writeStringField("recoveryDiskUri", this.recoveryDiskUri); - jsonWriter.writeStringField("diskName", this.diskName); - jsonWriter.writeNumberField("diskCapacityInBytes", this.diskCapacityInBytes); - jsonWriter.writeStringField("primaryStagingAzureStorageAccountId", this.primaryStagingAzureStorageAccountId); - jsonWriter.writeStringField("diskType", this.diskType); - jsonWriter.writeBooleanField("resyncRequired", this.resyncRequired); - jsonWriter.writeNumberField("monitoringPercentageCompletion", this.monitoringPercentageCompletion); - jsonWriter.writeStringField("monitoringJobType", this.monitoringJobType); - jsonWriter.writeNumberField("dataPendingInStagingStorageAccountInMB", - this.dataPendingInStagingStorageAccountInMB); - jsonWriter.writeNumberField("dataPendingAtSourceAgentInMB", this.dataPendingAtSourceAgentInMB); - jsonWriter.writeStringField("diskState", this.diskState); - jsonWriter.writeArrayField("allowedDiskLevelOperation", this.allowedDiskLevelOperation, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isDiskEncrypted", this.isDiskEncrypted); - jsonWriter.writeStringField("secretIdentifier", this.secretIdentifier); - jsonWriter.writeStringField("dekKeyVaultArmId", this.dekKeyVaultArmId); - jsonWriter.writeBooleanField("isDiskKeyEncrypted", this.isDiskKeyEncrypted); - jsonWriter.writeStringField("keyIdentifier", this.keyIdentifier); - jsonWriter.writeStringField("kekKeyVaultArmId", this.kekKeyVaultArmId); - jsonWriter.writeStringField("failoverDiskName", this.failoverDiskName); - jsonWriter.writeStringField("tfoDiskName", this.tfoDiskName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AProtectedDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AProtectedDiskDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AProtectedDiskDetails. - */ - public static A2AProtectedDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AProtectedDiskDetails deserializedA2AProtectedDiskDetails = new A2AProtectedDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskUri".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.diskUri = reader.getString(); - } else if ("recoveryAzureStorageAccountId".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.recoveryAzureStorageAccountId = reader.getString(); - } else if ("primaryDiskAzureStorageAccountId".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.primaryDiskAzureStorageAccountId = reader.getString(); - } else if ("recoveryDiskUri".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.recoveryDiskUri = reader.getString(); - } else if ("diskName".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.diskName = reader.getString(); - } else if ("diskCapacityInBytes".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.diskCapacityInBytes = reader.getNullable(JsonReader::getLong); - } else if ("primaryStagingAzureStorageAccountId".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.primaryStagingAzureStorageAccountId = reader.getString(); - } else if ("diskType".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.diskType = reader.getString(); - } else if ("resyncRequired".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.resyncRequired = reader.getNullable(JsonReader::getBoolean); - } else if ("monitoringPercentageCompletion".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.monitoringPercentageCompletion - = reader.getNullable(JsonReader::getInt); - } else if ("monitoringJobType".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.monitoringJobType = reader.getString(); - } else if ("dataPendingInStagingStorageAccountInMB".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.dataPendingInStagingStorageAccountInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("dataPendingAtSourceAgentInMB".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.dataPendingAtSourceAgentInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("diskState".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.diskState = reader.getString(); - } else if ("allowedDiskLevelOperation".equals(fieldName)) { - List allowedDiskLevelOperation = reader.readArray(reader1 -> reader1.getString()); - deserializedA2AProtectedDiskDetails.allowedDiskLevelOperation = allowedDiskLevelOperation; - } else if ("isDiskEncrypted".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.isDiskEncrypted = reader.getNullable(JsonReader::getBoolean); - } else if ("secretIdentifier".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.secretIdentifier = reader.getString(); - } else if ("dekKeyVaultArmId".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.dekKeyVaultArmId = reader.getString(); - } else if ("isDiskKeyEncrypted".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.isDiskKeyEncrypted = reader.getNullable(JsonReader::getBoolean); - } else if ("keyIdentifier".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.keyIdentifier = reader.getString(); - } else if ("kekKeyVaultArmId".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.kekKeyVaultArmId = reader.getString(); - } else if ("failoverDiskName".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.failoverDiskName = reader.getString(); - } else if ("tfoDiskName".equals(fieldName)) { - deserializedA2AProtectedDiskDetails.tfoDiskName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AProtectedDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectedManagedDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectedManagedDiskDetails.java deleted file mode 100644 index 759c7b24ddde..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectedManagedDiskDetails.java +++ /dev/null @@ -1,874 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A2A protected managed disk details. - */ -@Fluent -public final class A2AProtectedManagedDiskDetails implements JsonSerializable { - /* - * The managed disk Arm id. - */ - private String diskId; - - /* - * The recovery disk resource group Arm Id. - */ - private String recoveryResourceGroupId; - - /* - * Recovery target disk Arm Id. - */ - private String recoveryTargetDiskId; - - /* - * Recovery replica disk Arm Id. - */ - private String recoveryReplicaDiskId; - - /* - * Recovery original target disk Arm Id. - */ - private String recoveryOrignalTargetDiskId; - - /* - * The replica disk type. Its an optional value and will be same as source disk type if not user provided. - */ - private String recoveryReplicaDiskAccountType; - - /* - * The target disk type after failover. Its an optional value and will be same as source disk type if not user - * provided. - */ - private String recoveryTargetDiskAccountType; - - /* - * The recovery disk encryption set Id. - */ - private String recoveryDiskEncryptionSetId; - - /* - * The primary disk encryption set Id. - */ - private String primaryDiskEncryptionSetId; - - /* - * The disk name. - */ - private String diskName; - - /* - * The disk capacity in bytes. - */ - private Long diskCapacityInBytes; - - /* - * The primary staging storage account. - */ - private String primaryStagingAzureStorageAccountId; - - /* - * The type of disk. - */ - private String diskType; - - /* - * A value indicating whether resync is required for this disk. - */ - private Boolean resyncRequired; - - /* - * The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. - */ - private Integer monitoringPercentageCompletion; - - /* - * The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. - */ - private String monitoringJobType; - - /* - * The data pending for replication in MB at staging account. - */ - private Double dataPendingInStagingStorageAccountInMB; - - /* - * The data pending at source virtual machine in MB. - */ - private Double dataPendingAtSourceAgentInMB; - - /* - * The disk state. - */ - private String diskState; - - /* - * The disk level operations list. - */ - private List allowedDiskLevelOperation; - - /* - * A value indicating whether vm has encrypted os disk or not. - */ - private Boolean isDiskEncrypted; - - /* - * The secret URL / identifier (BEK). - */ - private String secretIdentifier; - - /* - * The KeyVault resource id for secret (BEK). - */ - private String dekKeyVaultArmId; - - /* - * A value indicating whether disk key got encrypted or not. - */ - private Boolean isDiskKeyEncrypted; - - /* - * The key URL / identifier (KEK). - */ - private String keyIdentifier; - - /* - * The KeyVault resource id for key (KEK). - */ - private String kekKeyVaultArmId; - - /* - * The failover name for the managed disk. - */ - private String failoverDiskName; - - /* - * The test failover name for the managed disk. - */ - private String tfoDiskName; - - /** - * Creates an instance of A2AProtectedManagedDiskDetails class. - */ - public A2AProtectedManagedDiskDetails() { - } - - /** - * Get the diskId property: The managed disk Arm id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: 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 recoveryResourceGroupId property: The recovery disk resource group Arm Id. - * - * @return the recoveryResourceGroupId value. - */ - public String recoveryResourceGroupId() { - return this.recoveryResourceGroupId; - } - - /** - * Set the recoveryResourceGroupId property: The recovery disk resource group Arm Id. - * - * @param recoveryResourceGroupId the recoveryResourceGroupId value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withRecoveryResourceGroupId(String recoveryResourceGroupId) { - this.recoveryResourceGroupId = recoveryResourceGroupId; - return this; - } - - /** - * Get the recoveryTargetDiskId property: Recovery target disk Arm Id. - * - * @return the recoveryTargetDiskId value. - */ - public String recoveryTargetDiskId() { - return this.recoveryTargetDiskId; - } - - /** - * Set the recoveryTargetDiskId property: Recovery target disk Arm Id. - * - * @param recoveryTargetDiskId the recoveryTargetDiskId value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withRecoveryTargetDiskId(String recoveryTargetDiskId) { - this.recoveryTargetDiskId = recoveryTargetDiskId; - return this; - } - - /** - * Get the recoveryReplicaDiskId property: Recovery replica disk Arm Id. - * - * @return the recoveryReplicaDiskId value. - */ - public String recoveryReplicaDiskId() { - return this.recoveryReplicaDiskId; - } - - /** - * Set the recoveryReplicaDiskId property: Recovery replica disk Arm Id. - * - * @param recoveryReplicaDiskId the recoveryReplicaDiskId value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withRecoveryReplicaDiskId(String recoveryReplicaDiskId) { - this.recoveryReplicaDiskId = recoveryReplicaDiskId; - return this; - } - - /** - * Get the recoveryOrignalTargetDiskId property: Recovery original target disk Arm Id. - * - * @return the recoveryOrignalTargetDiskId value. - */ - public String recoveryOrignalTargetDiskId() { - return this.recoveryOrignalTargetDiskId; - } - - /** - * Set the recoveryOrignalTargetDiskId property: Recovery original target disk Arm Id. - * - * @param recoveryOrignalTargetDiskId the recoveryOrignalTargetDiskId value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withRecoveryOrignalTargetDiskId(String recoveryOrignalTargetDiskId) { - this.recoveryOrignalTargetDiskId = recoveryOrignalTargetDiskId; - return this; - } - - /** - * Get the recoveryReplicaDiskAccountType property: The replica disk type. Its an optional value and will be same as - * source disk type if not user provided. - * - * @return the recoveryReplicaDiskAccountType value. - */ - public String recoveryReplicaDiskAccountType() { - return this.recoveryReplicaDiskAccountType; - } - - /** - * Set the recoveryReplicaDiskAccountType property: The replica disk type. Its an optional value and will be same as - * source disk type if not user provided. - * - * @param recoveryReplicaDiskAccountType the recoveryReplicaDiskAccountType value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withRecoveryReplicaDiskAccountType(String recoveryReplicaDiskAccountType) { - this.recoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType; - return this; - } - - /** - * Get the recoveryTargetDiskAccountType property: The target disk type after failover. Its an optional value and - * will be same as source disk type if not user provided. - * - * @return the recoveryTargetDiskAccountType value. - */ - public String recoveryTargetDiskAccountType() { - return this.recoveryTargetDiskAccountType; - } - - /** - * Set the recoveryTargetDiskAccountType property: The target disk type after failover. Its an optional value and - * will be same as source disk type if not user provided. - * - * @param recoveryTargetDiskAccountType the recoveryTargetDiskAccountType value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withRecoveryTargetDiskAccountType(String recoveryTargetDiskAccountType) { - this.recoveryTargetDiskAccountType = recoveryTargetDiskAccountType; - return this; - } - - /** - * Get the recoveryDiskEncryptionSetId property: The recovery disk encryption set Id. - * - * @return the recoveryDiskEncryptionSetId value. - */ - public String recoveryDiskEncryptionSetId() { - return this.recoveryDiskEncryptionSetId; - } - - /** - * Set the recoveryDiskEncryptionSetId property: The recovery disk encryption set Id. - * - * @param recoveryDiskEncryptionSetId the recoveryDiskEncryptionSetId value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withRecoveryDiskEncryptionSetId(String recoveryDiskEncryptionSetId) { - this.recoveryDiskEncryptionSetId = recoveryDiskEncryptionSetId; - return this; - } - - /** - * Get the primaryDiskEncryptionSetId property: The primary disk encryption set Id. - * - * @return the primaryDiskEncryptionSetId value. - */ - public String primaryDiskEncryptionSetId() { - return this.primaryDiskEncryptionSetId; - } - - /** - * Set the primaryDiskEncryptionSetId property: The primary disk encryption set Id. - * - * @param primaryDiskEncryptionSetId the primaryDiskEncryptionSetId value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withPrimaryDiskEncryptionSetId(String primaryDiskEncryptionSetId) { - this.primaryDiskEncryptionSetId = primaryDiskEncryptionSetId; - return this; - } - - /** - * Get the diskName property: The disk name. - * - * @return the diskName value. - */ - public String diskName() { - return this.diskName; - } - - /** - * Set the diskName property: 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 diskCapacityInBytes property: The disk capacity in bytes. - * - * @return the diskCapacityInBytes value. - */ - public Long diskCapacityInBytes() { - return this.diskCapacityInBytes; - } - - /** - * Set the diskCapacityInBytes property: 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 primaryStagingAzureStorageAccountId property: The primary staging storage account. - * - * @return the primaryStagingAzureStorageAccountId value. - */ - public String primaryStagingAzureStorageAccountId() { - return this.primaryStagingAzureStorageAccountId; - } - - /** - * Set the primaryStagingAzureStorageAccountId property: 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 diskType property: The type of disk. - * - * @return the diskType value. - */ - public String diskType() { - return this.diskType; - } - - /** - * Set the diskType property: 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 the resyncRequired property: A value indicating whether resync is required for this disk. - * - * @return the resyncRequired value. - */ - public Boolean resyncRequired() { - return this.resyncRequired; - } - - /** - * Set the resyncRequired property: 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 monitoringPercentageCompletion property: 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 monitoringPercentageCompletion property: 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 monitoringJobType property: 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 monitoringJobType property: 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 dataPendingInStagingStorageAccountInMB property: The data pending for replication in MB at staging - * account. - * - * @return the dataPendingInStagingStorageAccountInMB value. - */ - public Double dataPendingInStagingStorageAccountInMB() { - return this.dataPendingInStagingStorageAccountInMB; - } - - /** - * Set the dataPendingInStagingStorageAccountInMB property: 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 dataPendingAtSourceAgentInMB property: The data pending at source virtual machine in MB. - * - * @return the dataPendingAtSourceAgentInMB value. - */ - public Double dataPendingAtSourceAgentInMB() { - return this.dataPendingAtSourceAgentInMB; - } - - /** - * Set the dataPendingAtSourceAgentInMB property: 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; - } - - /** - * Get the diskState property: The disk state. - * - * @return the diskState value. - */ - public String diskState() { - return this.diskState; - } - - /** - * Set the diskState property: The disk state. - * - * @param diskState the diskState value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withDiskState(String diskState) { - this.diskState = diskState; - return this; - } - - /** - * Get the allowedDiskLevelOperation property: The disk level operations list. - * - * @return the allowedDiskLevelOperation value. - */ - public List allowedDiskLevelOperation() { - return this.allowedDiskLevelOperation; - } - - /** - * Set the allowedDiskLevelOperation property: The disk level operations list. - * - * @param allowedDiskLevelOperation the allowedDiskLevelOperation value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withAllowedDiskLevelOperation(List allowedDiskLevelOperation) { - this.allowedDiskLevelOperation = allowedDiskLevelOperation; - return this; - } - - /** - * Get the isDiskEncrypted property: A value indicating whether vm has encrypted os disk or not. - * - * @return the isDiskEncrypted value. - */ - public Boolean isDiskEncrypted() { - return this.isDiskEncrypted; - } - - /** - * Set the isDiskEncrypted property: A value indicating whether vm has encrypted os disk or not. - * - * @param isDiskEncrypted the isDiskEncrypted value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withIsDiskEncrypted(Boolean isDiskEncrypted) { - this.isDiskEncrypted = isDiskEncrypted; - return this; - } - - /** - * Get the secretIdentifier property: The secret URL / identifier (BEK). - * - * @return the secretIdentifier value. - */ - public String secretIdentifier() { - return this.secretIdentifier; - } - - /** - * Set the secretIdentifier property: The secret URL / identifier (BEK). - * - * @param secretIdentifier the secretIdentifier value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withSecretIdentifier(String secretIdentifier) { - this.secretIdentifier = secretIdentifier; - return this; - } - - /** - * Get the dekKeyVaultArmId property: The KeyVault resource id for secret (BEK). - * - * @return the dekKeyVaultArmId value. - */ - public String dekKeyVaultArmId() { - return this.dekKeyVaultArmId; - } - - /** - * Set the dekKeyVaultArmId property: The KeyVault resource id for secret (BEK). - * - * @param dekKeyVaultArmId the dekKeyVaultArmId value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withDekKeyVaultArmId(String dekKeyVaultArmId) { - this.dekKeyVaultArmId = dekKeyVaultArmId; - return this; - } - - /** - * Get the isDiskKeyEncrypted property: A value indicating whether disk key got encrypted or not. - * - * @return the isDiskKeyEncrypted value. - */ - public Boolean isDiskKeyEncrypted() { - return this.isDiskKeyEncrypted; - } - - /** - * Set the isDiskKeyEncrypted property: A value indicating whether disk key got encrypted or not. - * - * @param isDiskKeyEncrypted the isDiskKeyEncrypted value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withIsDiskKeyEncrypted(Boolean isDiskKeyEncrypted) { - this.isDiskKeyEncrypted = isDiskKeyEncrypted; - return this; - } - - /** - * Get the keyIdentifier property: The key URL / identifier (KEK). - * - * @return the keyIdentifier value. - */ - public String keyIdentifier() { - return this.keyIdentifier; - } - - /** - * Set the keyIdentifier property: The key URL / identifier (KEK). - * - * @param keyIdentifier the keyIdentifier value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - return this; - } - - /** - * Get the kekKeyVaultArmId property: The KeyVault resource id for key (KEK). - * - * @return the kekKeyVaultArmId value. - */ - public String kekKeyVaultArmId() { - return this.kekKeyVaultArmId; - } - - /** - * Set the kekKeyVaultArmId property: The KeyVault resource id for key (KEK). - * - * @param kekKeyVaultArmId the kekKeyVaultArmId value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withKekKeyVaultArmId(String kekKeyVaultArmId) { - this.kekKeyVaultArmId = kekKeyVaultArmId; - return this; - } - - /** - * Get the failoverDiskName property: The failover name for the managed disk. - * - * @return the failoverDiskName value. - */ - public String failoverDiskName() { - return this.failoverDiskName; - } - - /** - * Set the failoverDiskName property: The failover name for the managed disk. - * - * @param failoverDiskName the failoverDiskName value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withFailoverDiskName(String failoverDiskName) { - this.failoverDiskName = failoverDiskName; - return this; - } - - /** - * Get the tfoDiskName property: The test failover name for the managed disk. - * - * @return the tfoDiskName value. - */ - public String tfoDiskName() { - return this.tfoDiskName; - } - - /** - * Set the tfoDiskName property: The test failover name for the managed disk. - * - * @param tfoDiskName the tfoDiskName value to set. - * @return the A2AProtectedManagedDiskDetails object itself. - */ - public A2AProtectedManagedDiskDetails withTfoDiskName(String tfoDiskName) { - this.tfoDiskName = tfoDiskName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("recoveryResourceGroupId", this.recoveryResourceGroupId); - jsonWriter.writeStringField("recoveryTargetDiskId", this.recoveryTargetDiskId); - jsonWriter.writeStringField("recoveryReplicaDiskId", this.recoveryReplicaDiskId); - jsonWriter.writeStringField("recoveryOrignalTargetDiskId", this.recoveryOrignalTargetDiskId); - jsonWriter.writeStringField("recoveryReplicaDiskAccountType", this.recoveryReplicaDiskAccountType); - jsonWriter.writeStringField("recoveryTargetDiskAccountType", this.recoveryTargetDiskAccountType); - jsonWriter.writeStringField("recoveryDiskEncryptionSetId", this.recoveryDiskEncryptionSetId); - jsonWriter.writeStringField("primaryDiskEncryptionSetId", this.primaryDiskEncryptionSetId); - jsonWriter.writeStringField("diskName", this.diskName); - jsonWriter.writeNumberField("diskCapacityInBytes", this.diskCapacityInBytes); - jsonWriter.writeStringField("primaryStagingAzureStorageAccountId", this.primaryStagingAzureStorageAccountId); - jsonWriter.writeStringField("diskType", this.diskType); - jsonWriter.writeBooleanField("resyncRequired", this.resyncRequired); - jsonWriter.writeNumberField("monitoringPercentageCompletion", this.monitoringPercentageCompletion); - jsonWriter.writeStringField("monitoringJobType", this.monitoringJobType); - jsonWriter.writeNumberField("dataPendingInStagingStorageAccountInMB", - this.dataPendingInStagingStorageAccountInMB); - jsonWriter.writeNumberField("dataPendingAtSourceAgentInMB", this.dataPendingAtSourceAgentInMB); - jsonWriter.writeStringField("diskState", this.diskState); - jsonWriter.writeArrayField("allowedDiskLevelOperation", this.allowedDiskLevelOperation, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isDiskEncrypted", this.isDiskEncrypted); - jsonWriter.writeStringField("secretIdentifier", this.secretIdentifier); - jsonWriter.writeStringField("dekKeyVaultArmId", this.dekKeyVaultArmId); - jsonWriter.writeBooleanField("isDiskKeyEncrypted", this.isDiskKeyEncrypted); - jsonWriter.writeStringField("keyIdentifier", this.keyIdentifier); - jsonWriter.writeStringField("kekKeyVaultArmId", this.kekKeyVaultArmId); - jsonWriter.writeStringField("failoverDiskName", this.failoverDiskName); - jsonWriter.writeStringField("tfoDiskName", this.tfoDiskName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AProtectedManagedDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AProtectedManagedDiskDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AProtectedManagedDiskDetails. - */ - public static A2AProtectedManagedDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AProtectedManagedDiskDetails deserializedA2AProtectedManagedDiskDetails - = new A2AProtectedManagedDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.diskId = reader.getString(); - } else if ("recoveryResourceGroupId".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.recoveryResourceGroupId = reader.getString(); - } else if ("recoveryTargetDiskId".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.recoveryTargetDiskId = reader.getString(); - } else if ("recoveryReplicaDiskId".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.recoveryReplicaDiskId = reader.getString(); - } else if ("recoveryOrignalTargetDiskId".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.recoveryOrignalTargetDiskId = reader.getString(); - } else if ("recoveryReplicaDiskAccountType".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.recoveryReplicaDiskAccountType = reader.getString(); - } else if ("recoveryTargetDiskAccountType".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.recoveryTargetDiskAccountType = reader.getString(); - } else if ("recoveryDiskEncryptionSetId".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.recoveryDiskEncryptionSetId = reader.getString(); - } else if ("primaryDiskEncryptionSetId".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.primaryDiskEncryptionSetId = reader.getString(); - } else if ("diskName".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.diskName = reader.getString(); - } else if ("diskCapacityInBytes".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.diskCapacityInBytes - = reader.getNullable(JsonReader::getLong); - } else if ("primaryStagingAzureStorageAccountId".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.primaryStagingAzureStorageAccountId = reader.getString(); - } else if ("diskType".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.diskType = reader.getString(); - } else if ("resyncRequired".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.resyncRequired - = reader.getNullable(JsonReader::getBoolean); - } else if ("monitoringPercentageCompletion".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.monitoringPercentageCompletion - = reader.getNullable(JsonReader::getInt); - } else if ("monitoringJobType".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.monitoringJobType = reader.getString(); - } else if ("dataPendingInStagingStorageAccountInMB".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.dataPendingInStagingStorageAccountInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("dataPendingAtSourceAgentInMB".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.dataPendingAtSourceAgentInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("diskState".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.diskState = reader.getString(); - } else if ("allowedDiskLevelOperation".equals(fieldName)) { - List allowedDiskLevelOperation = reader.readArray(reader1 -> reader1.getString()); - deserializedA2AProtectedManagedDiskDetails.allowedDiskLevelOperation = allowedDiskLevelOperation; - } else if ("isDiskEncrypted".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.isDiskEncrypted - = reader.getNullable(JsonReader::getBoolean); - } else if ("secretIdentifier".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.secretIdentifier = reader.getString(); - } else if ("dekKeyVaultArmId".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.dekKeyVaultArmId = reader.getString(); - } else if ("isDiskKeyEncrypted".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.isDiskKeyEncrypted - = reader.getNullable(JsonReader::getBoolean); - } else if ("keyIdentifier".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.keyIdentifier = reader.getString(); - } else if ("kekKeyVaultArmId".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.kekKeyVaultArmId = reader.getString(); - } else if ("failoverDiskName".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.failoverDiskName = reader.getString(); - } else if ("tfoDiskName".equals(fieldName)) { - deserializedA2AProtectedManagedDiskDetails.tfoDiskName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AProtectedManagedDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectionContainerMappingDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectionContainerMappingDetails.java deleted file mode 100644 index b49659cec7ea..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectionContainerMappingDetails.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A provider specific settings. - */ -@Fluent -public final class A2AProtectionContainerMappingDetails extends ProtectionContainerMappingProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "A2A"; - - /* - * A value indicating whether the auto update is enabled. - */ - private AgentAutoUpdateStatus agentAutoUpdateStatus; - - /* - * The automation account arm id. - */ - private String automationAccountArmId; - - /* - * A value indicating the type authentication to use for automation Account. - */ - private AutomationAccountAuthenticationType automationAccountAuthenticationType; - - /* - * The schedule arm name. - */ - private String scheduleName; - - /* - * The job schedule arm name. - */ - private String jobScheduleName; - - /** - * Creates an instance of A2AProtectionContainerMappingDetails class. - */ - public A2AProtectionContainerMappingDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the agentAutoUpdateStatus property: A value indicating whether the auto update is enabled. - * - * @return the agentAutoUpdateStatus value. - */ - public AgentAutoUpdateStatus agentAutoUpdateStatus() { - return this.agentAutoUpdateStatus; - } - - /** - * Set the agentAutoUpdateStatus property: A value indicating whether the auto update is enabled. - * - * @param agentAutoUpdateStatus the agentAutoUpdateStatus value to set. - * @return the A2AProtectionContainerMappingDetails object itself. - */ - public A2AProtectionContainerMappingDetails withAgentAutoUpdateStatus(AgentAutoUpdateStatus agentAutoUpdateStatus) { - this.agentAutoUpdateStatus = agentAutoUpdateStatus; - return this; - } - - /** - * Get the automationAccountArmId property: The automation account arm id. - * - * @return the automationAccountArmId value. - */ - public String automationAccountArmId() { - return this.automationAccountArmId; - } - - /** - * Set the automationAccountArmId property: The automation account arm id. - * - * @param automationAccountArmId the automationAccountArmId value to set. - * @return the A2AProtectionContainerMappingDetails object itself. - */ - public A2AProtectionContainerMappingDetails withAutomationAccountArmId(String automationAccountArmId) { - this.automationAccountArmId = automationAccountArmId; - return this; - } - - /** - * Get the automationAccountAuthenticationType property: A value indicating the type authentication to use for - * automation Account. - * - * @return the automationAccountAuthenticationType value. - */ - public AutomationAccountAuthenticationType automationAccountAuthenticationType() { - return this.automationAccountAuthenticationType; - } - - /** - * Set the automationAccountAuthenticationType property: A value indicating the type authentication to use for - * automation Account. - * - * @param automationAccountAuthenticationType the automationAccountAuthenticationType value to set. - * @return the A2AProtectionContainerMappingDetails object itself. - */ - public A2AProtectionContainerMappingDetails withAutomationAccountAuthenticationType( - AutomationAccountAuthenticationType automationAccountAuthenticationType) { - this.automationAccountAuthenticationType = automationAccountAuthenticationType; - return this; - } - - /** - * Get the scheduleName property: The schedule arm name. - * - * @return the scheduleName value. - */ - public String scheduleName() { - return this.scheduleName; - } - - /** - * Set the scheduleName property: The schedule arm name. - * - * @param scheduleName the scheduleName value to set. - * @return the A2AProtectionContainerMappingDetails object itself. - */ - public A2AProtectionContainerMappingDetails withScheduleName(String scheduleName) { - this.scheduleName = scheduleName; - return this; - } - - /** - * Get the jobScheduleName property: The job schedule arm name. - * - * @return the jobScheduleName value. - */ - public String jobScheduleName() { - return this.jobScheduleName; - } - - /** - * Set the jobScheduleName property: The job schedule arm name. - * - * @param jobScheduleName the jobScheduleName value to set. - * @return the A2AProtectionContainerMappingDetails object itself. - */ - public A2AProtectionContainerMappingDetails withJobScheduleName(String jobScheduleName) { - this.jobScheduleName = jobScheduleName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("agentAutoUpdateStatus", - this.agentAutoUpdateStatus == null ? null : this.agentAutoUpdateStatus.toString()); - jsonWriter.writeStringField("automationAccountArmId", this.automationAccountArmId); - jsonWriter.writeStringField("automationAccountAuthenticationType", - this.automationAccountAuthenticationType == null - ? null - : this.automationAccountAuthenticationType.toString()); - jsonWriter.writeStringField("scheduleName", this.scheduleName); - jsonWriter.writeStringField("jobScheduleName", this.jobScheduleName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AProtectionContainerMappingDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AProtectionContainerMappingDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AProtectionContainerMappingDetails. - */ - public static A2AProtectionContainerMappingDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AProtectionContainerMappingDetails deserializedA2AProtectionContainerMappingDetails - = new A2AProtectionContainerMappingDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2AProtectionContainerMappingDetails.instanceType = reader.getString(); - } else if ("agentAutoUpdateStatus".equals(fieldName)) { - deserializedA2AProtectionContainerMappingDetails.agentAutoUpdateStatus - = AgentAutoUpdateStatus.fromString(reader.getString()); - } else if ("automationAccountArmId".equals(fieldName)) { - deserializedA2AProtectionContainerMappingDetails.automationAccountArmId = reader.getString(); - } else if ("automationAccountAuthenticationType".equals(fieldName)) { - deserializedA2AProtectionContainerMappingDetails.automationAccountAuthenticationType - = AutomationAccountAuthenticationType.fromString(reader.getString()); - } else if ("scheduleName".equals(fieldName)) { - deserializedA2AProtectionContainerMappingDetails.scheduleName = reader.getString(); - } else if ("jobScheduleName".equals(fieldName)) { - deserializedA2AProtectionContainerMappingDetails.jobScheduleName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AProtectionContainerMappingDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectionIntentDiskInputDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectionIntentDiskInputDetails.java deleted file mode 100644 index cad4f36ed6f3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectionIntentDiskInputDetails.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Azure VM unmanaged disk input details. - */ -@Fluent -public final class A2AProtectionIntentDiskInputDetails - implements JsonSerializable { - /* - * The disk Uri. - */ - private String diskUri; - - /* - * The recovery VHD storage account input. - */ - private StorageAccountCustomDetails recoveryAzureStorageAccountCustomInput; - - /* - * The primary staging storage account input. - */ - private StorageAccountCustomDetails primaryStagingStorageAccountCustomInput; - - /** - * Creates an instance of A2AProtectionIntentDiskInputDetails class. - */ - public A2AProtectionIntentDiskInputDetails() { - } - - /** - * Get the diskUri property: The disk Uri. - * - * @return the diskUri value. - */ - public String diskUri() { - return this.diskUri; - } - - /** - * Set the diskUri property: The disk Uri. - * - * @param diskUri the diskUri value to set. - * @return the A2AProtectionIntentDiskInputDetails object itself. - */ - public A2AProtectionIntentDiskInputDetails withDiskUri(String diskUri) { - this.diskUri = diskUri; - return this; - } - - /** - * Get the recoveryAzureStorageAccountCustomInput property: The recovery VHD storage account input. - * - * @return the recoveryAzureStorageAccountCustomInput value. - */ - public StorageAccountCustomDetails recoveryAzureStorageAccountCustomInput() { - return this.recoveryAzureStorageAccountCustomInput; - } - - /** - * Set the recoveryAzureStorageAccountCustomInput property: The recovery VHD storage account input. - * - * @param recoveryAzureStorageAccountCustomInput the recoveryAzureStorageAccountCustomInput value to set. - * @return the A2AProtectionIntentDiskInputDetails object itself. - */ - public A2AProtectionIntentDiskInputDetails - withRecoveryAzureStorageAccountCustomInput(StorageAccountCustomDetails recoveryAzureStorageAccountCustomInput) { - this.recoveryAzureStorageAccountCustomInput = recoveryAzureStorageAccountCustomInput; - return this; - } - - /** - * Get the primaryStagingStorageAccountCustomInput property: The primary staging storage account input. - * - * @return the primaryStagingStorageAccountCustomInput value. - */ - public StorageAccountCustomDetails primaryStagingStorageAccountCustomInput() { - return this.primaryStagingStorageAccountCustomInput; - } - - /** - * Set the primaryStagingStorageAccountCustomInput property: The primary staging storage account input. - * - * @param primaryStagingStorageAccountCustomInput the primaryStagingStorageAccountCustomInput value to set. - * @return the A2AProtectionIntentDiskInputDetails object itself. - */ - public A2AProtectionIntentDiskInputDetails withPrimaryStagingStorageAccountCustomInput( - StorageAccountCustomDetails primaryStagingStorageAccountCustomInput) { - this.primaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskUri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property diskUri in model A2AProtectionIntentDiskInputDetails")); - } - if (recoveryAzureStorageAccountCustomInput() != null) { - recoveryAzureStorageAccountCustomInput().validate(); - } - if (primaryStagingStorageAccountCustomInput() != null) { - primaryStagingStorageAccountCustomInput().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(A2AProtectionIntentDiskInputDetails.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskUri", this.diskUri); - jsonWriter.writeJsonField("recoveryAzureStorageAccountCustomInput", - this.recoveryAzureStorageAccountCustomInput); - jsonWriter.writeJsonField("primaryStagingStorageAccountCustomInput", - this.primaryStagingStorageAccountCustomInput); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AProtectionIntentDiskInputDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AProtectionIntentDiskInputDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the A2AProtectionIntentDiskInputDetails. - */ - public static A2AProtectionIntentDiskInputDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AProtectionIntentDiskInputDetails deserializedA2AProtectionIntentDiskInputDetails - = new A2AProtectionIntentDiskInputDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskUri".equals(fieldName)) { - deserializedA2AProtectionIntentDiskInputDetails.diskUri = reader.getString(); - } else if ("recoveryAzureStorageAccountCustomInput".equals(fieldName)) { - deserializedA2AProtectionIntentDiskInputDetails.recoveryAzureStorageAccountCustomInput - = StorageAccountCustomDetails.fromJson(reader); - } else if ("primaryStagingStorageAccountCustomInput".equals(fieldName)) { - deserializedA2AProtectionIntentDiskInputDetails.primaryStagingStorageAccountCustomInput - = StorageAccountCustomDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AProtectionIntentDiskInputDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectionIntentManagedDiskInputDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectionIntentManagedDiskInputDetails.java deleted file mode 100644 index 16f8c2c4d8d0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AProtectionIntentManagedDiskInputDetails.java +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Azure VM managed disk input details. - */ -@Fluent -public final class A2AProtectionIntentManagedDiskInputDetails - implements JsonSerializable { - /* - * The disk Id. - */ - private String diskId; - - /* - * The primary staging storage account input. - */ - private StorageAccountCustomDetails primaryStagingStorageAccountCustomInput; - - /* - * The recovery resource group input. - */ - private RecoveryResourceGroupCustomDetails recoveryResourceGroupCustomInput; - - /* - * The replica disk type. Its an optional value and will be same as source disk type if not user provided. - */ - private String recoveryReplicaDiskAccountType; - - /* - * The target disk type after failover. Its an optional value and will be same as source disk type if not user - * provided. - */ - private String recoveryTargetDiskAccountType; - - /* - * The recovery disk encryption set Id. - */ - private String recoveryDiskEncryptionSetId; - - /* - * The recovery disk encryption information (for one / single pass flows). - */ - private DiskEncryptionInfo diskEncryptionInfo; - - /** - * Creates an instance of A2AProtectionIntentManagedDiskInputDetails class. - */ - public A2AProtectionIntentManagedDiskInputDetails() { - } - - /** - * Get the diskId property: The disk Id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: The disk Id. - * - * @param diskId the diskId value to set. - * @return the A2AProtectionIntentManagedDiskInputDetails object itself. - */ - public A2AProtectionIntentManagedDiskInputDetails withDiskId(String diskId) { - this.diskId = diskId; - return this; - } - - /** - * Get the primaryStagingStorageAccountCustomInput property: The primary staging storage account input. - * - * @return the primaryStagingStorageAccountCustomInput value. - */ - public StorageAccountCustomDetails primaryStagingStorageAccountCustomInput() { - return this.primaryStagingStorageAccountCustomInput; - } - - /** - * Set the primaryStagingStorageAccountCustomInput property: The primary staging storage account input. - * - * @param primaryStagingStorageAccountCustomInput the primaryStagingStorageAccountCustomInput value to set. - * @return the A2AProtectionIntentManagedDiskInputDetails object itself. - */ - public A2AProtectionIntentManagedDiskInputDetails withPrimaryStagingStorageAccountCustomInput( - StorageAccountCustomDetails primaryStagingStorageAccountCustomInput) { - this.primaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput; - return this; - } - - /** - * Get the recoveryResourceGroupCustomInput property: The recovery resource group input. - * - * @return the recoveryResourceGroupCustomInput value. - */ - public RecoveryResourceGroupCustomDetails recoveryResourceGroupCustomInput() { - return this.recoveryResourceGroupCustomInput; - } - - /** - * Set the recoveryResourceGroupCustomInput property: The recovery resource group input. - * - * @param recoveryResourceGroupCustomInput the recoveryResourceGroupCustomInput value to set. - * @return the A2AProtectionIntentManagedDiskInputDetails object itself. - */ - public A2AProtectionIntentManagedDiskInputDetails - withRecoveryResourceGroupCustomInput(RecoveryResourceGroupCustomDetails recoveryResourceGroupCustomInput) { - this.recoveryResourceGroupCustomInput = recoveryResourceGroupCustomInput; - return this; - } - - /** - * Get the recoveryReplicaDiskAccountType property: The replica disk type. Its an optional value and will be same as - * source disk type if not user provided. - * - * @return the recoveryReplicaDiskAccountType value. - */ - public String recoveryReplicaDiskAccountType() { - return this.recoveryReplicaDiskAccountType; - } - - /** - * Set the recoveryReplicaDiskAccountType property: The replica disk type. Its an optional value and will be same as - * source disk type if not user provided. - * - * @param recoveryReplicaDiskAccountType the recoveryReplicaDiskAccountType value to set. - * @return the A2AProtectionIntentManagedDiskInputDetails object itself. - */ - public A2AProtectionIntentManagedDiskInputDetails - withRecoveryReplicaDiskAccountType(String recoveryReplicaDiskAccountType) { - this.recoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType; - return this; - } - - /** - * Get the recoveryTargetDiskAccountType property: The target disk type after failover. Its an optional value and - * will be same as source disk type if not user provided. - * - * @return the recoveryTargetDiskAccountType value. - */ - public String recoveryTargetDiskAccountType() { - return this.recoveryTargetDiskAccountType; - } - - /** - * Set the recoveryTargetDiskAccountType property: The target disk type after failover. Its an optional value and - * will be same as source disk type if not user provided. - * - * @param recoveryTargetDiskAccountType the recoveryTargetDiskAccountType value to set. - * @return the A2AProtectionIntentManagedDiskInputDetails object itself. - */ - public A2AProtectionIntentManagedDiskInputDetails - withRecoveryTargetDiskAccountType(String recoveryTargetDiskAccountType) { - this.recoveryTargetDiskAccountType = recoveryTargetDiskAccountType; - return this; - } - - /** - * Get the recoveryDiskEncryptionSetId property: The recovery disk encryption set Id. - * - * @return the recoveryDiskEncryptionSetId value. - */ - public String recoveryDiskEncryptionSetId() { - return this.recoveryDiskEncryptionSetId; - } - - /** - * Set the recoveryDiskEncryptionSetId property: The recovery disk encryption set Id. - * - * @param recoveryDiskEncryptionSetId the recoveryDiskEncryptionSetId value to set. - * @return the A2AProtectionIntentManagedDiskInputDetails object itself. - */ - public A2AProtectionIntentManagedDiskInputDetails - withRecoveryDiskEncryptionSetId(String recoveryDiskEncryptionSetId) { - this.recoveryDiskEncryptionSetId = recoveryDiskEncryptionSetId; - return this; - } - - /** - * Get the diskEncryptionInfo property: The recovery disk encryption information (for one / single pass flows). - * - * @return the diskEncryptionInfo value. - */ - public DiskEncryptionInfo diskEncryptionInfo() { - return this.diskEncryptionInfo; - } - - /** - * Set the diskEncryptionInfo property: The recovery disk encryption information (for one / single pass flows). - * - * @param diskEncryptionInfo the diskEncryptionInfo value to set. - * @return the A2AProtectionIntentManagedDiskInputDetails object itself. - */ - public A2AProtectionIntentManagedDiskInputDetails withDiskEncryptionInfo(DiskEncryptionInfo diskEncryptionInfo) { - this.diskEncryptionInfo = diskEncryptionInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property diskId in model A2AProtectionIntentManagedDiskInputDetails")); - } - if (primaryStagingStorageAccountCustomInput() != null) { - primaryStagingStorageAccountCustomInput().validate(); - } - if (recoveryResourceGroupCustomInput() != null) { - recoveryResourceGroupCustomInput().validate(); - } - if (diskEncryptionInfo() != null) { - diskEncryptionInfo().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(A2AProtectionIntentManagedDiskInputDetails.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeJsonField("primaryStagingStorageAccountCustomInput", - this.primaryStagingStorageAccountCustomInput); - jsonWriter.writeJsonField("recoveryResourceGroupCustomInput", this.recoveryResourceGroupCustomInput); - jsonWriter.writeStringField("recoveryReplicaDiskAccountType", this.recoveryReplicaDiskAccountType); - jsonWriter.writeStringField("recoveryTargetDiskAccountType", this.recoveryTargetDiskAccountType); - jsonWriter.writeStringField("recoveryDiskEncryptionSetId", this.recoveryDiskEncryptionSetId); - jsonWriter.writeJsonField("diskEncryptionInfo", this.diskEncryptionInfo); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AProtectionIntentManagedDiskInputDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AProtectionIntentManagedDiskInputDetails if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the A2AProtectionIntentManagedDiskInputDetails. - */ - public static A2AProtectionIntentManagedDiskInputDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AProtectionIntentManagedDiskInputDetails deserializedA2AProtectionIntentManagedDiskInputDetails - = new A2AProtectionIntentManagedDiskInputDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedA2AProtectionIntentManagedDiskInputDetails.diskId = reader.getString(); - } else if ("primaryStagingStorageAccountCustomInput".equals(fieldName)) { - deserializedA2AProtectionIntentManagedDiskInputDetails.primaryStagingStorageAccountCustomInput - = StorageAccountCustomDetails.fromJson(reader); - } else if ("recoveryResourceGroupCustomInput".equals(fieldName)) { - deserializedA2AProtectionIntentManagedDiskInputDetails.recoveryResourceGroupCustomInput - = RecoveryResourceGroupCustomDetails.fromJson(reader); - } else if ("recoveryReplicaDiskAccountType".equals(fieldName)) { - deserializedA2AProtectionIntentManagedDiskInputDetails.recoveryReplicaDiskAccountType - = reader.getString(); - } else if ("recoveryTargetDiskAccountType".equals(fieldName)) { - deserializedA2AProtectionIntentManagedDiskInputDetails.recoveryTargetDiskAccountType - = reader.getString(); - } else if ("recoveryDiskEncryptionSetId".equals(fieldName)) { - deserializedA2AProtectionIntentManagedDiskInputDetails.recoveryDiskEncryptionSetId - = reader.getString(); - } else if ("diskEncryptionInfo".equals(fieldName)) { - deserializedA2AProtectionIntentManagedDiskInputDetails.diskEncryptionInfo - = DiskEncryptionInfo.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AProtectionIntentManagedDiskInputDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ARecoveryAvailabilityType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ARecoveryAvailabilityType.java deleted file mode 100644 index acd72a29bcc3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ARecoveryAvailabilityType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The recovery availability type of the virtual machine. - */ -public final class A2ARecoveryAvailabilityType extends ExpandableStringEnum { - /** - * Static value Single for A2ARecoveryAvailabilityType. - */ - public static final A2ARecoveryAvailabilityType SINGLE = fromString("Single"); - - /** - * Static value AvailabilitySet for A2ARecoveryAvailabilityType. - */ - public static final A2ARecoveryAvailabilityType AVAILABILITY_SET = fromString("AvailabilitySet"); - - /** - * Static value AvailabilityZone for A2ARecoveryAvailabilityType. - */ - public static final A2ARecoveryAvailabilityType AVAILABILITY_ZONE = fromString("AvailabilityZone"); - - /** - * Creates a new instance of A2ARecoveryAvailabilityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public A2ARecoveryAvailabilityType() { - } - - /** - * Creates or finds a A2ARecoveryAvailabilityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding A2ARecoveryAvailabilityType. - */ - public static A2ARecoveryAvailabilityType fromString(String name) { - return fromString(name, A2ARecoveryAvailabilityType.class); - } - - /** - * Gets known A2ARecoveryAvailabilityType values. - * - * @return known A2ARecoveryAvailabilityType values. - */ - public static Collection values() { - return values(A2ARecoveryAvailabilityType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ARecoveryPointDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ARecoveryPointDetails.java deleted file mode 100644 index b43bd4845db0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ARecoveryPointDetails.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A2A provider specific recovery point details. - */ -@Fluent -public final class A2ARecoveryPointDetails extends ProviderSpecificRecoveryPointDetails { - /* - * Gets the provider type. - */ - private String instanceType = "A2A"; - - /* - * A value indicating whether the recovery point is multi VM consistent. - */ - private RecoveryPointSyncType recoveryPointSyncType; - - /* - * List of disk ids representing a recovery point. - */ - private List disks; - - /** - * Creates an instance of A2ARecoveryPointDetails class. - */ - public A2ARecoveryPointDetails() { - } - - /** - * Get the instanceType property: Gets the provider type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointSyncType property: A value indicating whether the recovery point is multi VM consistent. - * - * @return the recoveryPointSyncType value. - */ - public RecoveryPointSyncType recoveryPointSyncType() { - return this.recoveryPointSyncType; - } - - /** - * Set the recoveryPointSyncType property: A value indicating whether the recovery point is multi VM consistent. - * - * @param recoveryPointSyncType the recoveryPointSyncType value to set. - * @return the A2ARecoveryPointDetails object itself. - */ - public A2ARecoveryPointDetails withRecoveryPointSyncType(RecoveryPointSyncType recoveryPointSyncType) { - this.recoveryPointSyncType = recoveryPointSyncType; - return this; - } - - /** - * Get the disks property: List of disk ids representing a recovery point. - * - * @return the disks value. - */ - public List disks() { - return this.disks; - } - - /** - * Set the disks property: List of disk ids representing a recovery point. - * - * @param disks the disks value to set. - * @return the A2ARecoveryPointDetails object itself. - */ - public A2ARecoveryPointDetails withDisks(List disks) { - this.disks = disks; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryPointSyncType", - this.recoveryPointSyncType == null ? null : this.recoveryPointSyncType.toString()); - jsonWriter.writeArrayField("disks", this.disks, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2ARecoveryPointDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2ARecoveryPointDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2ARecoveryPointDetails. - */ - public static A2ARecoveryPointDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2ARecoveryPointDetails deserializedA2ARecoveryPointDetails = new A2ARecoveryPointDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2ARecoveryPointDetails.instanceType = reader.getString(); - } else if ("recoveryPointSyncType".equals(fieldName)) { - deserializedA2ARecoveryPointDetails.recoveryPointSyncType - = RecoveryPointSyncType.fromString(reader.getString()); - } else if ("disks".equals(fieldName)) { - List disks = reader.readArray(reader1 -> reader1.getString()); - deserializedA2ARecoveryPointDetails.disks = disks; - } else { - reader.skipChildren(); - } - } - - return deserializedA2ARecoveryPointDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ARemoveDisksInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ARemoveDisksInput.java deleted file mode 100644 index 69cb7d42c33b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ARemoveDisksInput.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A2A remove disk(s) input. - */ -@Fluent -public final class A2ARemoveDisksInput extends RemoveDisksProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /* - * The list of vm disk vhd URIs. - */ - private List vmDisksUris; - - /* - * The list of vm managed disk Ids. - */ - private List vmManagedDisksIds; - - /** - * Creates an instance of A2ARemoveDisksInput class. - */ - public A2ARemoveDisksInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the vmDisksUris property: The list of vm disk vhd URIs. - * - * @return the vmDisksUris value. - */ - public List vmDisksUris() { - return this.vmDisksUris; - } - - /** - * Set the vmDisksUris property: The list of vm disk vhd URIs. - * - * @param vmDisksUris the vmDisksUris value to set. - * @return the A2ARemoveDisksInput object itself. - */ - public A2ARemoveDisksInput withVmDisksUris(List vmDisksUris) { - this.vmDisksUris = vmDisksUris; - return this; - } - - /** - * Get the vmManagedDisksIds property: The list of vm managed disk Ids. - * - * @return the vmManagedDisksIds value. - */ - public List vmManagedDisksIds() { - return this.vmManagedDisksIds; - } - - /** - * Set the vmManagedDisksIds property: The list of vm managed disk Ids. - * - * @param vmManagedDisksIds the vmManagedDisksIds value to set. - * @return the A2ARemoveDisksInput object itself. - */ - public A2ARemoveDisksInput withVmManagedDisksIds(List vmManagedDisksIds) { - this.vmManagedDisksIds = vmManagedDisksIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("vmDisksUris", this.vmDisksUris, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("vmManagedDisksIds", this.vmManagedDisksIds, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2ARemoveDisksInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2ARemoveDisksInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the A2ARemoveDisksInput. - */ - public static A2ARemoveDisksInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2ARemoveDisksInput deserializedA2ARemoveDisksInput = new A2ARemoveDisksInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2ARemoveDisksInput.instanceType = reader.getString(); - } else if ("vmDisksUris".equals(fieldName)) { - List vmDisksUris = reader.readArray(reader1 -> reader1.getString()); - deserializedA2ARemoveDisksInput.vmDisksUris = vmDisksUris; - } else if ("vmManagedDisksIds".equals(fieldName)) { - List vmManagedDisksIds = reader.readArray(reader1 -> reader1.getString()); - deserializedA2ARemoveDisksInput.vmManagedDisksIds = vmManagedDisksIds; - } else { - reader.skipChildren(); - } - } - - return deserializedA2ARemoveDisksInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AReplicationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AReplicationDetails.java deleted file mode 100644 index 7c9e6cf412df..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AReplicationDetails.java +++ /dev/null @@ -1,1581 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * A2A provider specific settings. - */ -@Fluent -public final class A2AReplicationDetails extends ReplicationProviderSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "A2A"; - - /* - * The fabric specific object Id of the virtual machine. - */ - private String fabricObjectId; - - /* - * The initial primary availability zone. - */ - private String initialPrimaryZone; - - /* - * The initial primary fabric location. - */ - private String initialPrimaryFabricLocation; - - /* - * The initial recovery availability zone. - */ - private String initialRecoveryZone; - - /* - * The initial primary extended location. - */ - private ExtendedLocation initialPrimaryExtendedLocation; - - /* - * The initial recovery extended location. - */ - private ExtendedLocation initialRecoveryExtendedLocation; - - /* - * The initial recovery fabric location. - */ - private String initialRecoveryFabricLocation; - - /* - * The multi vm group Id. - */ - private String multiVmGroupId; - - /* - * The multi vm group name. - */ - private String multiVmGroupName; - - /* - * Whether Multi VM group is auto created or specified by user. - */ - private MultiVmGroupCreateOption multiVmGroupCreateOption; - - /* - * The management Id. - */ - private String managementId; - - /* - * The list of protected disks. - */ - private List protectedDisks; - - /* - * The list of unprotected disks. - */ - private List unprotectedDisks; - - /* - * The list of protected managed disks. - */ - private List protectedManagedDisks; - - /* - * The recovery boot diagnostic storage account Arm Id. - */ - private String recoveryBootDiagStorageAccountId; - - /* - * Primary fabric location. - */ - private String primaryFabricLocation; - - /* - * The recovery fabric location. - */ - private String recoveryFabricLocation; - - /* - * The type of operating system. - */ - private String osType; - - /* - * The size of recovery virtual machine. - */ - private String recoveryAzureVMSize; - - /* - * The name of recovery virtual machine. - */ - private String recoveryAzureVMName; - - /* - * The recovery resource group. - */ - private String recoveryAzureResourceGroupId; - - /* - * The recovery cloud service. - */ - private String recoveryCloudService; - - /* - * The recovery availability set. - */ - private String recoveryAvailabilitySet; - - /* - * The recovery virtual network. - */ - private String selectedRecoveryAzureNetworkId; - - /* - * The test failover virtual network. - */ - private String selectedTfoAzureNetworkId; - - /* - * The virtual machine nic details. - */ - private List vmNics; - - /* - * The synced configuration details. - */ - private AzureToAzureVmSyncedConfigDetails vmSyncedConfigDetails; - - /* - * The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. - */ - private Integer monitoringPercentageCompletion; - - /* - * The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. - */ - private String monitoringJobType; - - /* - * The last heartbeat received from the source server. - */ - private OffsetDateTime lastHeartbeat; - - /* - * The agent version. - */ - private String agentVersion; - - /* - * Agent expiry date. - */ - private OffsetDateTime agentExpiryDate; - - /* - * A value indicating whether replication agent update is required. - */ - private Boolean isReplicationAgentUpdateRequired; - - /* - * Agent certificate expiry date. - */ - private OffsetDateTime agentCertificateExpiryDate; - - /* - * A value indicating whether agent certificate update is required. - */ - private Boolean isReplicationAgentCertificateUpdateRequired; - - /* - * The recovery fabric object Id. - */ - private String recoveryFabricObjectId; - - /* - * The protection state for the vm. - */ - private String vmProtectionState; - - /* - * The protection state description for the vm. - */ - 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. - */ - private String lifecycleId; - - /* - * The test failover fabric object Id. - */ - private String testFailoverRecoveryFabricObjectId; - - /* - * The last RPO value in seconds. - */ - private Long rpoInSeconds; - - /* - * The time (in UTC) when the last RPO value was calculated by Protection Service. - */ - private OffsetDateTime lastRpoCalculatedTime; - - /* - * The primary availability zone. - */ - private String primaryAvailabilityZone; - - /* - * The recovery availability zone. - */ - private String recoveryAvailabilityZone; - - /* - * The primary Extended Location. - */ - private ExtendedLocation primaryExtendedLocation; - - /* - * The recovery Extended Location. - */ - private ExtendedLocation recoveryExtendedLocation; - - /* - * The encryption type of the VM. - */ - private VmEncryptionType vmEncryptionType; - - /* - * The test failover vm name. - */ - private String tfoAzureVMName; - - /* - * The recovery azure generation. - */ - private String recoveryAzureGeneration; - - /* - * The recovery proximity placement group Id. - */ - private String recoveryProximityPlacementGroupId; - - /* - * A value indicating whether the auto protection is enabled. - */ - private AutoProtectionOfDataDisk autoProtectionOfDataDisk; - - /* - * The recovery virtual machine scale set id. - */ - private String recoveryVirtualMachineScaleSetId; - - /* - * The recovery capacity reservation group Id. - */ - private String recoveryCapacityReservationGroupId; - - /* - * A value indicating the churn option selected by user. - */ - private ChurnOptionSelected churnOptionSelected; - - /** - * Creates an instance of A2AReplicationDetails class. - */ - public A2AReplicationDetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the fabricObjectId property: The fabric specific object Id of the virtual machine. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Set the fabricObjectId property: 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 initialPrimaryZone property: The initial primary availability zone. - * - * @return the initialPrimaryZone value. - */ - public String initialPrimaryZone() { - return this.initialPrimaryZone; - } - - /** - * Get the initialPrimaryFabricLocation property: The initial primary fabric location. - * - * @return the initialPrimaryFabricLocation value. - */ - public String initialPrimaryFabricLocation() { - return this.initialPrimaryFabricLocation; - } - - /** - * Get the initialRecoveryZone property: The initial recovery availability zone. - * - * @return the initialRecoveryZone value. - */ - public String initialRecoveryZone() { - return this.initialRecoveryZone; - } - - /** - * Get the initialPrimaryExtendedLocation property: The initial primary extended location. - * - * @return the initialPrimaryExtendedLocation value. - */ - public ExtendedLocation initialPrimaryExtendedLocation() { - return this.initialPrimaryExtendedLocation; - } - - /** - * Set the initialPrimaryExtendedLocation property: The initial primary extended location. - * - * @param initialPrimaryExtendedLocation the initialPrimaryExtendedLocation value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withInitialPrimaryExtendedLocation(ExtendedLocation initialPrimaryExtendedLocation) { - this.initialPrimaryExtendedLocation = initialPrimaryExtendedLocation; - return this; - } - - /** - * Get the initialRecoveryExtendedLocation property: The initial recovery extended location. - * - * @return the initialRecoveryExtendedLocation value. - */ - public ExtendedLocation initialRecoveryExtendedLocation() { - return this.initialRecoveryExtendedLocation; - } - - /** - * Set the initialRecoveryExtendedLocation property: The initial recovery extended location. - * - * @param initialRecoveryExtendedLocation the initialRecoveryExtendedLocation value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withInitialRecoveryExtendedLocation(ExtendedLocation initialRecoveryExtendedLocation) { - this.initialRecoveryExtendedLocation = initialRecoveryExtendedLocation; - return this; - } - - /** - * Get the initialRecoveryFabricLocation property: The initial recovery fabric location. - * - * @return the initialRecoveryFabricLocation value. - */ - public String initialRecoveryFabricLocation() { - return this.initialRecoveryFabricLocation; - } - - /** - * Get the multiVmGroupId property: The multi vm group Id. - * - * @return the multiVmGroupId value. - */ - public String multiVmGroupId() { - return this.multiVmGroupId; - } - - /** - * Set the multiVmGroupId property: 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 multiVmGroupName property: The multi vm group name. - * - * @return the multiVmGroupName value. - */ - public String multiVmGroupName() { - return this.multiVmGroupName; - } - - /** - * Set the multiVmGroupName property: 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 multiVmGroupCreateOption property: Whether Multi VM group is auto created or specified by user. - * - * @return the multiVmGroupCreateOption value. - */ - public MultiVmGroupCreateOption multiVmGroupCreateOption() { - return this.multiVmGroupCreateOption; - } - - /** - * Set the multiVmGroupCreateOption property: Whether Multi VM group is auto created or specified by user. - * - * @param multiVmGroupCreateOption the multiVmGroupCreateOption value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withMultiVmGroupCreateOption(MultiVmGroupCreateOption multiVmGroupCreateOption) { - this.multiVmGroupCreateOption = multiVmGroupCreateOption; - return this; - } - - /** - * Get the managementId property: The management Id. - * - * @return the managementId value. - */ - public String managementId() { - return this.managementId; - } - - /** - * Set the managementId property: 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 protectedDisks property: The list of protected disks. - * - * @return the protectedDisks value. - */ - public List protectedDisks() { - return this.protectedDisks; - } - - /** - * Set the protectedDisks property: 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 unprotectedDisks property: The list of unprotected disks. - * - * @return the unprotectedDisks value. - */ - public List unprotectedDisks() { - return this.unprotectedDisks; - } - - /** - * Set the unprotectedDisks property: The list of unprotected disks. - * - * @param unprotectedDisks the unprotectedDisks value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withUnprotectedDisks(List unprotectedDisks) { - this.unprotectedDisks = unprotectedDisks; - return this; - } - - /** - * Get the protectedManagedDisks property: The list of protected managed disks. - * - * @return the protectedManagedDisks value. - */ - public List protectedManagedDisks() { - return this.protectedManagedDisks; - } - - /** - * Set the protectedManagedDisks property: 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 the recoveryBootDiagStorageAccountId property: The recovery boot diagnostic storage account Arm Id. - * - * @return the recoveryBootDiagStorageAccountId value. - */ - public String recoveryBootDiagStorageAccountId() { - return this.recoveryBootDiagStorageAccountId; - } - - /** - * Set the recoveryBootDiagStorageAccountId property: The recovery boot diagnostic storage account Arm Id. - * - * @param recoveryBootDiagStorageAccountId the recoveryBootDiagStorageAccountId value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withRecoveryBootDiagStorageAccountId(String recoveryBootDiagStorageAccountId) { - this.recoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; - return this; - } - - /** - * Get the primaryFabricLocation property: Primary fabric location. - * - * @return the primaryFabricLocation value. - */ - public String primaryFabricLocation() { - return this.primaryFabricLocation; - } - - /** - * Set the primaryFabricLocation property: 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 recoveryFabricLocation property: The recovery fabric location. - * - * @return the recoveryFabricLocation value. - */ - public String recoveryFabricLocation() { - return this.recoveryFabricLocation; - } - - /** - * Set the recoveryFabricLocation property: 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 osType property: The type of operating system. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: 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 recoveryAzureVMSize property: The size of recovery virtual machine. - * - * @return the recoveryAzureVMSize value. - */ - public String recoveryAzureVMSize() { - return this.recoveryAzureVMSize; - } - - /** - * Set the recoveryAzureVMSize property: 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 recoveryAzureVMName property: The name of recovery virtual machine. - * - * @return the recoveryAzureVMName value. - */ - public String recoveryAzureVMName() { - return this.recoveryAzureVMName; - } - - /** - * Set the recoveryAzureVMName property: 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 recoveryAzureResourceGroupId property: The recovery resource group. - * - * @return the recoveryAzureResourceGroupId value. - */ - public String recoveryAzureResourceGroupId() { - return this.recoveryAzureResourceGroupId; - } - - /** - * Set the recoveryAzureResourceGroupId property: 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 recoveryCloudService property: The recovery cloud service. - * - * @return the recoveryCloudService value. - */ - public String recoveryCloudService() { - return this.recoveryCloudService; - } - - /** - * Set the recoveryCloudService property: 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 recoveryAvailabilitySet property: The recovery availability set. - * - * @return the recoveryAvailabilitySet value. - */ - public String recoveryAvailabilitySet() { - return this.recoveryAvailabilitySet; - } - - /** - * Set the recoveryAvailabilitySet property: 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 selectedRecoveryAzureNetworkId property: The recovery virtual network. - * - * @return the selectedRecoveryAzureNetworkId value. - */ - public String selectedRecoveryAzureNetworkId() { - return this.selectedRecoveryAzureNetworkId; - } - - /** - * Set the selectedRecoveryAzureNetworkId property: 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 selectedTfoAzureNetworkId property: The test failover virtual network. - * - * @return the selectedTfoAzureNetworkId value. - */ - public String selectedTfoAzureNetworkId() { - return this.selectedTfoAzureNetworkId; - } - - /** - * Set the selectedTfoAzureNetworkId property: The test failover virtual network. - * - * @param selectedTfoAzureNetworkId the selectedTfoAzureNetworkId value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withSelectedTfoAzureNetworkId(String selectedTfoAzureNetworkId) { - this.selectedTfoAzureNetworkId = selectedTfoAzureNetworkId; - return this; - } - - /** - * Get the vmNics property: The virtual machine nic details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: 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 vmSyncedConfigDetails property: The synced configuration details. - * - * @return the vmSyncedConfigDetails value. - */ - public AzureToAzureVmSyncedConfigDetails vmSyncedConfigDetails() { - return this.vmSyncedConfigDetails; - } - - /** - * Set the vmSyncedConfigDetails property: 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 monitoringPercentageCompletion property: 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 monitoringPercentageCompletion property: 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 monitoringJobType property: 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 monitoringJobType property: 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 lastHeartbeat property: The last heartbeat received from the source server. - * - * @return the lastHeartbeat value. - */ - public OffsetDateTime lastHeartbeat() { - return this.lastHeartbeat; - } - - /** - * Set the lastHeartbeat property: The last heartbeat received from the source server. - * - * @param lastHeartbeat the lastHeartbeat value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withLastHeartbeat(OffsetDateTime lastHeartbeat) { - this.lastHeartbeat = lastHeartbeat; - return this; - } - - /** - * Get the agentVersion property: The agent version. - * - * @return the agentVersion value. - */ - public String agentVersion() { - return this.agentVersion; - } - - /** - * Set the agentVersion property: 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 the agentExpiryDate property: Agent expiry date. - * - * @return the agentExpiryDate value. - */ - public OffsetDateTime agentExpiryDate() { - return this.agentExpiryDate; - } - - /** - * Set the agentExpiryDate property: Agent expiry date. - * - * @param agentExpiryDate the agentExpiryDate value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withAgentExpiryDate(OffsetDateTime agentExpiryDate) { - this.agentExpiryDate = agentExpiryDate; - return this; - } - - /** - * Get the isReplicationAgentUpdateRequired property: A value indicating whether replication agent update is - * required. - * - * @return the isReplicationAgentUpdateRequired value. - */ - public Boolean isReplicationAgentUpdateRequired() { - return this.isReplicationAgentUpdateRequired; - } - - /** - * Set the isReplicationAgentUpdateRequired property: 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 agentCertificateExpiryDate property: Agent certificate expiry date. - * - * @return the agentCertificateExpiryDate value. - */ - public OffsetDateTime agentCertificateExpiryDate() { - return this.agentCertificateExpiryDate; - } - - /** - * Get the isReplicationAgentCertificateUpdateRequired property: A value indicating whether agent certificate update - * is required. - * - * @return the isReplicationAgentCertificateUpdateRequired value. - */ - public Boolean isReplicationAgentCertificateUpdateRequired() { - return this.isReplicationAgentCertificateUpdateRequired; - } - - /** - * Set the isReplicationAgentCertificateUpdateRequired property: A value indicating whether agent certificate update - * is required. - * - * @param isReplicationAgentCertificateUpdateRequired the isReplicationAgentCertificateUpdateRequired value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails - withIsReplicationAgentCertificateUpdateRequired(Boolean isReplicationAgentCertificateUpdateRequired) { - this.isReplicationAgentCertificateUpdateRequired = isReplicationAgentCertificateUpdateRequired; - return this; - } - - /** - * Get the recoveryFabricObjectId property: The recovery fabric object Id. - * - * @return the recoveryFabricObjectId value. - */ - public String recoveryFabricObjectId() { - return this.recoveryFabricObjectId; - } - - /** - * Set the recoveryFabricObjectId property: 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 vmProtectionState property: The protection state for the vm. - * - * @return the vmProtectionState value. - */ - public String vmProtectionState() { - return this.vmProtectionState; - } - - /** - * Set the vmProtectionState property: 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 vmProtectionStateDescription property: The protection state description for the vm. - * - * @return the vmProtectionStateDescription value. - */ - public String vmProtectionStateDescription() { - return this.vmProtectionStateDescription; - } - - /** - * Set the vmProtectionStateDescription property: 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 the lifecycleId property: 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 the lifecycleId property: 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 testFailoverRecoveryFabricObjectId property: The test failover fabric object Id. - * - * @return the testFailoverRecoveryFabricObjectId value. - */ - public String testFailoverRecoveryFabricObjectId() { - return this.testFailoverRecoveryFabricObjectId; - } - - /** - * Set the testFailoverRecoveryFabricObjectId property: 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 rpoInSeconds property: The last RPO value in seconds. - * - * @return the rpoInSeconds value. - */ - public Long rpoInSeconds() { - return this.rpoInSeconds; - } - - /** - * Set the rpoInSeconds property: 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 lastRpoCalculatedTime property: The time (in UTC) when the last RPO value was calculated by Protection - * Service. - * - * @return the lastRpoCalculatedTime value. - */ - public OffsetDateTime lastRpoCalculatedTime() { - return this.lastRpoCalculatedTime; - } - - /** - * Set the lastRpoCalculatedTime property: 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(OffsetDateTime lastRpoCalculatedTime) { - this.lastRpoCalculatedTime = lastRpoCalculatedTime; - return this; - } - - /** - * Get the primaryAvailabilityZone property: The primary availability zone. - * - * @return the primaryAvailabilityZone value. - */ - public String primaryAvailabilityZone() { - return this.primaryAvailabilityZone; - } - - /** - * Set the primaryAvailabilityZone property: The primary availability zone. - * - * @param primaryAvailabilityZone the primaryAvailabilityZone value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withPrimaryAvailabilityZone(String primaryAvailabilityZone) { - this.primaryAvailabilityZone = primaryAvailabilityZone; - return this; - } - - /** - * Get the recoveryAvailabilityZone property: The recovery availability zone. - * - * @return the recoveryAvailabilityZone value. - */ - public String recoveryAvailabilityZone() { - return this.recoveryAvailabilityZone; - } - - /** - * Set the recoveryAvailabilityZone property: The recovery availability zone. - * - * @param recoveryAvailabilityZone the recoveryAvailabilityZone value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withRecoveryAvailabilityZone(String recoveryAvailabilityZone) { - this.recoveryAvailabilityZone = recoveryAvailabilityZone; - return this; - } - - /** - * Get the primaryExtendedLocation property: The primary Extended Location. - * - * @return the primaryExtendedLocation value. - */ - public ExtendedLocation primaryExtendedLocation() { - return this.primaryExtendedLocation; - } - - /** - * Set the primaryExtendedLocation property: The primary Extended Location. - * - * @param primaryExtendedLocation the primaryExtendedLocation value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withPrimaryExtendedLocation(ExtendedLocation primaryExtendedLocation) { - this.primaryExtendedLocation = primaryExtendedLocation; - return this; - } - - /** - * Get the recoveryExtendedLocation property: The recovery Extended Location. - * - * @return the recoveryExtendedLocation value. - */ - public ExtendedLocation recoveryExtendedLocation() { - return this.recoveryExtendedLocation; - } - - /** - * Set the recoveryExtendedLocation property: The recovery Extended Location. - * - * @param recoveryExtendedLocation the recoveryExtendedLocation value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withRecoveryExtendedLocation(ExtendedLocation recoveryExtendedLocation) { - this.recoveryExtendedLocation = recoveryExtendedLocation; - return this; - } - - /** - * Get the vmEncryptionType property: The encryption type of the VM. - * - * @return the vmEncryptionType value. - */ - public VmEncryptionType vmEncryptionType() { - return this.vmEncryptionType; - } - - /** - * Get the tfoAzureVMName property: The test failover vm name. - * - * @return the tfoAzureVMName value. - */ - public String tfoAzureVMName() { - return this.tfoAzureVMName; - } - - /** - * Set the tfoAzureVMName property: The test failover vm name. - * - * @param tfoAzureVMName the tfoAzureVMName value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withTfoAzureVMName(String tfoAzureVMName) { - this.tfoAzureVMName = tfoAzureVMName; - return this; - } - - /** - * Get the recoveryAzureGeneration property: The recovery azure generation. - * - * @return the recoveryAzureGeneration value. - */ - public String recoveryAzureGeneration() { - return this.recoveryAzureGeneration; - } - - /** - * Get the recoveryProximityPlacementGroupId property: The recovery proximity placement group Id. - * - * @return the recoveryProximityPlacementGroupId value. - */ - public String recoveryProximityPlacementGroupId() { - return this.recoveryProximityPlacementGroupId; - } - - /** - * Set the recoveryProximityPlacementGroupId property: The recovery proximity placement group Id. - * - * @param recoveryProximityPlacementGroupId the recoveryProximityPlacementGroupId value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withRecoveryProximityPlacementGroupId(String recoveryProximityPlacementGroupId) { - this.recoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; - return this; - } - - /** - * Get the autoProtectionOfDataDisk property: A value indicating whether the auto protection is enabled. - * - * @return the autoProtectionOfDataDisk value. - */ - public AutoProtectionOfDataDisk autoProtectionOfDataDisk() { - return this.autoProtectionOfDataDisk; - } - - /** - * Set the autoProtectionOfDataDisk property: A value indicating whether the auto protection is enabled. - * - * @param autoProtectionOfDataDisk the autoProtectionOfDataDisk value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withAutoProtectionOfDataDisk(AutoProtectionOfDataDisk autoProtectionOfDataDisk) { - this.autoProtectionOfDataDisk = autoProtectionOfDataDisk; - return this; - } - - /** - * Get the recoveryVirtualMachineScaleSetId property: The recovery virtual machine scale set id. - * - * @return the recoveryVirtualMachineScaleSetId value. - */ - public String recoveryVirtualMachineScaleSetId() { - return this.recoveryVirtualMachineScaleSetId; - } - - /** - * Set the recoveryVirtualMachineScaleSetId property: The recovery virtual machine scale set id. - * - * @param recoveryVirtualMachineScaleSetId the recoveryVirtualMachineScaleSetId value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withRecoveryVirtualMachineScaleSetId(String recoveryVirtualMachineScaleSetId) { - this.recoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId; - return this; - } - - /** - * Get the recoveryCapacityReservationGroupId property: The recovery capacity reservation group Id. - * - * @return the recoveryCapacityReservationGroupId value. - */ - public String recoveryCapacityReservationGroupId() { - return this.recoveryCapacityReservationGroupId; - } - - /** - * Set the recoveryCapacityReservationGroupId property: The recovery capacity reservation group Id. - * - * @param recoveryCapacityReservationGroupId the recoveryCapacityReservationGroupId value to set. - * @return the A2AReplicationDetails object itself. - */ - public A2AReplicationDetails withRecoveryCapacityReservationGroupId(String recoveryCapacityReservationGroupId) { - this.recoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId; - return this; - } - - /** - * Get the churnOptionSelected property: A value indicating the churn option selected by user. - * - * @return the churnOptionSelected value. - */ - public ChurnOptionSelected churnOptionSelected() { - return this.churnOptionSelected; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (initialPrimaryExtendedLocation() != null) { - initialPrimaryExtendedLocation().validate(); - } - if (initialRecoveryExtendedLocation() != null) { - initialRecoveryExtendedLocation().validate(); - } - if (protectedDisks() != null) { - protectedDisks().forEach(e -> e.validate()); - } - if (unprotectedDisks() != null) { - unprotectedDisks().forEach(e -> e.validate()); - } - if (protectedManagedDisks() != null) { - protectedManagedDisks().forEach(e -> e.validate()); - } - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - if (vmSyncedConfigDetails() != null) { - vmSyncedConfigDetails().validate(); - } - if (primaryExtendedLocation() != null) { - primaryExtendedLocation().validate(); - } - if (recoveryExtendedLocation() != null) { - recoveryExtendedLocation().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("fabricObjectId", this.fabricObjectId); - jsonWriter.writeJsonField("initialPrimaryExtendedLocation", this.initialPrimaryExtendedLocation); - jsonWriter.writeJsonField("initialRecoveryExtendedLocation", this.initialRecoveryExtendedLocation); - jsonWriter.writeStringField("multiVmGroupId", this.multiVmGroupId); - jsonWriter.writeStringField("multiVmGroupName", this.multiVmGroupName); - jsonWriter.writeStringField("multiVmGroupCreateOption", - this.multiVmGroupCreateOption == null ? null : this.multiVmGroupCreateOption.toString()); - jsonWriter.writeStringField("managementId", this.managementId); - jsonWriter.writeArrayField("protectedDisks", this.protectedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("unprotectedDisks", this.unprotectedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("protectedManagedDisks", this.protectedManagedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("recoveryBootDiagStorageAccountId", this.recoveryBootDiagStorageAccountId); - jsonWriter.writeStringField("primaryFabricLocation", this.primaryFabricLocation); - jsonWriter.writeStringField("recoveryFabricLocation", this.recoveryFabricLocation); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeStringField("recoveryAzureVMSize", this.recoveryAzureVMSize); - jsonWriter.writeStringField("recoveryAzureVMName", this.recoveryAzureVMName); - jsonWriter.writeStringField("recoveryAzureResourceGroupId", this.recoveryAzureResourceGroupId); - jsonWriter.writeStringField("recoveryCloudService", this.recoveryCloudService); - jsonWriter.writeStringField("recoveryAvailabilitySet", this.recoveryAvailabilitySet); - jsonWriter.writeStringField("selectedRecoveryAzureNetworkId", this.selectedRecoveryAzureNetworkId); - jsonWriter.writeStringField("selectedTfoAzureNetworkId", this.selectedTfoAzureNetworkId); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("vmSyncedConfigDetails", this.vmSyncedConfigDetails); - jsonWriter.writeNumberField("monitoringPercentageCompletion", this.monitoringPercentageCompletion); - jsonWriter.writeStringField("monitoringJobType", this.monitoringJobType); - jsonWriter.writeStringField("lastHeartbeat", - this.lastHeartbeat == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastHeartbeat)); - jsonWriter.writeStringField("agentVersion", this.agentVersion); - jsonWriter.writeStringField("agentExpiryDate", - this.agentExpiryDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.agentExpiryDate)); - jsonWriter.writeBooleanField("isReplicationAgentUpdateRequired", this.isReplicationAgentUpdateRequired); - jsonWriter.writeBooleanField("isReplicationAgentCertificateUpdateRequired", - this.isReplicationAgentCertificateUpdateRequired); - jsonWriter.writeStringField("recoveryFabricObjectId", this.recoveryFabricObjectId); - jsonWriter.writeStringField("vmProtectionState", this.vmProtectionState); - jsonWriter.writeStringField("vmProtectionStateDescription", this.vmProtectionStateDescription); - jsonWriter.writeStringField("lifecycleId", this.lifecycleId); - jsonWriter.writeStringField("testFailoverRecoveryFabricObjectId", this.testFailoverRecoveryFabricObjectId); - jsonWriter.writeNumberField("rpoInSeconds", this.rpoInSeconds); - jsonWriter.writeStringField("lastRpoCalculatedTime", - this.lastRpoCalculatedTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastRpoCalculatedTime)); - jsonWriter.writeStringField("primaryAvailabilityZone", this.primaryAvailabilityZone); - jsonWriter.writeStringField("recoveryAvailabilityZone", this.recoveryAvailabilityZone); - jsonWriter.writeJsonField("primaryExtendedLocation", this.primaryExtendedLocation); - jsonWriter.writeJsonField("recoveryExtendedLocation", this.recoveryExtendedLocation); - jsonWriter.writeStringField("tfoAzureVMName", this.tfoAzureVMName); - jsonWriter.writeStringField("recoveryProximityPlacementGroupId", this.recoveryProximityPlacementGroupId); - jsonWriter.writeStringField("autoProtectionOfDataDisk", - this.autoProtectionOfDataDisk == null ? null : this.autoProtectionOfDataDisk.toString()); - jsonWriter.writeStringField("recoveryVirtualMachineScaleSetId", this.recoveryVirtualMachineScaleSetId); - jsonWriter.writeStringField("recoveryCapacityReservationGroupId", this.recoveryCapacityReservationGroupId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AReplicationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AReplicationDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AReplicationDetails. - */ - public static A2AReplicationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AReplicationDetails deserializedA2AReplicationDetails = new A2AReplicationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2AReplicationDetails.instanceType = reader.getString(); - } else if ("fabricObjectId".equals(fieldName)) { - deserializedA2AReplicationDetails.fabricObjectId = reader.getString(); - } else if ("initialPrimaryZone".equals(fieldName)) { - deserializedA2AReplicationDetails.initialPrimaryZone = reader.getString(); - } else if ("initialPrimaryFabricLocation".equals(fieldName)) { - deserializedA2AReplicationDetails.initialPrimaryFabricLocation = reader.getString(); - } else if ("initialRecoveryZone".equals(fieldName)) { - deserializedA2AReplicationDetails.initialRecoveryZone = reader.getString(); - } else if ("initialPrimaryExtendedLocation".equals(fieldName)) { - deserializedA2AReplicationDetails.initialPrimaryExtendedLocation - = ExtendedLocation.fromJson(reader); - } else if ("initialRecoveryExtendedLocation".equals(fieldName)) { - deserializedA2AReplicationDetails.initialRecoveryExtendedLocation - = ExtendedLocation.fromJson(reader); - } else if ("initialRecoveryFabricLocation".equals(fieldName)) { - deserializedA2AReplicationDetails.initialRecoveryFabricLocation = reader.getString(); - } else if ("multiVmGroupId".equals(fieldName)) { - deserializedA2AReplicationDetails.multiVmGroupId = reader.getString(); - } else if ("multiVmGroupName".equals(fieldName)) { - deserializedA2AReplicationDetails.multiVmGroupName = reader.getString(); - } else if ("multiVmGroupCreateOption".equals(fieldName)) { - deserializedA2AReplicationDetails.multiVmGroupCreateOption - = MultiVmGroupCreateOption.fromString(reader.getString()); - } else if ("managementId".equals(fieldName)) { - deserializedA2AReplicationDetails.managementId = reader.getString(); - } else if ("protectedDisks".equals(fieldName)) { - List protectedDisks - = reader.readArray(reader1 -> A2AProtectedDiskDetails.fromJson(reader1)); - deserializedA2AReplicationDetails.protectedDisks = protectedDisks; - } else if ("unprotectedDisks".equals(fieldName)) { - List unprotectedDisks - = reader.readArray(reader1 -> A2AUnprotectedDiskDetails.fromJson(reader1)); - deserializedA2AReplicationDetails.unprotectedDisks = unprotectedDisks; - } else if ("protectedManagedDisks".equals(fieldName)) { - List protectedManagedDisks - = reader.readArray(reader1 -> A2AProtectedManagedDiskDetails.fromJson(reader1)); - deserializedA2AReplicationDetails.protectedManagedDisks = protectedManagedDisks; - } else if ("recoveryBootDiagStorageAccountId".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryBootDiagStorageAccountId = reader.getString(); - } else if ("primaryFabricLocation".equals(fieldName)) { - deserializedA2AReplicationDetails.primaryFabricLocation = reader.getString(); - } else if ("recoveryFabricLocation".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryFabricLocation = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedA2AReplicationDetails.osType = reader.getString(); - } else if ("recoveryAzureVMSize".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryAzureVMSize = reader.getString(); - } else if ("recoveryAzureVMName".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryAzureVMName = reader.getString(); - } else if ("recoveryAzureResourceGroupId".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryAzureResourceGroupId = reader.getString(); - } else if ("recoveryCloudService".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryCloudService = reader.getString(); - } else if ("recoveryAvailabilitySet".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryAvailabilitySet = reader.getString(); - } else if ("selectedRecoveryAzureNetworkId".equals(fieldName)) { - deserializedA2AReplicationDetails.selectedRecoveryAzureNetworkId = reader.getString(); - } else if ("selectedTfoAzureNetworkId".equals(fieldName)) { - deserializedA2AReplicationDetails.selectedTfoAzureNetworkId = reader.getString(); - } else if ("vmNics".equals(fieldName)) { - List vmNics = reader.readArray(reader1 -> VMNicDetails.fromJson(reader1)); - deserializedA2AReplicationDetails.vmNics = vmNics; - } else if ("vmSyncedConfigDetails".equals(fieldName)) { - deserializedA2AReplicationDetails.vmSyncedConfigDetails - = AzureToAzureVmSyncedConfigDetails.fromJson(reader); - } else if ("monitoringPercentageCompletion".equals(fieldName)) { - deserializedA2AReplicationDetails.monitoringPercentageCompletion - = reader.getNullable(JsonReader::getInt); - } else if ("monitoringJobType".equals(fieldName)) { - deserializedA2AReplicationDetails.monitoringJobType = reader.getString(); - } else if ("lastHeartbeat".equals(fieldName)) { - deserializedA2AReplicationDetails.lastHeartbeat = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("agentVersion".equals(fieldName)) { - deserializedA2AReplicationDetails.agentVersion = reader.getString(); - } else if ("agentExpiryDate".equals(fieldName)) { - deserializedA2AReplicationDetails.agentExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("isReplicationAgentUpdateRequired".equals(fieldName)) { - deserializedA2AReplicationDetails.isReplicationAgentUpdateRequired - = reader.getNullable(JsonReader::getBoolean); - } else if ("agentCertificateExpiryDate".equals(fieldName)) { - deserializedA2AReplicationDetails.agentCertificateExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("isReplicationAgentCertificateUpdateRequired".equals(fieldName)) { - deserializedA2AReplicationDetails.isReplicationAgentCertificateUpdateRequired - = reader.getNullable(JsonReader::getBoolean); - } else if ("recoveryFabricObjectId".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryFabricObjectId = reader.getString(); - } else if ("vmProtectionState".equals(fieldName)) { - deserializedA2AReplicationDetails.vmProtectionState = reader.getString(); - } else if ("vmProtectionStateDescription".equals(fieldName)) { - deserializedA2AReplicationDetails.vmProtectionStateDescription = reader.getString(); - } else if ("lifecycleId".equals(fieldName)) { - deserializedA2AReplicationDetails.lifecycleId = reader.getString(); - } else if ("testFailoverRecoveryFabricObjectId".equals(fieldName)) { - deserializedA2AReplicationDetails.testFailoverRecoveryFabricObjectId = reader.getString(); - } else if ("rpoInSeconds".equals(fieldName)) { - deserializedA2AReplicationDetails.rpoInSeconds = reader.getNullable(JsonReader::getLong); - } else if ("lastRpoCalculatedTime".equals(fieldName)) { - deserializedA2AReplicationDetails.lastRpoCalculatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("primaryAvailabilityZone".equals(fieldName)) { - deserializedA2AReplicationDetails.primaryAvailabilityZone = reader.getString(); - } else if ("recoveryAvailabilityZone".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryAvailabilityZone = reader.getString(); - } else if ("primaryExtendedLocation".equals(fieldName)) { - deserializedA2AReplicationDetails.primaryExtendedLocation = ExtendedLocation.fromJson(reader); - } else if ("recoveryExtendedLocation".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryExtendedLocation = ExtendedLocation.fromJson(reader); - } else if ("vmEncryptionType".equals(fieldName)) { - deserializedA2AReplicationDetails.vmEncryptionType - = VmEncryptionType.fromString(reader.getString()); - } else if ("tfoAzureVMName".equals(fieldName)) { - deserializedA2AReplicationDetails.tfoAzureVMName = reader.getString(); - } else if ("recoveryAzureGeneration".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryAzureGeneration = reader.getString(); - } else if ("recoveryProximityPlacementGroupId".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryProximityPlacementGroupId = reader.getString(); - } else if ("autoProtectionOfDataDisk".equals(fieldName)) { - deserializedA2AReplicationDetails.autoProtectionOfDataDisk - = AutoProtectionOfDataDisk.fromString(reader.getString()); - } else if ("recoveryVirtualMachineScaleSetId".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryVirtualMachineScaleSetId = reader.getString(); - } else if ("recoveryCapacityReservationGroupId".equals(fieldName)) { - deserializedA2AReplicationDetails.recoveryCapacityReservationGroupId = reader.getString(); - } else if ("churnOptionSelected".equals(fieldName)) { - deserializedA2AReplicationDetails.churnOptionSelected - = ChurnOptionSelected.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AReplicationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AReplicationIntentDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AReplicationIntentDetails.java deleted file mode 100644 index 7f08fb76953f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AReplicationIntentDetails.java +++ /dev/null @@ -1,764 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A2A provider specific settings. - */ -@Fluent -public final class A2AReplicationIntentDetails extends ReplicationProtectionIntentProviderSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "A2A"; - - /* - * The fabric specific object Id of the virtual machine. - */ - private String fabricObjectId; - - /* - * The primary location for the virtual machine. - */ - private String primaryLocation; - - /* - * The recovery location for the virtual machine. - */ - private String recoveryLocation; - - /* - * The recovery subscription Id of the virtual machine. - */ - private String recoverySubscriptionId; - - /* - * The list of vm disk details. - */ - private List vmDisks; - - /* - * The list of vm managed disk details. - */ - private List vmManagedDisks; - - /* - * The recovery resource group id. - */ - private String recoveryResourceGroupId; - - /* - * The protection profile custom details. - */ - private ProtectionProfileCustomDetails protectionProfile; - - /* - * The primary staging storage account details. - */ - private StorageAccountCustomDetails primaryStagingStorageAccount; - - /* - * The recovery availability set details. - */ - private RecoveryAvailabilitySetCustomDetails recoveryAvailabilitySet; - - /* - * The recovery virtual network details. - */ - private RecoveryVirtualNetworkCustomDetails recoveryVirtualNetwork; - - /* - * The recovery proximity placement group custom details. - */ - private RecoveryProximityPlacementGroupCustomDetails recoveryProximityPlacementGroup; - - /* - * A value indicating whether the auto protection is enabled. - */ - private AutoProtectionOfDataDisk autoProtectionOfDataDisk; - - /* - * The multi vm group name. - */ - private String multiVmGroupName; - - /* - * The multi vm group id. - */ - private String multiVmGroupId; - - /* - * The boot diagnostic storage account. - */ - private StorageAccountCustomDetails recoveryBootDiagStorageAccount; - - /* - * The recovery disk encryption information (for two pass flows). - */ - private DiskEncryptionInfo diskEncryptionInfo; - - /* - * The recovery availability zone. - */ - private String recoveryAvailabilityZone; - - /* - * The recovery availability type of the virtual machine. - */ - private String recoveryAvailabilityType; - - /* - * A value indicating whether the auto update is enabled. - */ - private AgentAutoUpdateStatus agentAutoUpdateStatus; - - /* - * The automation account arm id. - */ - private String automationAccountArmId; - - /* - * A value indicating the type authentication to use for automation Account. - */ - private AutomationAccountAuthenticationType automationAccountAuthenticationType; - - /** - * Creates an instance of A2AReplicationIntentDetails class. - */ - public A2AReplicationIntentDetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the fabricObjectId property: The fabric specific object Id of the virtual machine. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Set the fabricObjectId property: The fabric specific object Id of the virtual machine. - * - * @param fabricObjectId the fabricObjectId value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withFabricObjectId(String fabricObjectId) { - this.fabricObjectId = fabricObjectId; - return this; - } - - /** - * Get the primaryLocation property: The primary location for the virtual machine. - * - * @return the primaryLocation value. - */ - public String primaryLocation() { - return this.primaryLocation; - } - - /** - * Set the primaryLocation property: The primary location for the virtual machine. - * - * @param primaryLocation the primaryLocation value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withPrimaryLocation(String primaryLocation) { - this.primaryLocation = primaryLocation; - return this; - } - - /** - * Get the recoveryLocation property: The recovery location for the virtual machine. - * - * @return the recoveryLocation value. - */ - public String recoveryLocation() { - return this.recoveryLocation; - } - - /** - * Set the recoveryLocation property: The recovery location for the virtual machine. - * - * @param recoveryLocation the recoveryLocation value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withRecoveryLocation(String recoveryLocation) { - this.recoveryLocation = recoveryLocation; - return this; - } - - /** - * Get the recoverySubscriptionId property: The recovery subscription Id of the virtual machine. - * - * @return the recoverySubscriptionId value. - */ - public String recoverySubscriptionId() { - return this.recoverySubscriptionId; - } - - /** - * Set the recoverySubscriptionId property: The recovery subscription Id of the virtual machine. - * - * @param recoverySubscriptionId the recoverySubscriptionId value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withRecoverySubscriptionId(String recoverySubscriptionId) { - this.recoverySubscriptionId = recoverySubscriptionId; - return this; - } - - /** - * Get the vmDisks property: The list of vm disk details. - * - * @return the vmDisks value. - */ - public List vmDisks() { - return this.vmDisks; - } - - /** - * Set the vmDisks property: The list of vm disk details. - * - * @param vmDisks the vmDisks value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withVmDisks(List vmDisks) { - this.vmDisks = vmDisks; - return this; - } - - /** - * Get the vmManagedDisks property: The list of vm managed disk details. - * - * @return the vmManagedDisks value. - */ - public List vmManagedDisks() { - return this.vmManagedDisks; - } - - /** - * Set the vmManagedDisks property: The list of vm managed disk details. - * - * @param vmManagedDisks the vmManagedDisks value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails - withVmManagedDisks(List vmManagedDisks) { - this.vmManagedDisks = vmManagedDisks; - return this; - } - - /** - * Get the recoveryResourceGroupId property: The recovery resource group id. - * - * @return the recoveryResourceGroupId value. - */ - public String recoveryResourceGroupId() { - return this.recoveryResourceGroupId; - } - - /** - * Set the recoveryResourceGroupId property: The recovery resource group id. - * - * @param recoveryResourceGroupId the recoveryResourceGroupId value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withRecoveryResourceGroupId(String recoveryResourceGroupId) { - this.recoveryResourceGroupId = recoveryResourceGroupId; - return this; - } - - /** - * Get the protectionProfile property: The protection profile custom details. - * - * @return the protectionProfile value. - */ - public ProtectionProfileCustomDetails protectionProfile() { - return this.protectionProfile; - } - - /** - * Set the protectionProfile property: The protection profile custom details. - * - * @param protectionProfile the protectionProfile value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withProtectionProfile(ProtectionProfileCustomDetails protectionProfile) { - this.protectionProfile = protectionProfile; - return this; - } - - /** - * Get the primaryStagingStorageAccount property: The primary staging storage account details. - * - * @return the primaryStagingStorageAccount value. - */ - public StorageAccountCustomDetails primaryStagingStorageAccount() { - return this.primaryStagingStorageAccount; - } - - /** - * Set the primaryStagingStorageAccount property: The primary staging storage account details. - * - * @param primaryStagingStorageAccount the primaryStagingStorageAccount value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails - withPrimaryStagingStorageAccount(StorageAccountCustomDetails primaryStagingStorageAccount) { - this.primaryStagingStorageAccount = primaryStagingStorageAccount; - return this; - } - - /** - * Get the recoveryAvailabilitySet property: The recovery availability set details. - * - * @return the recoveryAvailabilitySet value. - */ - public RecoveryAvailabilitySetCustomDetails recoveryAvailabilitySet() { - return this.recoveryAvailabilitySet; - } - - /** - * Set the recoveryAvailabilitySet property: The recovery availability set details. - * - * @param recoveryAvailabilitySet the recoveryAvailabilitySet value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails - withRecoveryAvailabilitySet(RecoveryAvailabilitySetCustomDetails recoveryAvailabilitySet) { - this.recoveryAvailabilitySet = recoveryAvailabilitySet; - return this; - } - - /** - * Get the recoveryVirtualNetwork property: The recovery virtual network details. - * - * @return the recoveryVirtualNetwork value. - */ - public RecoveryVirtualNetworkCustomDetails recoveryVirtualNetwork() { - return this.recoveryVirtualNetwork; - } - - /** - * Set the recoveryVirtualNetwork property: The recovery virtual network details. - * - * @param recoveryVirtualNetwork the recoveryVirtualNetwork value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails - withRecoveryVirtualNetwork(RecoveryVirtualNetworkCustomDetails recoveryVirtualNetwork) { - this.recoveryVirtualNetwork = recoveryVirtualNetwork; - return this; - } - - /** - * Get the recoveryProximityPlacementGroup property: The recovery proximity placement group custom details. - * - * @return the recoveryProximityPlacementGroup value. - */ - public RecoveryProximityPlacementGroupCustomDetails recoveryProximityPlacementGroup() { - return this.recoveryProximityPlacementGroup; - } - - /** - * Set the recoveryProximityPlacementGroup property: The recovery proximity placement group custom details. - * - * @param recoveryProximityPlacementGroup the recoveryProximityPlacementGroup value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withRecoveryProximityPlacementGroup( - RecoveryProximityPlacementGroupCustomDetails recoveryProximityPlacementGroup) { - this.recoveryProximityPlacementGroup = recoveryProximityPlacementGroup; - return this; - } - - /** - * Get the autoProtectionOfDataDisk property: A value indicating whether the auto protection is enabled. - * - * @return the autoProtectionOfDataDisk value. - */ - public AutoProtectionOfDataDisk autoProtectionOfDataDisk() { - return this.autoProtectionOfDataDisk; - } - - /** - * Set the autoProtectionOfDataDisk property: A value indicating whether the auto protection is enabled. - * - * @param autoProtectionOfDataDisk the autoProtectionOfDataDisk value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withAutoProtectionOfDataDisk(AutoProtectionOfDataDisk autoProtectionOfDataDisk) { - this.autoProtectionOfDataDisk = autoProtectionOfDataDisk; - return this; - } - - /** - * Get the multiVmGroupName property: The multi vm group name. - * - * @return the multiVmGroupName value. - */ - public String multiVmGroupName() { - return this.multiVmGroupName; - } - - /** - * Set the multiVmGroupName property: The multi vm group name. - * - * @param multiVmGroupName the multiVmGroupName value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withMultiVmGroupName(String multiVmGroupName) { - this.multiVmGroupName = multiVmGroupName; - return this; - } - - /** - * Get the multiVmGroupId property: The multi vm group id. - * - * @return the multiVmGroupId value. - */ - public String multiVmGroupId() { - return this.multiVmGroupId; - } - - /** - * Set the multiVmGroupId property: The multi vm group id. - * - * @param multiVmGroupId the multiVmGroupId value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withMultiVmGroupId(String multiVmGroupId) { - this.multiVmGroupId = multiVmGroupId; - return this; - } - - /** - * Get the recoveryBootDiagStorageAccount property: The boot diagnostic storage account. - * - * @return the recoveryBootDiagStorageAccount value. - */ - public StorageAccountCustomDetails recoveryBootDiagStorageAccount() { - return this.recoveryBootDiagStorageAccount; - } - - /** - * Set the recoveryBootDiagStorageAccount property: The boot diagnostic storage account. - * - * @param recoveryBootDiagStorageAccount the recoveryBootDiagStorageAccount value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails - withRecoveryBootDiagStorageAccount(StorageAccountCustomDetails recoveryBootDiagStorageAccount) { - this.recoveryBootDiagStorageAccount = recoveryBootDiagStorageAccount; - return this; - } - - /** - * Get the diskEncryptionInfo property: The recovery disk encryption information (for two pass flows). - * - * @return the diskEncryptionInfo value. - */ - public DiskEncryptionInfo diskEncryptionInfo() { - return this.diskEncryptionInfo; - } - - /** - * Set the diskEncryptionInfo property: The recovery disk encryption information (for two pass flows). - * - * @param diskEncryptionInfo the diskEncryptionInfo value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withDiskEncryptionInfo(DiskEncryptionInfo diskEncryptionInfo) { - this.diskEncryptionInfo = diskEncryptionInfo; - return this; - } - - /** - * Get the recoveryAvailabilityZone property: The recovery availability zone. - * - * @return the recoveryAvailabilityZone value. - */ - public String recoveryAvailabilityZone() { - return this.recoveryAvailabilityZone; - } - - /** - * Set the recoveryAvailabilityZone property: The recovery availability zone. - * - * @param recoveryAvailabilityZone the recoveryAvailabilityZone value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withRecoveryAvailabilityZone(String recoveryAvailabilityZone) { - this.recoveryAvailabilityZone = recoveryAvailabilityZone; - return this; - } - - /** - * Get the recoveryAvailabilityType property: The recovery availability type of the virtual machine. - * - * @return the recoveryAvailabilityType value. - */ - public String recoveryAvailabilityType() { - return this.recoveryAvailabilityType; - } - - /** - * Set the recoveryAvailabilityType property: The recovery availability type of the virtual machine. - * - * @param recoveryAvailabilityType the recoveryAvailabilityType value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withRecoveryAvailabilityType(String recoveryAvailabilityType) { - this.recoveryAvailabilityType = recoveryAvailabilityType; - return this; - } - - /** - * Get the agentAutoUpdateStatus property: A value indicating whether the auto update is enabled. - * - * @return the agentAutoUpdateStatus value. - */ - public AgentAutoUpdateStatus agentAutoUpdateStatus() { - return this.agentAutoUpdateStatus; - } - - /** - * Set the agentAutoUpdateStatus property: A value indicating whether the auto update is enabled. - * - * @param agentAutoUpdateStatus the agentAutoUpdateStatus value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withAgentAutoUpdateStatus(AgentAutoUpdateStatus agentAutoUpdateStatus) { - this.agentAutoUpdateStatus = agentAutoUpdateStatus; - return this; - } - - /** - * Get the automationAccountArmId property: The automation account arm id. - * - * @return the automationAccountArmId value. - */ - public String automationAccountArmId() { - return this.automationAccountArmId; - } - - /** - * Set the automationAccountArmId property: The automation account arm id. - * - * @param automationAccountArmId the automationAccountArmId value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withAutomationAccountArmId(String automationAccountArmId) { - this.automationAccountArmId = automationAccountArmId; - return this; - } - - /** - * Get the automationAccountAuthenticationType property: A value indicating the type authentication to use for - * automation Account. - * - * @return the automationAccountAuthenticationType value. - */ - public AutomationAccountAuthenticationType automationAccountAuthenticationType() { - return this.automationAccountAuthenticationType; - } - - /** - * Set the automationAccountAuthenticationType property: A value indicating the type authentication to use for - * automation Account. - * - * @param automationAccountAuthenticationType the automationAccountAuthenticationType value to set. - * @return the A2AReplicationIntentDetails object itself. - */ - public A2AReplicationIntentDetails withAutomationAccountAuthenticationType( - AutomationAccountAuthenticationType automationAccountAuthenticationType) { - this.automationAccountAuthenticationType = automationAccountAuthenticationType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmDisks() != null) { - vmDisks().forEach(e -> e.validate()); - } - if (vmManagedDisks() != null) { - vmManagedDisks().forEach(e -> e.validate()); - } - if (protectionProfile() != null) { - protectionProfile().validate(); - } - if (primaryStagingStorageAccount() != null) { - primaryStagingStorageAccount().validate(); - } - if (recoveryAvailabilitySet() != null) { - recoveryAvailabilitySet().validate(); - } - if (recoveryVirtualNetwork() != null) { - recoveryVirtualNetwork().validate(); - } - if (recoveryProximityPlacementGroup() != null) { - recoveryProximityPlacementGroup().validate(); - } - if (recoveryBootDiagStorageAccount() != null) { - recoveryBootDiagStorageAccount().validate(); - } - if (diskEncryptionInfo() != null) { - diskEncryptionInfo().validate(); - } - if (recoveryAvailabilityType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryAvailabilityType in model A2AReplicationIntentDetails")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(A2AReplicationIntentDetails.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryAvailabilityType", this.recoveryAvailabilityType); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("fabricObjectId", this.fabricObjectId); - jsonWriter.writeStringField("primaryLocation", this.primaryLocation); - jsonWriter.writeStringField("recoveryLocation", this.recoveryLocation); - jsonWriter.writeStringField("recoverySubscriptionId", this.recoverySubscriptionId); - jsonWriter.writeArrayField("vmDisks", this.vmDisks, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("vmManagedDisks", this.vmManagedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("recoveryResourceGroupId", this.recoveryResourceGroupId); - jsonWriter.writeJsonField("protectionProfile", this.protectionProfile); - jsonWriter.writeJsonField("primaryStagingStorageAccount", this.primaryStagingStorageAccount); - jsonWriter.writeJsonField("recoveryAvailabilitySet", this.recoveryAvailabilitySet); - jsonWriter.writeJsonField("recoveryVirtualNetwork", this.recoveryVirtualNetwork); - jsonWriter.writeJsonField("recoveryProximityPlacementGroup", this.recoveryProximityPlacementGroup); - jsonWriter.writeStringField("autoProtectionOfDataDisk", - this.autoProtectionOfDataDisk == null ? null : this.autoProtectionOfDataDisk.toString()); - jsonWriter.writeStringField("multiVmGroupName", this.multiVmGroupName); - jsonWriter.writeStringField("multiVmGroupId", this.multiVmGroupId); - jsonWriter.writeJsonField("recoveryBootDiagStorageAccount", this.recoveryBootDiagStorageAccount); - jsonWriter.writeJsonField("diskEncryptionInfo", this.diskEncryptionInfo); - jsonWriter.writeStringField("recoveryAvailabilityZone", this.recoveryAvailabilityZone); - jsonWriter.writeStringField("agentAutoUpdateStatus", - this.agentAutoUpdateStatus == null ? null : this.agentAutoUpdateStatus.toString()); - jsonWriter.writeStringField("automationAccountArmId", this.automationAccountArmId); - jsonWriter.writeStringField("automationAccountAuthenticationType", - this.automationAccountAuthenticationType == null - ? null - : this.automationAccountAuthenticationType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AReplicationIntentDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AReplicationIntentDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the A2AReplicationIntentDetails. - */ - public static A2AReplicationIntentDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AReplicationIntentDetails deserializedA2AReplicationIntentDetails = new A2AReplicationIntentDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryAvailabilityType".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.recoveryAvailabilityType = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.instanceType = reader.getString(); - } else if ("fabricObjectId".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.fabricObjectId = reader.getString(); - } else if ("primaryLocation".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.primaryLocation = reader.getString(); - } else if ("recoveryLocation".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.recoveryLocation = reader.getString(); - } else if ("recoverySubscriptionId".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.recoverySubscriptionId = reader.getString(); - } else if ("vmDisks".equals(fieldName)) { - List vmDisks - = reader.readArray(reader1 -> A2AProtectionIntentDiskInputDetails.fromJson(reader1)); - deserializedA2AReplicationIntentDetails.vmDisks = vmDisks; - } else if ("vmManagedDisks".equals(fieldName)) { - List vmManagedDisks - = reader.readArray(reader1 -> A2AProtectionIntentManagedDiskInputDetails.fromJson(reader1)); - deserializedA2AReplicationIntentDetails.vmManagedDisks = vmManagedDisks; - } else if ("recoveryResourceGroupId".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.recoveryResourceGroupId = reader.getString(); - } else if ("protectionProfile".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.protectionProfile - = ProtectionProfileCustomDetails.fromJson(reader); - } else if ("primaryStagingStorageAccount".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.primaryStagingStorageAccount - = StorageAccountCustomDetails.fromJson(reader); - } else if ("recoveryAvailabilitySet".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.recoveryAvailabilitySet - = RecoveryAvailabilitySetCustomDetails.fromJson(reader); - } else if ("recoveryVirtualNetwork".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.recoveryVirtualNetwork - = RecoveryVirtualNetworkCustomDetails.fromJson(reader); - } else if ("recoveryProximityPlacementGroup".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.recoveryProximityPlacementGroup - = RecoveryProximityPlacementGroupCustomDetails.fromJson(reader); - } else if ("autoProtectionOfDataDisk".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.autoProtectionOfDataDisk - = AutoProtectionOfDataDisk.fromString(reader.getString()); - } else if ("multiVmGroupName".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.multiVmGroupName = reader.getString(); - } else if ("multiVmGroupId".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.multiVmGroupId = reader.getString(); - } else if ("recoveryBootDiagStorageAccount".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.recoveryBootDiagStorageAccount - = StorageAccountCustomDetails.fromJson(reader); - } else if ("diskEncryptionInfo".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.diskEncryptionInfo = DiskEncryptionInfo.fromJson(reader); - } else if ("recoveryAvailabilityZone".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.recoveryAvailabilityZone = reader.getString(); - } else if ("agentAutoUpdateStatus".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.agentAutoUpdateStatus - = AgentAutoUpdateStatus.fromString(reader.getString()); - } else if ("automationAccountArmId".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.automationAccountArmId = reader.getString(); - } else if ("automationAccountAuthenticationType".equals(fieldName)) { - deserializedA2AReplicationIntentDetails.automationAccountAuthenticationType - = AutomationAccountAuthenticationType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AReplicationIntentDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AReprotectInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AReprotectInput.java deleted file mode 100644 index b3486367438d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AReprotectInput.java +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Azure specific reprotect input. - */ -@Fluent -public final class A2AReprotectInput extends ReverseReplicationProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /* - * The recovery container Id. - */ - private String recoveryContainerId; - - /* - * The list of vm disk details. - */ - private List vmDisks; - - /* - * The recovery resource group Id. Valid for V2 scenarios. - */ - private String recoveryResourceGroupId; - - /* - * The recovery cloud service Id. Valid for V1 scenarios. - */ - private String recoveryCloudServiceId; - - /* - * The recovery availability set. - */ - private String recoveryAvailabilitySetId; - - /* - * The Policy Id. - */ - private String policyId; - - /** - * Creates an instance of A2AReprotectInput class. - */ - public A2AReprotectInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryContainerId property: The recovery container Id. - * - * @return the recoveryContainerId value. - */ - public String recoveryContainerId() { - return this.recoveryContainerId; - } - - /** - * Set the recoveryContainerId property: 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 vmDisks property: The list of vm disk details. - * - * @return the vmDisks value. - */ - public List vmDisks() { - return this.vmDisks; - } - - /** - * Set the vmDisks property: 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 recoveryResourceGroupId property: The recovery resource group Id. Valid for V2 scenarios. - * - * @return the recoveryResourceGroupId value. - */ - public String recoveryResourceGroupId() { - return this.recoveryResourceGroupId; - } - - /** - * Set the recoveryResourceGroupId property: 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 recoveryCloudServiceId property: The recovery cloud service Id. Valid for V1 scenarios. - * - * @return the recoveryCloudServiceId value. - */ - public String recoveryCloudServiceId() { - return this.recoveryCloudServiceId; - } - - /** - * Set the recoveryCloudServiceId property: 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 recoveryAvailabilitySetId property: The recovery availability set. - * - * @return the recoveryAvailabilitySetId value. - */ - public String recoveryAvailabilitySetId() { - return this.recoveryAvailabilitySetId; - } - - /** - * Set the recoveryAvailabilitySetId property: 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 policyId property: The Policy Id. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Set the policyId property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmDisks() != null) { - vmDisks().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryContainerId", this.recoveryContainerId); - jsonWriter.writeArrayField("vmDisks", this.vmDisks, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("recoveryResourceGroupId", this.recoveryResourceGroupId); - jsonWriter.writeStringField("recoveryCloudServiceId", this.recoveryCloudServiceId); - jsonWriter.writeStringField("recoveryAvailabilitySetId", this.recoveryAvailabilitySetId); - jsonWriter.writeStringField("policyId", this.policyId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AReprotectInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AReprotectInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AReprotectInput. - */ - public static A2AReprotectInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AReprotectInput deserializedA2AReprotectInput = new A2AReprotectInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2AReprotectInput.instanceType = reader.getString(); - } else if ("recoveryContainerId".equals(fieldName)) { - deserializedA2AReprotectInput.recoveryContainerId = reader.getString(); - } else if ("vmDisks".equals(fieldName)) { - List vmDisks - = reader.readArray(reader1 -> A2AVmDiskInputDetails.fromJson(reader1)); - deserializedA2AReprotectInput.vmDisks = vmDisks; - } else if ("recoveryResourceGroupId".equals(fieldName)) { - deserializedA2AReprotectInput.recoveryResourceGroupId = reader.getString(); - } else if ("recoveryCloudServiceId".equals(fieldName)) { - deserializedA2AReprotectInput.recoveryCloudServiceId = reader.getString(); - } else if ("recoveryAvailabilitySetId".equals(fieldName)) { - deserializedA2AReprotectInput.recoveryAvailabilitySetId = reader.getString(); - } else if ("policyId".equals(fieldName)) { - deserializedA2AReprotectInput.policyId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AReprotectInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ARpRecoveryPointType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ARpRecoveryPointType.java deleted file mode 100644 index a88bdce6d5a5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ARpRecoveryPointType.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The recovery point type. - */ -public final class A2ARpRecoveryPointType extends ExpandableStringEnum { - /** - * Static value Latest for A2ARpRecoveryPointType. - */ - public static final A2ARpRecoveryPointType LATEST = fromString("Latest"); - - /** - * Static value LatestApplicationConsistent for A2ARpRecoveryPointType. - */ - public static final A2ARpRecoveryPointType LATEST_APPLICATION_CONSISTENT - = fromString("LatestApplicationConsistent"); - - /** - * Static value LatestCrashConsistent for A2ARpRecoveryPointType. - */ - public static final A2ARpRecoveryPointType LATEST_CRASH_CONSISTENT = fromString("LatestCrashConsistent"); - - /** - * Static value LatestProcessed for A2ARpRecoveryPointType. - */ - public static final A2ARpRecoveryPointType LATEST_PROCESSED = fromString("LatestProcessed"); - - /** - * Creates a new instance of A2ARpRecoveryPointType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public A2ARpRecoveryPointType() { - } - - /** - * Creates or finds a A2ARpRecoveryPointType from its string representation. - * - * @param name a name to look for. - * @return the corresponding A2ARpRecoveryPointType. - */ - public static A2ARpRecoveryPointType fromString(String name) { - return fromString(name, A2ARpRecoveryPointType.class); - } - - /** - * Gets known A2ARpRecoveryPointType values. - * - * @return known A2ARpRecoveryPointType values. - */ - public static Collection values() { - return values(A2ARpRecoveryPointType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ASwitchProtectionInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ASwitchProtectionInput.java deleted file mode 100644 index 9576ed140c72..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ASwitchProtectionInput.java +++ /dev/null @@ -1,462 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A2A specific switch protection input. - */ -@Fluent -public final class A2ASwitchProtectionInput extends SwitchProtectionProviderSpecificInput { - /* - * Gets the Instance type. - */ - private String instanceType = "A2A"; - - /* - * The recovery container Id. - */ - private String recoveryContainerId; - - /* - * The list of vm disk details. - */ - private List vmDisks; - - /* - * The list of vm managed disk details. - */ - private List vmManagedDisks; - - /* - * The recovery resource group Id. Valid for V2 scenarios. - */ - private String recoveryResourceGroupId; - - /* - * The recovery cloud service Id. Valid for V1 scenarios. - */ - private String recoveryCloudServiceId; - - /* - * The recovery availability set. - */ - private String recoveryAvailabilitySetId; - - /* - * The Policy Id. - */ - private String policyId; - - /* - * The boot diagnostic storage account. - */ - private String recoveryBootDiagStorageAccountId; - - /* - * The recovery availability zone. - */ - private String recoveryAvailabilityZone; - - /* - * The recovery proximity placement group Id. - */ - private String recoveryProximityPlacementGroupId; - - /* - * The virtual machine scale set id. - */ - private String recoveryVirtualMachineScaleSetId; - - /* - * The recovery capacity reservation group Id. - */ - private String recoveryCapacityReservationGroupId; - - /* - * The recovery disk encryption information. - */ - private DiskEncryptionInfo diskEncryptionInfo; - - /** - * Creates an instance of A2ASwitchProtectionInput class. - */ - public A2ASwitchProtectionInput() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryContainerId property: The recovery container Id. - * - * @return the recoveryContainerId value. - */ - public String recoveryContainerId() { - return this.recoveryContainerId; - } - - /** - * Set the recoveryContainerId property: 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 vmDisks property: The list of vm disk details. - * - * @return the vmDisks value. - */ - public List vmDisks() { - return this.vmDisks; - } - - /** - * Set the vmDisks property: 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 vmManagedDisks property: The list of vm managed disk details. - * - * @return the vmManagedDisks value. - */ - public List vmManagedDisks() { - return this.vmManagedDisks; - } - - /** - * Set the vmManagedDisks property: 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 recoveryResourceGroupId property: The recovery resource group Id. Valid for V2 scenarios. - * - * @return the recoveryResourceGroupId value. - */ - public String recoveryResourceGroupId() { - return this.recoveryResourceGroupId; - } - - /** - * Set the recoveryResourceGroupId property: 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 recoveryCloudServiceId property: The recovery cloud service Id. Valid for V1 scenarios. - * - * @return the recoveryCloudServiceId value. - */ - public String recoveryCloudServiceId() { - return this.recoveryCloudServiceId; - } - - /** - * Set the recoveryCloudServiceId property: 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 recoveryAvailabilitySetId property: The recovery availability set. - * - * @return the recoveryAvailabilitySetId value. - */ - public String recoveryAvailabilitySetId() { - return this.recoveryAvailabilitySetId; - } - - /** - * Set the recoveryAvailabilitySetId property: 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 policyId property: The Policy Id. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Set the policyId property: 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; - } - - /** - * Get the recoveryBootDiagStorageAccountId property: The boot diagnostic storage account. - * - * @return the recoveryBootDiagStorageAccountId value. - */ - public String recoveryBootDiagStorageAccountId() { - return this.recoveryBootDiagStorageAccountId; - } - - /** - * Set the recoveryBootDiagStorageAccountId property: The boot diagnostic storage account. - * - * @param recoveryBootDiagStorageAccountId the recoveryBootDiagStorageAccountId value to set. - * @return the A2ASwitchProtectionInput object itself. - */ - public A2ASwitchProtectionInput withRecoveryBootDiagStorageAccountId(String recoveryBootDiagStorageAccountId) { - this.recoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; - return this; - } - - /** - * Get the recoveryAvailabilityZone property: The recovery availability zone. - * - * @return the recoveryAvailabilityZone value. - */ - public String recoveryAvailabilityZone() { - return this.recoveryAvailabilityZone; - } - - /** - * Set the recoveryAvailabilityZone property: The recovery availability zone. - * - * @param recoveryAvailabilityZone the recoveryAvailabilityZone value to set. - * @return the A2ASwitchProtectionInput object itself. - */ - public A2ASwitchProtectionInput withRecoveryAvailabilityZone(String recoveryAvailabilityZone) { - this.recoveryAvailabilityZone = recoveryAvailabilityZone; - return this; - } - - /** - * Get the recoveryProximityPlacementGroupId property: The recovery proximity placement group Id. - * - * @return the recoveryProximityPlacementGroupId value. - */ - public String recoveryProximityPlacementGroupId() { - return this.recoveryProximityPlacementGroupId; - } - - /** - * Set the recoveryProximityPlacementGroupId property: The recovery proximity placement group Id. - * - * @param recoveryProximityPlacementGroupId the recoveryProximityPlacementGroupId value to set. - * @return the A2ASwitchProtectionInput object itself. - */ - public A2ASwitchProtectionInput withRecoveryProximityPlacementGroupId(String recoveryProximityPlacementGroupId) { - this.recoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; - return this; - } - - /** - * Get the recoveryVirtualMachineScaleSetId property: The virtual machine scale set id. - * - * @return the recoveryVirtualMachineScaleSetId value. - */ - public String recoveryVirtualMachineScaleSetId() { - return this.recoveryVirtualMachineScaleSetId; - } - - /** - * Set the recoveryVirtualMachineScaleSetId property: The virtual machine scale set id. - * - * @param recoveryVirtualMachineScaleSetId the recoveryVirtualMachineScaleSetId value to set. - * @return the A2ASwitchProtectionInput object itself. - */ - public A2ASwitchProtectionInput withRecoveryVirtualMachineScaleSetId(String recoveryVirtualMachineScaleSetId) { - this.recoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId; - return this; - } - - /** - * Get the recoveryCapacityReservationGroupId property: The recovery capacity reservation group Id. - * - * @return the recoveryCapacityReservationGroupId value. - */ - public String recoveryCapacityReservationGroupId() { - return this.recoveryCapacityReservationGroupId; - } - - /** - * Set the recoveryCapacityReservationGroupId property: The recovery capacity reservation group Id. - * - * @param recoveryCapacityReservationGroupId the recoveryCapacityReservationGroupId value to set. - * @return the A2ASwitchProtectionInput object itself. - */ - public A2ASwitchProtectionInput withRecoveryCapacityReservationGroupId(String recoveryCapacityReservationGroupId) { - this.recoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId; - return this; - } - - /** - * Get the diskEncryptionInfo property: The recovery disk encryption information. - * - * @return the diskEncryptionInfo value. - */ - public DiskEncryptionInfo diskEncryptionInfo() { - return this.diskEncryptionInfo; - } - - /** - * Set the diskEncryptionInfo property: The recovery disk encryption information. - * - * @param diskEncryptionInfo the diskEncryptionInfo value to set. - * @return the A2ASwitchProtectionInput object itself. - */ - public A2ASwitchProtectionInput withDiskEncryptionInfo(DiskEncryptionInfo diskEncryptionInfo) { - this.diskEncryptionInfo = diskEncryptionInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmDisks() != null) { - vmDisks().forEach(e -> e.validate()); - } - if (vmManagedDisks() != null) { - vmManagedDisks().forEach(e -> e.validate()); - } - if (diskEncryptionInfo() != null) { - diskEncryptionInfo().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryContainerId", this.recoveryContainerId); - jsonWriter.writeArrayField("vmDisks", this.vmDisks, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("vmManagedDisks", this.vmManagedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("recoveryResourceGroupId", this.recoveryResourceGroupId); - jsonWriter.writeStringField("recoveryCloudServiceId", this.recoveryCloudServiceId); - jsonWriter.writeStringField("recoveryAvailabilitySetId", this.recoveryAvailabilitySetId); - jsonWriter.writeStringField("policyId", this.policyId); - jsonWriter.writeStringField("recoveryBootDiagStorageAccountId", this.recoveryBootDiagStorageAccountId); - jsonWriter.writeStringField("recoveryAvailabilityZone", this.recoveryAvailabilityZone); - jsonWriter.writeStringField("recoveryProximityPlacementGroupId", this.recoveryProximityPlacementGroupId); - jsonWriter.writeStringField("recoveryVirtualMachineScaleSetId", this.recoveryVirtualMachineScaleSetId); - jsonWriter.writeStringField("recoveryCapacityReservationGroupId", this.recoveryCapacityReservationGroupId); - jsonWriter.writeJsonField("diskEncryptionInfo", this.diskEncryptionInfo); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2ASwitchProtectionInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2ASwitchProtectionInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2ASwitchProtectionInput. - */ - public static A2ASwitchProtectionInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2ASwitchProtectionInput deserializedA2ASwitchProtectionInput = new A2ASwitchProtectionInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2ASwitchProtectionInput.instanceType = reader.getString(); - } else if ("recoveryContainerId".equals(fieldName)) { - deserializedA2ASwitchProtectionInput.recoveryContainerId = reader.getString(); - } else if ("vmDisks".equals(fieldName)) { - List vmDisks - = reader.readArray(reader1 -> A2AVmDiskInputDetails.fromJson(reader1)); - deserializedA2ASwitchProtectionInput.vmDisks = vmDisks; - } else if ("vmManagedDisks".equals(fieldName)) { - List vmManagedDisks - = reader.readArray(reader1 -> A2AVmManagedDiskInputDetails.fromJson(reader1)); - deserializedA2ASwitchProtectionInput.vmManagedDisks = vmManagedDisks; - } else if ("recoveryResourceGroupId".equals(fieldName)) { - deserializedA2ASwitchProtectionInput.recoveryResourceGroupId = reader.getString(); - } else if ("recoveryCloudServiceId".equals(fieldName)) { - deserializedA2ASwitchProtectionInput.recoveryCloudServiceId = reader.getString(); - } else if ("recoveryAvailabilitySetId".equals(fieldName)) { - deserializedA2ASwitchProtectionInput.recoveryAvailabilitySetId = reader.getString(); - } else if ("policyId".equals(fieldName)) { - deserializedA2ASwitchProtectionInput.policyId = reader.getString(); - } else if ("recoveryBootDiagStorageAccountId".equals(fieldName)) { - deserializedA2ASwitchProtectionInput.recoveryBootDiagStorageAccountId = reader.getString(); - } else if ("recoveryAvailabilityZone".equals(fieldName)) { - deserializedA2ASwitchProtectionInput.recoveryAvailabilityZone = reader.getString(); - } else if ("recoveryProximityPlacementGroupId".equals(fieldName)) { - deserializedA2ASwitchProtectionInput.recoveryProximityPlacementGroupId = reader.getString(); - } else if ("recoveryVirtualMachineScaleSetId".equals(fieldName)) { - deserializedA2ASwitchProtectionInput.recoveryVirtualMachineScaleSetId = reader.getString(); - } else if ("recoveryCapacityReservationGroupId".equals(fieldName)) { - deserializedA2ASwitchProtectionInput.recoveryCapacityReservationGroupId = reader.getString(); - } else if ("diskEncryptionInfo".equals(fieldName)) { - deserializedA2ASwitchProtectionInput.diskEncryptionInfo = DiskEncryptionInfo.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedA2ASwitchProtectionInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ATestFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ATestFailoverInput.java deleted file mode 100644 index 40b195c7b016..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2ATestFailoverInput.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A provider specific input for test failover. - */ -@Fluent -public final class A2ATestFailoverInput extends TestFailoverProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /* - * The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery - * point, null should be passed. - */ - private String recoveryPointId; - - /* - * A value indicating whether to use recovery cloud service for TFO or not. - */ - private String cloudServiceCreationOption; - - /** - * Creates an instance of A2ATestFailoverInput class. - */ - public A2ATestFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointId property: The recovery point id to be passed to test 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 recoveryPointId property: The recovery point id to be passed to test 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 A2ATestFailoverInput object itself. - */ - public A2ATestFailoverInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Get the cloudServiceCreationOption property: A value indicating whether to use recovery cloud service for TFO or - * not. - * - * @return the cloudServiceCreationOption value. - */ - public String cloudServiceCreationOption() { - return this.cloudServiceCreationOption; - } - - /** - * Set the cloudServiceCreationOption property: A value indicating whether to use recovery cloud service for TFO or - * not. - * - * @param cloudServiceCreationOption the cloudServiceCreationOption value to set. - * @return the A2ATestFailoverInput object itself. - */ - public A2ATestFailoverInput withCloudServiceCreationOption(String cloudServiceCreationOption) { - this.cloudServiceCreationOption = cloudServiceCreationOption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - jsonWriter.writeStringField("cloudServiceCreationOption", this.cloudServiceCreationOption); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2ATestFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2ATestFailoverInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2ATestFailoverInput. - */ - public static A2ATestFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2ATestFailoverInput deserializedA2ATestFailoverInput = new A2ATestFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2ATestFailoverInput.instanceType = reader.getString(); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedA2ATestFailoverInput.recoveryPointId = reader.getString(); - } else if ("cloudServiceCreationOption".equals(fieldName)) { - deserializedA2ATestFailoverInput.cloudServiceCreationOption = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2ATestFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AUnplannedFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AUnplannedFailoverInput.java deleted file mode 100644 index 44c558820842..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AUnplannedFailoverInput.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A provider specific input for unplanned failover. - */ -@Fluent -public final class A2AUnplannedFailoverInput extends UnplannedFailoverProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /* - * The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, - * null should be passed. - */ - private String recoveryPointId; - - /* - * A value indicating whether to use recovery cloud service for failover or not. - */ - private String cloudServiceCreationOption; - - /** - * Creates an instance of A2AUnplannedFailoverInput class. - */ - public A2AUnplannedFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointId property: 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 recoveryPointId property: 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 A2AUnplannedFailoverInput object itself. - */ - public A2AUnplannedFailoverInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Get the cloudServiceCreationOption property: A value indicating whether to use recovery cloud service for - * failover or not. - * - * @return the cloudServiceCreationOption value. - */ - public String cloudServiceCreationOption() { - return this.cloudServiceCreationOption; - } - - /** - * Set the cloudServiceCreationOption property: A value indicating whether to use recovery cloud service for - * failover or not. - * - * @param cloudServiceCreationOption the cloudServiceCreationOption value to set. - * @return the A2AUnplannedFailoverInput object itself. - */ - public A2AUnplannedFailoverInput withCloudServiceCreationOption(String cloudServiceCreationOption) { - this.cloudServiceCreationOption = cloudServiceCreationOption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - jsonWriter.writeStringField("cloudServiceCreationOption", this.cloudServiceCreationOption); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AUnplannedFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AUnplannedFailoverInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AUnplannedFailoverInput. - */ - public static A2AUnplannedFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AUnplannedFailoverInput deserializedA2AUnplannedFailoverInput = new A2AUnplannedFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2AUnplannedFailoverInput.instanceType = reader.getString(); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedA2AUnplannedFailoverInput.recoveryPointId = reader.getString(); - } else if ("cloudServiceCreationOption".equals(fieldName)) { - deserializedA2AUnplannedFailoverInput.cloudServiceCreationOption = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AUnplannedFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AUnprotectedDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AUnprotectedDiskDetails.java deleted file mode 100644 index bfbde9b0aa47..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AUnprotectedDiskDetails.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A unprotected disk details. - */ -@Fluent -public final class A2AUnprotectedDiskDetails implements JsonSerializable { - /* - * The source lun Id for the data disk. - */ - private Integer diskLunId; - - /* - * A value indicating whether the disk auto protection is enabled. - */ - private AutoProtectionOfDataDisk diskAutoProtectionStatus; - - /** - * Creates an instance of A2AUnprotectedDiskDetails class. - */ - public A2AUnprotectedDiskDetails() { - } - - /** - * Get the diskLunId property: The source lun Id for the data disk. - * - * @return the diskLunId value. - */ - public Integer diskLunId() { - return this.diskLunId; - } - - /** - * Set the diskLunId property: The source lun Id for the data disk. - * - * @param diskLunId the diskLunId value to set. - * @return the A2AUnprotectedDiskDetails object itself. - */ - public A2AUnprotectedDiskDetails withDiskLunId(Integer diskLunId) { - this.diskLunId = diskLunId; - return this; - } - - /** - * Get the diskAutoProtectionStatus property: A value indicating whether the disk auto protection is enabled. - * - * @return the diskAutoProtectionStatus value. - */ - public AutoProtectionOfDataDisk diskAutoProtectionStatus() { - return this.diskAutoProtectionStatus; - } - - /** - * Set the diskAutoProtectionStatus property: A value indicating whether the disk auto protection is enabled. - * - * @param diskAutoProtectionStatus the diskAutoProtectionStatus value to set. - * @return the A2AUnprotectedDiskDetails object itself. - */ - public A2AUnprotectedDiskDetails withDiskAutoProtectionStatus(AutoProtectionOfDataDisk diskAutoProtectionStatus) { - this.diskAutoProtectionStatus = diskAutoProtectionStatus; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("diskLunId", this.diskLunId); - jsonWriter.writeStringField("diskAutoProtectionStatus", - this.diskAutoProtectionStatus == null ? null : this.diskAutoProtectionStatus.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AUnprotectedDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AUnprotectedDiskDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AUnprotectedDiskDetails. - */ - public static A2AUnprotectedDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AUnprotectedDiskDetails deserializedA2AUnprotectedDiskDetails = new A2AUnprotectedDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskLunId".equals(fieldName)) { - deserializedA2AUnprotectedDiskDetails.diskLunId = reader.getNullable(JsonReader::getInt); - } else if ("diskAutoProtectionStatus".equals(fieldName)) { - deserializedA2AUnprotectedDiskDetails.diskAutoProtectionStatus - = AutoProtectionOfDataDisk.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AUnprotectedDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AUpdateContainerMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AUpdateContainerMappingInput.java deleted file mode 100644 index db8cc54d3663..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AUpdateContainerMappingInput.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A update protection container mapping. - */ -@Fluent -public final class A2AUpdateContainerMappingInput extends ReplicationProviderSpecificUpdateContainerMappingInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /* - * A value indicating whether the auto update is enabled. - */ - private AgentAutoUpdateStatus agentAutoUpdateStatus; - - /* - * The automation account arm id. - */ - private String automationAccountArmId; - - /* - * A value indicating the type authentication to use for automation Account. - */ - private AutomationAccountAuthenticationType automationAccountAuthenticationType; - - /** - * Creates an instance of A2AUpdateContainerMappingInput class. - */ - public A2AUpdateContainerMappingInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the agentAutoUpdateStatus property: A value indicating whether the auto update is enabled. - * - * @return the agentAutoUpdateStatus value. - */ - public AgentAutoUpdateStatus agentAutoUpdateStatus() { - return this.agentAutoUpdateStatus; - } - - /** - * Set the agentAutoUpdateStatus property: A value indicating whether the auto update is enabled. - * - * @param agentAutoUpdateStatus the agentAutoUpdateStatus value to set. - * @return the A2AUpdateContainerMappingInput object itself. - */ - public A2AUpdateContainerMappingInput withAgentAutoUpdateStatus(AgentAutoUpdateStatus agentAutoUpdateStatus) { - this.agentAutoUpdateStatus = agentAutoUpdateStatus; - return this; - } - - /** - * Get the automationAccountArmId property: The automation account arm id. - * - * @return the automationAccountArmId value. - */ - public String automationAccountArmId() { - return this.automationAccountArmId; - } - - /** - * Set the automationAccountArmId property: The automation account arm id. - * - * @param automationAccountArmId the automationAccountArmId value to set. - * @return the A2AUpdateContainerMappingInput object itself. - */ - public A2AUpdateContainerMappingInput withAutomationAccountArmId(String automationAccountArmId) { - this.automationAccountArmId = automationAccountArmId; - return this; - } - - /** - * Get the automationAccountAuthenticationType property: A value indicating the type authentication to use for - * automation Account. - * - * @return the automationAccountAuthenticationType value. - */ - public AutomationAccountAuthenticationType automationAccountAuthenticationType() { - return this.automationAccountAuthenticationType; - } - - /** - * Set the automationAccountAuthenticationType property: A value indicating the type authentication to use for - * automation Account. - * - * @param automationAccountAuthenticationType the automationAccountAuthenticationType value to set. - * @return the A2AUpdateContainerMappingInput object itself. - */ - public A2AUpdateContainerMappingInput withAutomationAccountAuthenticationType( - AutomationAccountAuthenticationType automationAccountAuthenticationType) { - this.automationAccountAuthenticationType = automationAccountAuthenticationType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("agentAutoUpdateStatus", - this.agentAutoUpdateStatus == null ? null : this.agentAutoUpdateStatus.toString()); - jsonWriter.writeStringField("automationAccountArmId", this.automationAccountArmId); - jsonWriter.writeStringField("automationAccountAuthenticationType", - this.automationAccountAuthenticationType == null - ? null - : this.automationAccountAuthenticationType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AUpdateContainerMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AUpdateContainerMappingInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AUpdateContainerMappingInput. - */ - public static A2AUpdateContainerMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AUpdateContainerMappingInput deserializedA2AUpdateContainerMappingInput - = new A2AUpdateContainerMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2AUpdateContainerMappingInput.instanceType = reader.getString(); - } else if ("agentAutoUpdateStatus".equals(fieldName)) { - deserializedA2AUpdateContainerMappingInput.agentAutoUpdateStatus - = AgentAutoUpdateStatus.fromString(reader.getString()); - } else if ("automationAccountArmId".equals(fieldName)) { - deserializedA2AUpdateContainerMappingInput.automationAccountArmId = reader.getString(); - } else if ("automationAccountAuthenticationType".equals(fieldName)) { - deserializedA2AUpdateContainerMappingInput.automationAccountAuthenticationType - = AutomationAccountAuthenticationType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AUpdateContainerMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AUpdateReplicationProtectedItemInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AUpdateReplicationProtectedItemInput.java deleted file mode 100644 index 8cd297f2cca3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AUpdateReplicationProtectedItemInput.java +++ /dev/null @@ -1,357 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * InMage Azure V2 input to update replication protected item. - */ -@Fluent -public final class A2AUpdateReplicationProtectedItemInput extends UpdateReplicationProtectedItemProviderInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /* - * The target cloud service ARM Id (for V1). - */ - private String recoveryCloudServiceId; - - /* - * The target resource group ARM Id (for V2). - */ - private String recoveryResourceGroupId; - - /* - * Managed disk update details. - */ - private List managedDiskUpdateDetails; - - /* - * The boot diagnostic storage account. - */ - private String recoveryBootDiagStorageAccountId; - - /* - * The recovery os disk encryption information. - */ - private DiskEncryptionInfo diskEncryptionInfo; - - /* - * The user given name for Test Failover VM. - */ - private String tfoAzureVMName; - - /* - * The recovery proximity placement group Id. - */ - private String recoveryProximityPlacementGroupId; - - /* - * The recovery virtual machine scale set Id. - */ - private String recoveryVirtualMachineScaleSetId; - - /* - * The recovery capacity reservation group Id. - */ - private String recoveryCapacityReservationGroupId; - - /** - * Creates an instance of A2AUpdateReplicationProtectedItemInput class. - */ - public A2AUpdateReplicationProtectedItemInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryCloudServiceId property: The target cloud service ARM Id (for V1). - * - * @return the recoveryCloudServiceId value. - */ - public String recoveryCloudServiceId() { - return this.recoveryCloudServiceId; - } - - /** - * Set the recoveryCloudServiceId property: 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 recoveryResourceGroupId property: The target resource group ARM Id (for V2). - * - * @return the recoveryResourceGroupId value. - */ - public String recoveryResourceGroupId() { - return this.recoveryResourceGroupId; - } - - /** - * Set the recoveryResourceGroupId property: 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; - } - - /** - * Get the managedDiskUpdateDetails property: Managed disk update details. - * - * @return the managedDiskUpdateDetails value. - */ - public List managedDiskUpdateDetails() { - return this.managedDiskUpdateDetails; - } - - /** - * Set the managedDiskUpdateDetails property: Managed disk update details. - * - * @param managedDiskUpdateDetails the managedDiskUpdateDetails value to set. - * @return the A2AUpdateReplicationProtectedItemInput object itself. - */ - public A2AUpdateReplicationProtectedItemInput - withManagedDiskUpdateDetails(List managedDiskUpdateDetails) { - this.managedDiskUpdateDetails = managedDiskUpdateDetails; - return this; - } - - /** - * Get the recoveryBootDiagStorageAccountId property: The boot diagnostic storage account. - * - * @return the recoveryBootDiagStorageAccountId value. - */ - public String recoveryBootDiagStorageAccountId() { - return this.recoveryBootDiagStorageAccountId; - } - - /** - * Set the recoveryBootDiagStorageAccountId property: The boot diagnostic storage account. - * - * @param recoveryBootDiagStorageAccountId the recoveryBootDiagStorageAccountId value to set. - * @return the A2AUpdateReplicationProtectedItemInput object itself. - */ - public A2AUpdateReplicationProtectedItemInput - withRecoveryBootDiagStorageAccountId(String recoveryBootDiagStorageAccountId) { - this.recoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; - return this; - } - - /** - * Get the diskEncryptionInfo property: The recovery os disk encryption information. - * - * @return the diskEncryptionInfo value. - */ - public DiskEncryptionInfo diskEncryptionInfo() { - return this.diskEncryptionInfo; - } - - /** - * Set the diskEncryptionInfo property: The recovery os disk encryption information. - * - * @param diskEncryptionInfo the diskEncryptionInfo value to set. - * @return the A2AUpdateReplicationProtectedItemInput object itself. - */ - public A2AUpdateReplicationProtectedItemInput withDiskEncryptionInfo(DiskEncryptionInfo diskEncryptionInfo) { - this.diskEncryptionInfo = diskEncryptionInfo; - return this; - } - - /** - * Get the tfoAzureVMName property: The user given name for Test Failover VM. - * - * @return the tfoAzureVMName value. - */ - public String tfoAzureVMName() { - return this.tfoAzureVMName; - } - - /** - * Set the tfoAzureVMName property: The user given name for Test Failover VM. - * - * @param tfoAzureVMName the tfoAzureVMName value to set. - * @return the A2AUpdateReplicationProtectedItemInput object itself. - */ - public A2AUpdateReplicationProtectedItemInput withTfoAzureVMName(String tfoAzureVMName) { - this.tfoAzureVMName = tfoAzureVMName; - return this; - } - - /** - * Get the recoveryProximityPlacementGroupId property: The recovery proximity placement group Id. - * - * @return the recoveryProximityPlacementGroupId value. - */ - public String recoveryProximityPlacementGroupId() { - return this.recoveryProximityPlacementGroupId; - } - - /** - * Set the recoveryProximityPlacementGroupId property: The recovery proximity placement group Id. - * - * @param recoveryProximityPlacementGroupId the recoveryProximityPlacementGroupId value to set. - * @return the A2AUpdateReplicationProtectedItemInput object itself. - */ - public A2AUpdateReplicationProtectedItemInput - withRecoveryProximityPlacementGroupId(String recoveryProximityPlacementGroupId) { - this.recoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; - return this; - } - - /** - * Get the recoveryVirtualMachineScaleSetId property: The recovery virtual machine scale set Id. - * - * @return the recoveryVirtualMachineScaleSetId value. - */ - public String recoveryVirtualMachineScaleSetId() { - return this.recoveryVirtualMachineScaleSetId; - } - - /** - * Set the recoveryVirtualMachineScaleSetId property: The recovery virtual machine scale set Id. - * - * @param recoveryVirtualMachineScaleSetId the recoveryVirtualMachineScaleSetId value to set. - * @return the A2AUpdateReplicationProtectedItemInput object itself. - */ - public A2AUpdateReplicationProtectedItemInput - withRecoveryVirtualMachineScaleSetId(String recoveryVirtualMachineScaleSetId) { - this.recoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId; - return this; - } - - /** - * Get the recoveryCapacityReservationGroupId property: The recovery capacity reservation group Id. - * - * @return the recoveryCapacityReservationGroupId value. - */ - public String recoveryCapacityReservationGroupId() { - return this.recoveryCapacityReservationGroupId; - } - - /** - * Set the recoveryCapacityReservationGroupId property: The recovery capacity reservation group Id. - * - * @param recoveryCapacityReservationGroupId the recoveryCapacityReservationGroupId value to set. - * @return the A2AUpdateReplicationProtectedItemInput object itself. - */ - public A2AUpdateReplicationProtectedItemInput - withRecoveryCapacityReservationGroupId(String recoveryCapacityReservationGroupId) { - this.recoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (managedDiskUpdateDetails() != null) { - managedDiskUpdateDetails().forEach(e -> e.validate()); - } - if (diskEncryptionInfo() != null) { - diskEncryptionInfo().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryCloudServiceId", this.recoveryCloudServiceId); - jsonWriter.writeStringField("recoveryResourceGroupId", this.recoveryResourceGroupId); - jsonWriter.writeArrayField("managedDiskUpdateDetails", this.managedDiskUpdateDetails, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("recoveryBootDiagStorageAccountId", this.recoveryBootDiagStorageAccountId); - jsonWriter.writeJsonField("diskEncryptionInfo", this.diskEncryptionInfo); - jsonWriter.writeStringField("tfoAzureVMName", this.tfoAzureVMName); - jsonWriter.writeStringField("recoveryProximityPlacementGroupId", this.recoveryProximityPlacementGroupId); - jsonWriter.writeStringField("recoveryVirtualMachineScaleSetId", this.recoveryVirtualMachineScaleSetId); - jsonWriter.writeStringField("recoveryCapacityReservationGroupId", this.recoveryCapacityReservationGroupId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AUpdateReplicationProtectedItemInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AUpdateReplicationProtectedItemInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AUpdateReplicationProtectedItemInput. - */ - public static A2AUpdateReplicationProtectedItemInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AUpdateReplicationProtectedItemInput deserializedA2AUpdateReplicationProtectedItemInput - = new A2AUpdateReplicationProtectedItemInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedA2AUpdateReplicationProtectedItemInput.instanceType = reader.getString(); - } else if ("recoveryCloudServiceId".equals(fieldName)) { - deserializedA2AUpdateReplicationProtectedItemInput.recoveryCloudServiceId = reader.getString(); - } else if ("recoveryResourceGroupId".equals(fieldName)) { - deserializedA2AUpdateReplicationProtectedItemInput.recoveryResourceGroupId = reader.getString(); - } else if ("managedDiskUpdateDetails".equals(fieldName)) { - List managedDiskUpdateDetails - = reader.readArray(reader1 -> A2AVmManagedDiskUpdateDetails.fromJson(reader1)); - deserializedA2AUpdateReplicationProtectedItemInput.managedDiskUpdateDetails - = managedDiskUpdateDetails; - } else if ("recoveryBootDiagStorageAccountId".equals(fieldName)) { - deserializedA2AUpdateReplicationProtectedItemInput.recoveryBootDiagStorageAccountId - = reader.getString(); - } else if ("diskEncryptionInfo".equals(fieldName)) { - deserializedA2AUpdateReplicationProtectedItemInput.diskEncryptionInfo - = DiskEncryptionInfo.fromJson(reader); - } else if ("tfoAzureVMName".equals(fieldName)) { - deserializedA2AUpdateReplicationProtectedItemInput.tfoAzureVMName = reader.getString(); - } else if ("recoveryProximityPlacementGroupId".equals(fieldName)) { - deserializedA2AUpdateReplicationProtectedItemInput.recoveryProximityPlacementGroupId - = reader.getString(); - } else if ("recoveryVirtualMachineScaleSetId".equals(fieldName)) { - deserializedA2AUpdateReplicationProtectedItemInput.recoveryVirtualMachineScaleSetId - = reader.getString(); - } else if ("recoveryCapacityReservationGroupId".equals(fieldName)) { - deserializedA2AUpdateReplicationProtectedItemInput.recoveryCapacityReservationGroupId - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AUpdateReplicationProtectedItemInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AVmDiskInputDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AVmDiskInputDetails.java deleted file mode 100644 index 0e5252ee3055..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AVmDiskInputDetails.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A disk input details. - */ -@Fluent -public final class A2AVmDiskInputDetails implements JsonSerializable { - /* - * The disk Uri. - */ - private String diskUri; - - /* - * The recovery VHD storage account Id. - */ - private String recoveryAzureStorageAccountId; - - /* - * The primary staging storage account Id. - */ - private String primaryStagingAzureStorageAccountId; - - /** - * Creates an instance of A2AVmDiskInputDetails class. - */ - public A2AVmDiskInputDetails() { - } - - /** - * Get the diskUri property: The disk Uri. - * - * @return the diskUri value. - */ - public String diskUri() { - return this.diskUri; - } - - /** - * Set the diskUri property: 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 recoveryAzureStorageAccountId property: The recovery VHD storage account Id. - * - * @return the recoveryAzureStorageAccountId value. - */ - public String recoveryAzureStorageAccountId() { - return this.recoveryAzureStorageAccountId; - } - - /** - * Set the recoveryAzureStorageAccountId property: 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 primaryStagingAzureStorageAccountId property: The primary staging storage account Id. - * - * @return the primaryStagingAzureStorageAccountId value. - */ - public String primaryStagingAzureStorageAccountId() { - return this.primaryStagingAzureStorageAccountId; - } - - /** - * Set the primaryStagingAzureStorageAccountId property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskUri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property diskUri in model A2AVmDiskInputDetails")); - } - if (recoveryAzureStorageAccountId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryAzureStorageAccountId in model A2AVmDiskInputDetails")); - } - if (primaryStagingAzureStorageAccountId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property primaryStagingAzureStorageAccountId in model A2AVmDiskInputDetails")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(A2AVmDiskInputDetails.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskUri", this.diskUri); - jsonWriter.writeStringField("recoveryAzureStorageAccountId", this.recoveryAzureStorageAccountId); - jsonWriter.writeStringField("primaryStagingAzureStorageAccountId", this.primaryStagingAzureStorageAccountId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AVmDiskInputDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AVmDiskInputDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the A2AVmDiskInputDetails. - */ - public static A2AVmDiskInputDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AVmDiskInputDetails deserializedA2AVmDiskInputDetails = new A2AVmDiskInputDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskUri".equals(fieldName)) { - deserializedA2AVmDiskInputDetails.diskUri = reader.getString(); - } else if ("recoveryAzureStorageAccountId".equals(fieldName)) { - deserializedA2AVmDiskInputDetails.recoveryAzureStorageAccountId = reader.getString(); - } else if ("primaryStagingAzureStorageAccountId".equals(fieldName)) { - deserializedA2AVmDiskInputDetails.primaryStagingAzureStorageAccountId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AVmDiskInputDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AVmManagedDiskInputDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AVmManagedDiskInputDetails.java deleted file mode 100644 index 01f6f830507e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AVmManagedDiskInputDetails.java +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A managed disk input details. - */ -@Fluent -public final class A2AVmManagedDiskInputDetails implements JsonSerializable { - /* - * The disk Id. - */ - private String diskId; - - /* - * The primary staging storage account Arm Id. - */ - private String primaryStagingAzureStorageAccountId; - - /* - * The target resource group Arm Id. - */ - private String recoveryResourceGroupId; - - /* - * The replica disk type. Its an optional value and will be same as source disk type if not user provided. - */ - private String recoveryReplicaDiskAccountType; - - /* - * The target disk type after failover. Its an optional value and will be same as source disk type if not user - * provided. - */ - private String recoveryTargetDiskAccountType; - - /* - * The recovery disk encryption set Id. - */ - private String recoveryDiskEncryptionSetId; - - /* - * The recovery disk encryption information (for one / single pass flows). - */ - private DiskEncryptionInfo diskEncryptionInfo; - - /** - * Creates an instance of A2AVmManagedDiskInputDetails class. - */ - public A2AVmManagedDiskInputDetails() { - } - - /** - * Get the diskId property: The disk Id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: 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 primaryStagingAzureStorageAccountId property: The primary staging storage account Arm Id. - * - * @return the primaryStagingAzureStorageAccountId value. - */ - public String primaryStagingAzureStorageAccountId() { - return this.primaryStagingAzureStorageAccountId; - } - - /** - * Set the primaryStagingAzureStorageAccountId property: 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 recoveryResourceGroupId property: The target resource group Arm Id. - * - * @return the recoveryResourceGroupId value. - */ - public String recoveryResourceGroupId() { - return this.recoveryResourceGroupId; - } - - /** - * Set the recoveryResourceGroupId property: 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; - } - - /** - * Get the recoveryReplicaDiskAccountType property: The replica disk type. Its an optional value and will be same as - * source disk type if not user provided. - * - * @return the recoveryReplicaDiskAccountType value. - */ - public String recoveryReplicaDiskAccountType() { - return this.recoveryReplicaDiskAccountType; - } - - /** - * Set the recoveryReplicaDiskAccountType property: The replica disk type. Its an optional value and will be same as - * source disk type if not user provided. - * - * @param recoveryReplicaDiskAccountType the recoveryReplicaDiskAccountType value to set. - * @return the A2AVmManagedDiskInputDetails object itself. - */ - public A2AVmManagedDiskInputDetails withRecoveryReplicaDiskAccountType(String recoveryReplicaDiskAccountType) { - this.recoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType; - return this; - } - - /** - * Get the recoveryTargetDiskAccountType property: The target disk type after failover. Its an optional value and - * will be same as source disk type if not user provided. - * - * @return the recoveryTargetDiskAccountType value. - */ - public String recoveryTargetDiskAccountType() { - return this.recoveryTargetDiskAccountType; - } - - /** - * Set the recoveryTargetDiskAccountType property: The target disk type after failover. Its an optional value and - * will be same as source disk type if not user provided. - * - * @param recoveryTargetDiskAccountType the recoveryTargetDiskAccountType value to set. - * @return the A2AVmManagedDiskInputDetails object itself. - */ - public A2AVmManagedDiskInputDetails withRecoveryTargetDiskAccountType(String recoveryTargetDiskAccountType) { - this.recoveryTargetDiskAccountType = recoveryTargetDiskAccountType; - return this; - } - - /** - * Get the recoveryDiskEncryptionSetId property: The recovery disk encryption set Id. - * - * @return the recoveryDiskEncryptionSetId value. - */ - public String recoveryDiskEncryptionSetId() { - return this.recoveryDiskEncryptionSetId; - } - - /** - * Set the recoveryDiskEncryptionSetId property: The recovery disk encryption set Id. - * - * @param recoveryDiskEncryptionSetId the recoveryDiskEncryptionSetId value to set. - * @return the A2AVmManagedDiskInputDetails object itself. - */ - public A2AVmManagedDiskInputDetails withRecoveryDiskEncryptionSetId(String recoveryDiskEncryptionSetId) { - this.recoveryDiskEncryptionSetId = recoveryDiskEncryptionSetId; - return this; - } - - /** - * Get the diskEncryptionInfo property: The recovery disk encryption information (for one / single pass flows). - * - * @return the diskEncryptionInfo value. - */ - public DiskEncryptionInfo diskEncryptionInfo() { - return this.diskEncryptionInfo; - } - - /** - * Set the diskEncryptionInfo property: The recovery disk encryption information (for one / single pass flows). - * - * @param diskEncryptionInfo the diskEncryptionInfo value to set. - * @return the A2AVmManagedDiskInputDetails object itself. - */ - public A2AVmManagedDiskInputDetails withDiskEncryptionInfo(DiskEncryptionInfo diskEncryptionInfo) { - this.diskEncryptionInfo = diskEncryptionInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property diskId in model A2AVmManagedDiskInputDetails")); - } - if (primaryStagingAzureStorageAccountId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property primaryStagingAzureStorageAccountId in model A2AVmManagedDiskInputDetails")); - } - if (recoveryResourceGroupId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryResourceGroupId in model A2AVmManagedDiskInputDetails")); - } - if (diskEncryptionInfo() != null) { - diskEncryptionInfo().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(A2AVmManagedDiskInputDetails.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("primaryStagingAzureStorageAccountId", this.primaryStagingAzureStorageAccountId); - jsonWriter.writeStringField("recoveryResourceGroupId", this.recoveryResourceGroupId); - jsonWriter.writeStringField("recoveryReplicaDiskAccountType", this.recoveryReplicaDiskAccountType); - jsonWriter.writeStringField("recoveryTargetDiskAccountType", this.recoveryTargetDiskAccountType); - jsonWriter.writeStringField("recoveryDiskEncryptionSetId", this.recoveryDiskEncryptionSetId); - jsonWriter.writeJsonField("diskEncryptionInfo", this.diskEncryptionInfo); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AVmManagedDiskInputDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AVmManagedDiskInputDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the A2AVmManagedDiskInputDetails. - */ - public static A2AVmManagedDiskInputDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AVmManagedDiskInputDetails deserializedA2AVmManagedDiskInputDetails = new A2AVmManagedDiskInputDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedA2AVmManagedDiskInputDetails.diskId = reader.getString(); - } else if ("primaryStagingAzureStorageAccountId".equals(fieldName)) { - deserializedA2AVmManagedDiskInputDetails.primaryStagingAzureStorageAccountId = reader.getString(); - } else if ("recoveryResourceGroupId".equals(fieldName)) { - deserializedA2AVmManagedDiskInputDetails.recoveryResourceGroupId = reader.getString(); - } else if ("recoveryReplicaDiskAccountType".equals(fieldName)) { - deserializedA2AVmManagedDiskInputDetails.recoveryReplicaDiskAccountType = reader.getString(); - } else if ("recoveryTargetDiskAccountType".equals(fieldName)) { - deserializedA2AVmManagedDiskInputDetails.recoveryTargetDiskAccountType = reader.getString(); - } else if ("recoveryDiskEncryptionSetId".equals(fieldName)) { - deserializedA2AVmManagedDiskInputDetails.recoveryDiskEncryptionSetId = reader.getString(); - } else if ("diskEncryptionInfo".equals(fieldName)) { - deserializedA2AVmManagedDiskInputDetails.diskEncryptionInfo = DiskEncryptionInfo.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AVmManagedDiskInputDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AVmManagedDiskUpdateDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AVmManagedDiskUpdateDetails.java deleted file mode 100644 index 4d0f52fc06aa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AVmManagedDiskUpdateDetails.java +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A Vm managed disk update details. - */ -@Fluent -public final class A2AVmManagedDiskUpdateDetails implements JsonSerializable { - /* - * The disk Id. - */ - private String diskId; - - /* - * The target disk type before failover. - */ - private String recoveryTargetDiskAccountType; - - /* - * The replica disk type before failover. - */ - private String recoveryReplicaDiskAccountType; - - /* - * The recovery os disk encryption information. - */ - private DiskEncryptionInfo diskEncryptionInfo; - - /* - * The target disk name for unplanned failover operation. - */ - private String failoverDiskName; - - /* - * The target disk name for test failover operation. - */ - private String tfoDiskName; - - /** - * Creates an instance of A2AVmManagedDiskUpdateDetails class. - */ - public A2AVmManagedDiskUpdateDetails() { - } - - /** - * Get the diskId property: The disk Id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: The disk Id. - * - * @param diskId the diskId value to set. - * @return the A2AVmManagedDiskUpdateDetails object itself. - */ - public A2AVmManagedDiskUpdateDetails withDiskId(String diskId) { - this.diskId = diskId; - return this; - } - - /** - * Get the recoveryTargetDiskAccountType property: The target disk type before failover. - * - * @return the recoveryTargetDiskAccountType value. - */ - public String recoveryTargetDiskAccountType() { - return this.recoveryTargetDiskAccountType; - } - - /** - * Set the recoveryTargetDiskAccountType property: The target disk type before failover. - * - * @param recoveryTargetDiskAccountType the recoveryTargetDiskAccountType value to set. - * @return the A2AVmManagedDiskUpdateDetails object itself. - */ - public A2AVmManagedDiskUpdateDetails withRecoveryTargetDiskAccountType(String recoveryTargetDiskAccountType) { - this.recoveryTargetDiskAccountType = recoveryTargetDiskAccountType; - return this; - } - - /** - * Get the recoveryReplicaDiskAccountType property: The replica disk type before failover. - * - * @return the recoveryReplicaDiskAccountType value. - */ - public String recoveryReplicaDiskAccountType() { - return this.recoveryReplicaDiskAccountType; - } - - /** - * Set the recoveryReplicaDiskAccountType property: The replica disk type before failover. - * - * @param recoveryReplicaDiskAccountType the recoveryReplicaDiskAccountType value to set. - * @return the A2AVmManagedDiskUpdateDetails object itself. - */ - public A2AVmManagedDiskUpdateDetails withRecoveryReplicaDiskAccountType(String recoveryReplicaDiskAccountType) { - this.recoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType; - return this; - } - - /** - * Get the diskEncryptionInfo property: The recovery os disk encryption information. - * - * @return the diskEncryptionInfo value. - */ - public DiskEncryptionInfo diskEncryptionInfo() { - return this.diskEncryptionInfo; - } - - /** - * Set the diskEncryptionInfo property: The recovery os disk encryption information. - * - * @param diskEncryptionInfo the diskEncryptionInfo value to set. - * @return the A2AVmManagedDiskUpdateDetails object itself. - */ - public A2AVmManagedDiskUpdateDetails withDiskEncryptionInfo(DiskEncryptionInfo diskEncryptionInfo) { - this.diskEncryptionInfo = diskEncryptionInfo; - return this; - } - - /** - * Get the failoverDiskName property: The target disk name for unplanned failover operation. - * - * @return the failoverDiskName value. - */ - public String failoverDiskName() { - return this.failoverDiskName; - } - - /** - * Set the failoverDiskName property: The target disk name for unplanned failover operation. - * - * @param failoverDiskName the failoverDiskName value to set. - * @return the A2AVmManagedDiskUpdateDetails object itself. - */ - public A2AVmManagedDiskUpdateDetails withFailoverDiskName(String failoverDiskName) { - this.failoverDiskName = failoverDiskName; - return this; - } - - /** - * Get the tfoDiskName property: The target disk name for test failover operation. - * - * @return the tfoDiskName value. - */ - public String tfoDiskName() { - return this.tfoDiskName; - } - - /** - * Set the tfoDiskName property: The target disk name for test failover operation. - * - * @param tfoDiskName the tfoDiskName value to set. - * @return the A2AVmManagedDiskUpdateDetails object itself. - */ - public A2AVmManagedDiskUpdateDetails withTfoDiskName(String tfoDiskName) { - this.tfoDiskName = tfoDiskName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskEncryptionInfo() != null) { - diskEncryptionInfo().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("recoveryTargetDiskAccountType", this.recoveryTargetDiskAccountType); - jsonWriter.writeStringField("recoveryReplicaDiskAccountType", this.recoveryReplicaDiskAccountType); - jsonWriter.writeJsonField("diskEncryptionInfo", this.diskEncryptionInfo); - jsonWriter.writeStringField("failoverDiskName", this.failoverDiskName); - jsonWriter.writeStringField("tfoDiskName", this.tfoDiskName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AVmManagedDiskUpdateDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AVmManagedDiskUpdateDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AVmManagedDiskUpdateDetails. - */ - public static A2AVmManagedDiskUpdateDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AVmManagedDiskUpdateDetails deserializedA2AVmManagedDiskUpdateDetails - = new A2AVmManagedDiskUpdateDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedA2AVmManagedDiskUpdateDetails.diskId = reader.getString(); - } else if ("recoveryTargetDiskAccountType".equals(fieldName)) { - deserializedA2AVmManagedDiskUpdateDetails.recoveryTargetDiskAccountType = reader.getString(); - } else if ("recoveryReplicaDiskAccountType".equals(fieldName)) { - deserializedA2AVmManagedDiskUpdateDetails.recoveryReplicaDiskAccountType = reader.getString(); - } else if ("diskEncryptionInfo".equals(fieldName)) { - deserializedA2AVmManagedDiskUpdateDetails.diskEncryptionInfo = DiskEncryptionInfo.fromJson(reader); - } else if ("failoverDiskName".equals(fieldName)) { - deserializedA2AVmManagedDiskUpdateDetails.failoverDiskName = reader.getString(); - } else if ("tfoDiskName".equals(fieldName)) { - deserializedA2AVmManagedDiskUpdateDetails.tfoDiskName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AVmManagedDiskUpdateDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AZoneDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AZoneDetails.java deleted file mode 100644 index e4fd5019c127..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/A2AZoneDetails.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Zone details data. - */ -@Fluent -public final class A2AZoneDetails implements JsonSerializable { - /* - * Source zone info. - */ - private String source; - - /* - * The target zone info. - */ - private String target; - - /** - * Creates an instance of A2AZoneDetails class. - */ - public A2AZoneDetails() { - } - - /** - * Get the source property: Source zone info. - * - * @return the source value. - */ - public String source() { - return this.source; - } - - /** - * Set the source property: Source zone info. - * - * @param source the source value to set. - * @return the A2AZoneDetails object itself. - */ - public A2AZoneDetails withSource(String source) { - this.source = source; - return this; - } - - /** - * Get the target property: The target zone info. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: The target zone info. - * - * @param target the target value to set. - * @return the A2AZoneDetails object itself. - */ - public A2AZoneDetails withTarget(String target) { - this.target = target; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("source", this.source); - jsonWriter.writeStringField("target", this.target); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of A2AZoneDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of A2AZoneDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the A2AZoneDetails. - */ - public static A2AZoneDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - A2AZoneDetails deserializedA2AZoneDetails = new A2AZoneDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("source".equals(fieldName)) { - deserializedA2AZoneDetails.source = reader.getString(); - } else if ("target".equals(fieldName)) { - deserializedA2AZoneDetails.target = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedA2AZoneDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddDisksInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddDisksInput.java deleted file mode 100644 index 70061f2c65bc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddDisksInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input for add disk(s) operation. - */ -@Fluent -public final class AddDisksInput implements JsonSerializable { - /* - * Add disks input properties. - */ - private AddDisksInputProperties properties; - - /** - * Creates an instance of AddDisksInput class. - */ - public AddDisksInput() { - } - - /** - * Get the properties property: Add disks input properties. - * - * @return the properties value. - */ - public AddDisksInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Add disks input properties. - * - * @param properties the properties value to set. - * @return the AddDisksInput object itself. - */ - public AddDisksInput withProperties(AddDisksInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AddDisksInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AddDisksInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AddDisksInput. - */ - public static AddDisksInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AddDisksInput deserializedAddDisksInput = new AddDisksInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedAddDisksInput.properties = AddDisksInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAddDisksInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddDisksInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddDisksInputProperties.java deleted file mode 100644 index 292aa592b6df..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddDisksInputProperties.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Add Disks input properties. - */ -@Fluent -public final class AddDisksInputProperties implements JsonSerializable { - /* - * 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. - */ - private AddDisksProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of AddDisksInputProperties class. - */ - public AddDisksInputProperties() { - } - - /** - * Get the providerSpecificDetails property: 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 AddDisksProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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 AddDisksInputProperties object itself. - */ - public AddDisksInputProperties withProviderSpecificDetails(AddDisksProviderSpecificInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property providerSpecificDetails in model AddDisksInputProperties")); - } else { - providerSpecificDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AddDisksInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AddDisksInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AddDisksInputProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AddDisksInputProperties. - */ - public static AddDisksInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AddDisksInputProperties deserializedAddDisksInputProperties = new AddDisksInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificDetails".equals(fieldName)) { - deserializedAddDisksInputProperties.providerSpecificDetails - = AddDisksProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAddDisksInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddDisksProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddDisksProviderSpecificInput.java deleted file mode 100644 index ff0356db51a3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddDisksProviderSpecificInput.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Add Disks provider specific input. - */ -@Immutable -public class AddDisksProviderSpecificInput implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "AddDisksProviderSpecificInput"; - - /** - * Creates an instance of AddDisksProviderSpecificInput class. - */ - public AddDisksProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AddDisksProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AddDisksProviderSpecificInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AddDisksProviderSpecificInput. - */ - public static AddDisksProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2AAddDisksInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static AddDisksProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AddDisksProviderSpecificInput deserializedAddDisksProviderSpecificInput - = new AddDisksProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedAddDisksProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAddDisksProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddRecoveryServicesProviderInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddRecoveryServicesProviderInput.java deleted file mode 100644 index 9aca835fca15..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddRecoveryServicesProviderInput.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input required to add a provider. - */ -@Fluent -public final class AddRecoveryServicesProviderInput implements JsonSerializable { - /* - * The properties of an add provider request. - */ - private AddRecoveryServicesProviderInputProperties properties; - - /** - * Creates an instance of AddRecoveryServicesProviderInput class. - */ - public AddRecoveryServicesProviderInput() { - } - - /** - * Get the properties property: The properties of an add provider request. - * - * @return the properties value. - */ - public AddRecoveryServicesProviderInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of an add provider request. - * - * @param properties the properties value to set. - * @return the AddRecoveryServicesProviderInput object itself. - */ - public AddRecoveryServicesProviderInput withProperties(AddRecoveryServicesProviderInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model AddRecoveryServicesProviderInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AddRecoveryServicesProviderInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AddRecoveryServicesProviderInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AddRecoveryServicesProviderInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AddRecoveryServicesProviderInput. - */ - public static AddRecoveryServicesProviderInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AddRecoveryServicesProviderInput deserializedAddRecoveryServicesProviderInput - = new AddRecoveryServicesProviderInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedAddRecoveryServicesProviderInput.properties - = AddRecoveryServicesProviderInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAddRecoveryServicesProviderInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddRecoveryServicesProviderInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddRecoveryServicesProviderInputProperties.java deleted file mode 100644 index 020d88bf5066..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddRecoveryServicesProviderInputProperties.java +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The properties of an add provider request. - */ -@Fluent -public final class AddRecoveryServicesProviderInputProperties - implements JsonSerializable { - /* - * The name of the machine where the provider is getting added. - */ - private String machineName; - - /* - * The Id of the machine where the provider is getting added. - */ - private String machineId; - - /* - * The Bios Id of the machine. - */ - private String biosId; - - /* - * The identity provider input for DRA authentication. - */ - private IdentityProviderInput authenticationIdentityInput; - - /* - * The identity provider input for resource access. - */ - private IdentityProviderInput resourceAccessIdentityInput; - - /* - * The identity provider input for data plane authentication. - */ - private IdentityProviderInput dataPlaneAuthenticationIdentityInput; - - /** - * Creates an instance of AddRecoveryServicesProviderInputProperties class. - */ - public AddRecoveryServicesProviderInputProperties() { - } - - /** - * Get the machineName property: The name of the machine where the provider is getting added. - * - * @return the machineName value. - */ - public String machineName() { - return this.machineName; - } - - /** - * Set the machineName property: The name of the machine where the provider is getting added. - * - * @param machineName the machineName value to set. - * @return the AddRecoveryServicesProviderInputProperties object itself. - */ - public AddRecoveryServicesProviderInputProperties withMachineName(String machineName) { - this.machineName = machineName; - return this; - } - - /** - * Get the machineId property: The Id of the machine where the provider is getting added. - * - * @return the machineId value. - */ - public String machineId() { - return this.machineId; - } - - /** - * Set the machineId property: The Id of the machine where the provider is getting added. - * - * @param machineId the machineId value to set. - * @return the AddRecoveryServicesProviderInputProperties object itself. - */ - public AddRecoveryServicesProviderInputProperties withMachineId(String machineId) { - this.machineId = machineId; - return this; - } - - /** - * Get the biosId property: The Bios Id of the machine. - * - * @return the biosId value. - */ - public String biosId() { - return this.biosId; - } - - /** - * Set the biosId property: The Bios Id of the machine. - * - * @param biosId the biosId value to set. - * @return the AddRecoveryServicesProviderInputProperties object itself. - */ - public AddRecoveryServicesProviderInputProperties withBiosId(String biosId) { - this.biosId = biosId; - return this; - } - - /** - * Get the authenticationIdentityInput property: The identity provider input for DRA authentication. - * - * @return the authenticationIdentityInput value. - */ - public IdentityProviderInput authenticationIdentityInput() { - return this.authenticationIdentityInput; - } - - /** - * Set the authenticationIdentityInput property: The identity provider input for DRA authentication. - * - * @param authenticationIdentityInput the authenticationIdentityInput value to set. - * @return the AddRecoveryServicesProviderInputProperties object itself. - */ - public AddRecoveryServicesProviderInputProperties - withAuthenticationIdentityInput(IdentityProviderInput authenticationIdentityInput) { - this.authenticationIdentityInput = authenticationIdentityInput; - return this; - } - - /** - * Get the resourceAccessIdentityInput property: The identity provider input for resource access. - * - * @return the resourceAccessIdentityInput value. - */ - public IdentityProviderInput resourceAccessIdentityInput() { - return this.resourceAccessIdentityInput; - } - - /** - * Set the resourceAccessIdentityInput property: The identity provider input for resource access. - * - * @param resourceAccessIdentityInput the resourceAccessIdentityInput value to set. - * @return the AddRecoveryServicesProviderInputProperties object itself. - */ - public AddRecoveryServicesProviderInputProperties - withResourceAccessIdentityInput(IdentityProviderInput resourceAccessIdentityInput) { - this.resourceAccessIdentityInput = resourceAccessIdentityInput; - return this; - } - - /** - * Get the dataPlaneAuthenticationIdentityInput property: The identity provider input for data plane authentication. - * - * @return the dataPlaneAuthenticationIdentityInput value. - */ - public IdentityProviderInput dataPlaneAuthenticationIdentityInput() { - return this.dataPlaneAuthenticationIdentityInput; - } - - /** - * Set the dataPlaneAuthenticationIdentityInput property: The identity provider input for data plane authentication. - * - * @param dataPlaneAuthenticationIdentityInput the dataPlaneAuthenticationIdentityInput value to set. - * @return the AddRecoveryServicesProviderInputProperties object itself. - */ - public AddRecoveryServicesProviderInputProperties - withDataPlaneAuthenticationIdentityInput(IdentityProviderInput dataPlaneAuthenticationIdentityInput) { - this.dataPlaneAuthenticationIdentityInput = dataPlaneAuthenticationIdentityInput; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (machineName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property machineName in model AddRecoveryServicesProviderInputProperties")); - } - if (authenticationIdentityInput() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property authenticationIdentityInput in model AddRecoveryServicesProviderInputProperties")); - } else { - authenticationIdentityInput().validate(); - } - if (resourceAccessIdentityInput() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property resourceAccessIdentityInput in model AddRecoveryServicesProviderInputProperties")); - } else { - resourceAccessIdentityInput().validate(); - } - if (dataPlaneAuthenticationIdentityInput() != null) { - dataPlaneAuthenticationIdentityInput().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AddRecoveryServicesProviderInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("machineName", this.machineName); - jsonWriter.writeJsonField("authenticationIdentityInput", this.authenticationIdentityInput); - jsonWriter.writeJsonField("resourceAccessIdentityInput", this.resourceAccessIdentityInput); - jsonWriter.writeStringField("machineId", this.machineId); - jsonWriter.writeStringField("biosId", this.biosId); - jsonWriter.writeJsonField("dataPlaneAuthenticationIdentityInput", this.dataPlaneAuthenticationIdentityInput); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AddRecoveryServicesProviderInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AddRecoveryServicesProviderInputProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AddRecoveryServicesProviderInputProperties. - */ - public static AddRecoveryServicesProviderInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AddRecoveryServicesProviderInputProperties deserializedAddRecoveryServicesProviderInputProperties - = new AddRecoveryServicesProviderInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("machineName".equals(fieldName)) { - deserializedAddRecoveryServicesProviderInputProperties.machineName = reader.getString(); - } else if ("authenticationIdentityInput".equals(fieldName)) { - deserializedAddRecoveryServicesProviderInputProperties.authenticationIdentityInput - = IdentityProviderInput.fromJson(reader); - } else if ("resourceAccessIdentityInput".equals(fieldName)) { - deserializedAddRecoveryServicesProviderInputProperties.resourceAccessIdentityInput - = IdentityProviderInput.fromJson(reader); - } else if ("machineId".equals(fieldName)) { - deserializedAddRecoveryServicesProviderInputProperties.machineId = reader.getString(); - } else if ("biosId".equals(fieldName)) { - deserializedAddRecoveryServicesProviderInputProperties.biosId = reader.getString(); - } else if ("dataPlaneAuthenticationIdentityInput".equals(fieldName)) { - deserializedAddRecoveryServicesProviderInputProperties.dataPlaneAuthenticationIdentityInput - = IdentityProviderInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAddRecoveryServicesProviderInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddVCenterRequest.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddVCenterRequest.java deleted file mode 100644 index 30beddce7b6a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddVCenterRequest.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input required to add vCenter. - */ -@Fluent -public final class AddVCenterRequest implements JsonSerializable { - /* - * The properties of an add vCenter request. - */ - private AddVCenterRequestProperties properties; - - /** - * Creates an instance of AddVCenterRequest class. - */ - public AddVCenterRequest() { - } - - /** - * Get the properties property: The properties of an add vCenter request. - * - * @return the properties value. - */ - public AddVCenterRequestProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AddVCenterRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AddVCenterRequest if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AddVCenterRequest. - */ - public static AddVCenterRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AddVCenterRequest deserializedAddVCenterRequest = new AddVCenterRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedAddVCenterRequest.properties = AddVCenterRequestProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAddVCenterRequest; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddVCenterRequestProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddVCenterRequestProperties.java deleted file mode 100644 index cad3501d1334..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AddVCenterRequestProperties.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The properties of an add vCenter request. - */ -@Fluent -public final class AddVCenterRequestProperties implements JsonSerializable { - /* - * The friendly name of the vCenter. - */ - private String friendlyName; - - /* - * The IP address of the vCenter to be discovered. - */ - private String ipAddress; - - /* - * The process server Id from where the discovery is orchestrated. - */ - private String processServerId; - - /* - * The port number for discovery. - */ - private String port; - - /* - * The account Id which has privileges to discover the vCenter. - */ - private String runAsAccountId; - - /** - * Creates an instance of AddVCenterRequestProperties class. - */ - public AddVCenterRequestProperties() { - } - - /** - * Get the friendlyName property: The friendly name of the vCenter. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 ipAddress property: The IP address of the vCenter to be discovered. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: 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 processServerId property: The process server Id from where the discovery is orchestrated. - * - * @return the processServerId value. - */ - public String processServerId() { - return this.processServerId; - } - - /** - * Set the processServerId property: 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 property: The port number for discovery. - * - * @return the port value. - */ - public String port() { - return this.port; - } - - /** - * Set the port property: 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 runAsAccountId property: The account Id which has privileges to discover the vCenter. - * - * @return the runAsAccountId value. - */ - public String runAsAccountId() { - return this.runAsAccountId; - } - - /** - * Set the runAsAccountId property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("processServerId", this.processServerId); - jsonWriter.writeStringField("port", this.port); - jsonWriter.writeStringField("runAsAccountId", this.runAsAccountId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AddVCenterRequestProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AddVCenterRequestProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AddVCenterRequestProperties. - */ - public static AddVCenterRequestProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AddVCenterRequestProperties deserializedAddVCenterRequestProperties = new AddVCenterRequestProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedAddVCenterRequestProperties.friendlyName = reader.getString(); - } else if ("ipAddress".equals(fieldName)) { - deserializedAddVCenterRequestProperties.ipAddress = reader.getString(); - } else if ("processServerId".equals(fieldName)) { - deserializedAddVCenterRequestProperties.processServerId = reader.getString(); - } else if ("port".equals(fieldName)) { - deserializedAddVCenterRequestProperties.port = reader.getString(); - } else if ("runAsAccountId".equals(fieldName)) { - deserializedAddVCenterRequestProperties.runAsAccountId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAddVCenterRequestProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentAutoUpdateStatus.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentAutoUpdateStatus.java deleted file mode 100644 index 12a4511d37d8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentAutoUpdateStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether the auto update is enabled. - */ -public final class AgentAutoUpdateStatus extends ExpandableStringEnum { - /** - * Static value Disabled for AgentAutoUpdateStatus. - */ - public static final AgentAutoUpdateStatus DISABLED = fromString("Disabled"); - - /** - * Static value Enabled for AgentAutoUpdateStatus. - */ - public static final AgentAutoUpdateStatus ENABLED = fromString("Enabled"); - - /** - * Creates a new instance of AgentAutoUpdateStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AgentAutoUpdateStatus() { - } - - /** - * Creates or finds a AgentAutoUpdateStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding AgentAutoUpdateStatus. - */ - public static AgentAutoUpdateStatus fromString(String name) { - return fromString(name, AgentAutoUpdateStatus.class); - } - - /** - * Gets known AgentAutoUpdateStatus values. - * - * @return known AgentAutoUpdateStatus values. - */ - public static Collection values() { - return values(AgentAutoUpdateStatus.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentDetails.java deleted file mode 100644 index 0f3419248625..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentDetails.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Agent details. - */ -@Immutable -public final class AgentDetails implements JsonSerializable { - /* - * The Id of the agent running on the server. - */ - private String agentId; - - /* - * The Id of the machine to which the agent is registered. - */ - private String machineId; - - /* - * The machine BIOS Id. - */ - private String biosId; - - /* - * The machine FQDN. - */ - private String fqdn; - - /* - * The disks. - */ - private List disks; - - /** - * Creates an instance of AgentDetails class. - */ - public AgentDetails() { - } - - /** - * Get the agentId property: The Id of the agent running on the server. - * - * @return the agentId value. - */ - public String agentId() { - return this.agentId; - } - - /** - * Get the machineId property: The Id of the machine to which the agent is registered. - * - * @return the machineId value. - */ - public String machineId() { - return this.machineId; - } - - /** - * Get the biosId property: The machine BIOS Id. - * - * @return the biosId value. - */ - public String biosId() { - return this.biosId; - } - - /** - * Get the fqdn property: The machine FQDN. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the disks property: The disks. - * - * @return the disks value. - */ - public List disks() { - return this.disks; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (disks() != null) { - disks().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AgentDetails. - */ - public static AgentDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentDetails deserializedAgentDetails = new AgentDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("agentId".equals(fieldName)) { - deserializedAgentDetails.agentId = reader.getString(); - } else if ("machineId".equals(fieldName)) { - deserializedAgentDetails.machineId = reader.getString(); - } else if ("biosId".equals(fieldName)) { - deserializedAgentDetails.biosId = reader.getString(); - } else if ("fqdn".equals(fieldName)) { - deserializedAgentDetails.fqdn = reader.getString(); - } else if ("disks".equals(fieldName)) { - List disks = reader.readArray(reader1 -> AgentDiskDetails.fromJson(reader1)); - deserializedAgentDetails.disks = disks; - } else { - reader.skipChildren(); - } - } - - return deserializedAgentDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentDiskDetails.java deleted file mode 100644 index 599a429d51e3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentDiskDetails.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Agent disk details. - */ -@Immutable -public final class AgentDiskDetails implements JsonSerializable { - /* - * The disk Id. - */ - private String diskId; - - /* - * The disk name. - */ - private String diskName; - - /* - * A value indicating whether the disk is the OS disk. - */ - private String isOSDisk; - - /* - * The disk capacity in bytes. - */ - private Long capacityInBytes; - - /* - * The lun of disk. - */ - private Integer lunId; - - /** - * Creates an instance of AgentDiskDetails class. - */ - public AgentDiskDetails() { - } - - /** - * Get the diskId property: The disk Id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Get the diskName property: The disk name. - * - * @return the diskName value. - */ - public String diskName() { - return this.diskName; - } - - /** - * Get the isOSDisk property: A value indicating whether the disk is the OS disk. - * - * @return the isOSDisk value. - */ - public String isOSDisk() { - return this.isOSDisk; - } - - /** - * Get the capacityInBytes property: The disk capacity in bytes. - * - * @return the capacityInBytes value. - */ - public Long capacityInBytes() { - return this.capacityInBytes; - } - - /** - * Get the lunId property: The lun of disk. - * - * @return the lunId value. - */ - public Integer lunId() { - return this.lunId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AgentDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AgentDiskDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AgentDiskDetails. - */ - public static AgentDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AgentDiskDetails deserializedAgentDiskDetails = new AgentDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedAgentDiskDetails.diskId = reader.getString(); - } else if ("diskName".equals(fieldName)) { - deserializedAgentDiskDetails.diskName = reader.getString(); - } else if ("isOSDisk".equals(fieldName)) { - deserializedAgentDiskDetails.isOSDisk = reader.getString(); - } else if ("capacityInBytes".equals(fieldName)) { - deserializedAgentDiskDetails.capacityInBytes = reader.getNullable(JsonReader::getLong); - } else if ("lunId".equals(fieldName)) { - deserializedAgentDiskDetails.lunId = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedAgentDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentUpgradeBlockedReason.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentUpgradeBlockedReason.java deleted file mode 100644 index 979af78cbb78..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentUpgradeBlockedReason.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for AgentUpgradeBlockedReason. - */ -public final class AgentUpgradeBlockedReason extends ExpandableStringEnum { - /** - * Static value AlreadyOnLatestVersion for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason ALREADY_ON_LATEST_VERSION = fromString("AlreadyOnLatestVersion"); - - /** - * Static value RebootRequired for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason REBOOT_REQUIRED = fromString("RebootRequired"); - - /** - * Static value AgentNoHeartbeat for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason AGENT_NO_HEARTBEAT = fromString("AgentNoHeartbeat"); - - /** - * Static value RcmProxyNoHeartbeat for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason RCM_PROXY_NO_HEARTBEAT = fromString("RcmProxyNoHeartbeat"); - - /** - * Static value ProcessServerNoHeartbeat for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason PROCESS_SERVER_NO_HEARTBEAT = fromString("ProcessServerNoHeartbeat"); - - /** - * Static value IncompatibleApplianceVersion for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason INCOMPATIBLE_APPLIANCE_VERSION - = fromString("IncompatibleApplianceVersion"); - - /** - * Static value NotProtected for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason NOT_PROTECTED = fromString("NotProtected"); - - /** - * Static value UnsupportedProtectionScenario for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason UNSUPPORTED_PROTECTION_SCENARIO - = fromString("UnsupportedProtectionScenario"); - - /** - * Static value DistroIsNotReported for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason DISTRO_IS_NOT_REPORTED = fromString("DistroIsNotReported"); - - /** - * Static value DistroNotSupportedForUpgrade for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason DISTRO_NOT_SUPPORTED_FOR_UPGRADE - = fromString("DistroNotSupportedForUpgrade"); - - /** - * Static value MissingUpgradePath for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason MISSING_UPGRADE_PATH = fromString("MissingUpgradePath"); - - /** - * Static value InvalidAgentVersion for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason INVALID_AGENT_VERSION = fromString("InvalidAgentVersion"); - - /** - * Static value InvalidDriverVersion for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason INVALID_DRIVER_VERSION = fromString("InvalidDriverVersion"); - - /** - * Static value Unknown for AgentUpgradeBlockedReason. - */ - public static final AgentUpgradeBlockedReason UNKNOWN = fromString("Unknown"); - - /** - * Creates a new instance of AgentUpgradeBlockedReason value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AgentUpgradeBlockedReason() { - } - - /** - * Creates or finds a AgentUpgradeBlockedReason from its string representation. - * - * @param name a name to look for. - * @return the corresponding AgentUpgradeBlockedReason. - */ - public static AgentUpgradeBlockedReason fromString(String name) { - return fromString(name, AgentUpgradeBlockedReason.class); - } - - /** - * Gets known AgentUpgradeBlockedReason values. - * - * @return known AgentUpgradeBlockedReason values. - */ - public static Collection values() { - return values(AgentUpgradeBlockedReason.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentVersionStatus.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentVersionStatus.java deleted file mode 100644 index ce17c1cc27d7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AgentVersionStatus.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether security update required. - */ -public final class AgentVersionStatus extends ExpandableStringEnum { - /** - * Static value Supported for AgentVersionStatus. - */ - public static final AgentVersionStatus SUPPORTED = fromString("Supported"); - - /** - * Static value NotSupported for AgentVersionStatus. - */ - public static final AgentVersionStatus NOT_SUPPORTED = fromString("NotSupported"); - - /** - * Static value Deprecated for AgentVersionStatus. - */ - public static final AgentVersionStatus DEPRECATED = fromString("Deprecated"); - - /** - * Static value UpdateRequired for AgentVersionStatus. - */ - public static final AgentVersionStatus UPDATE_REQUIRED = fromString("UpdateRequired"); - - /** - * Static value SecurityUpdateRequired for AgentVersionStatus. - */ - public static final AgentVersionStatus SECURITY_UPDATE_REQUIRED = fromString("SecurityUpdateRequired"); - - /** - * Creates a new instance of AgentVersionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AgentVersionStatus() { - } - - /** - * Creates or finds a AgentVersionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding AgentVersionStatus. - */ - public static AgentVersionStatus fromString(String name) { - return fromString(name, AgentVersionStatus.class); - } - - /** - * Gets known AgentVersionStatus values. - * - * @return known AgentVersionStatus values. - */ - public static Collection values() { - return values(AgentVersionStatus.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Alert.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Alert.java deleted file mode 100644 index 1ce468e4e0b7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Alert.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.AlertInner; - -/** - * An immutable client-side representation of Alert. - */ -public interface Alert { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Alert related data. - * - * @return the properties value. - */ - AlertProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.AlertInner object. - * - * @return the inner object. - */ - AlertInner innerModel(); - - /** - * The entirety of the Alert definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Alert definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Alert definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Alert definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @return the next definition stage. - */ - WithCreate withExistingVault(String resourceName, String resourceGroupName); - } - - /** - * The stage of the Alert definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Alert create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Alert create(Context context); - } - - /** - * The stage of the Alert definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of a configure alert request.. - * - * @param properties The properties of a configure alert request. - * @return the next definition stage. - */ - WithCreate withProperties(ConfigureAlertRequestProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Alert refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Alert refresh(Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AlertCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AlertCollection.java deleted file mode 100644 index d8d85a18a2d9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AlertCollection.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.AlertInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of alerts. - */ -@Fluent -public final class AlertCollection implements JsonSerializable { - /* - * The list of alerts. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of AlertCollection class. - */ - public AlertCollection() { - } - - /** - * Get the value property: The list of alerts. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of alerts. - * - * @param value the value value to set. - * @return the AlertCollection object itself. - */ - public AlertCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the AlertCollection object itself. - */ - public AlertCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AlertCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AlertCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AlertCollection. - */ - public static AlertCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AlertCollection deserializedAlertCollection = new AlertCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> AlertInner.fromJson(reader1)); - deserializedAlertCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAlertCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAlertCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AlertProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AlertProperties.java deleted file mode 100644 index 77419eb49237..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AlertProperties.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The properties of an alert. - */ -@Fluent -public final class AlertProperties implements JsonSerializable { - /* - * A value indicating whether to send email to subscription administrator. - */ - private String sendToOwners; - - /* - * The custom email address for sending emails. - */ - private List customEmailAddresses; - - /* - * The locale for the email notification. - */ - private String locale; - - /** - * Creates an instance of AlertProperties class. - */ - public AlertProperties() { - } - - /** - * Get the sendToOwners property: A value indicating whether to send email to subscription administrator. - * - * @return the sendToOwners value. - */ - public String sendToOwners() { - return this.sendToOwners; - } - - /** - * Set the sendToOwners property: 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 customEmailAddresses property: The custom email address for sending emails. - * - * @return the customEmailAddresses value. - */ - public List customEmailAddresses() { - return this.customEmailAddresses; - } - - /** - * Set the customEmailAddresses property: 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 property: The locale for the email notification. - * - * @return the locale value. - */ - public String locale() { - return this.locale; - } - - /** - * Set the locale property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sendToOwners", this.sendToOwners); - jsonWriter.writeArrayField("customEmailAddresses", this.customEmailAddresses, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("locale", this.locale); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AlertProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AlertProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AlertProperties. - */ - public static AlertProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AlertProperties deserializedAlertProperties = new AlertProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sendToOwners".equals(fieldName)) { - deserializedAlertProperties.sendToOwners = reader.getString(); - } else if ("customEmailAddresses".equals(fieldName)) { - List customEmailAddresses = reader.readArray(reader1 -> reader1.getString()); - deserializedAlertProperties.customEmailAddresses = customEmailAddresses; - } else if ("locale".equals(fieldName)) { - deserializedAlertProperties.locale = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAlertProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AlternateLocationRecoveryOption.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AlternateLocationRecoveryOption.java deleted file mode 100644 index 3a40ea681015..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AlternateLocationRecoveryOption.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The ALR option. - */ -public final class AlternateLocationRecoveryOption extends ExpandableStringEnum { - /** - * Static value CreateVmIfNotFound for AlternateLocationRecoveryOption. - */ - public static final AlternateLocationRecoveryOption CREATE_VM_IF_NOT_FOUND = fromString("CreateVmIfNotFound"); - - /** - * Static value NoAction for AlternateLocationRecoveryOption. - */ - public static final AlternateLocationRecoveryOption NO_ACTION = fromString("NoAction"); - - /** - * Creates a new instance of AlternateLocationRecoveryOption value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AlternateLocationRecoveryOption() { - } - - /** - * Creates or finds a AlternateLocationRecoveryOption from its string representation. - * - * @param name a name to look for. - * @return the corresponding AlternateLocationRecoveryOption. - */ - public static AlternateLocationRecoveryOption fromString(String name) { - return fromString(name, AlternateLocationRecoveryOption.class); - } - - /** - * Gets known AlternateLocationRecoveryOption values. - * - * @return known AlternateLocationRecoveryOption values. - */ - public static Collection values() { - return values(AlternateLocationRecoveryOption.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplianceCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplianceCollection.java deleted file mode 100644 index 416aff6afd00..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplianceCollection.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationApplianceInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of appliance details. - */ -@Fluent -public final class ApplianceCollection implements JsonSerializable { - /* - * The appliance details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of ApplianceCollection class. - */ - public ApplianceCollection() { - } - - /** - * Get the value property: The appliance details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The appliance details. - * - * @param value the value value to set. - * @return the ApplianceCollection object itself. - */ - public ApplianceCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the ApplianceCollection object itself. - */ - public ApplianceCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApplianceCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApplianceCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ApplianceCollection. - */ - public static ApplianceCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApplianceCollection deserializedApplianceCollection = new ApplianceCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ReplicationApplianceInner.fromJson(reader1)); - deserializedApplianceCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedApplianceCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedApplianceCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplianceMonitoringDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplianceMonitoringDetails.java deleted file mode 100644 index 8245b0dc92d5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplianceMonitoringDetails.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Appliance details of the migration item. - */ -@Immutable -public final class ApplianceMonitoringDetails implements JsonSerializable { - /* - * The appliance CPU details. - */ - private ApplianceResourceDetails cpuDetails; - - /* - * The appliance RAM details. - */ - private ApplianceResourceDetails ramDetails; - - /* - * The appliance datastore snapshot details. - */ - private List datastoreSnapshot; - - /* - * The disk replication details. - */ - private ApplianceResourceDetails disksReplicationDetails; - - /* - * The ESXi NFC buffer details. - */ - private ApplianceResourceDetails esxiNfcBuffer; - - /* - * The appliance network bandwidth details. - */ - private ApplianceResourceDetails networkBandwidth; - - /** - * Creates an instance of ApplianceMonitoringDetails class. - */ - public ApplianceMonitoringDetails() { - } - - /** - * Get the cpuDetails property: The appliance CPU details. - * - * @return the cpuDetails value. - */ - public ApplianceResourceDetails cpuDetails() { - return this.cpuDetails; - } - - /** - * Get the ramDetails property: The appliance RAM details. - * - * @return the ramDetails value. - */ - public ApplianceResourceDetails ramDetails() { - return this.ramDetails; - } - - /** - * Get the datastoreSnapshot property: The appliance datastore snapshot details. - * - * @return the datastoreSnapshot value. - */ - public List datastoreSnapshot() { - return this.datastoreSnapshot; - } - - /** - * Get the disksReplicationDetails property: The disk replication details. - * - * @return the disksReplicationDetails value. - */ - public ApplianceResourceDetails disksReplicationDetails() { - return this.disksReplicationDetails; - } - - /** - * Get the esxiNfcBuffer property: The ESXi NFC buffer details. - * - * @return the esxiNfcBuffer value. - */ - public ApplianceResourceDetails esxiNfcBuffer() { - return this.esxiNfcBuffer; - } - - /** - * Get the networkBandwidth property: The appliance network bandwidth details. - * - * @return the networkBandwidth value. - */ - public ApplianceResourceDetails networkBandwidth() { - return this.networkBandwidth; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (cpuDetails() != null) { - cpuDetails().validate(); - } - if (ramDetails() != null) { - ramDetails().validate(); - } - if (datastoreSnapshot() != null) { - datastoreSnapshot().forEach(e -> e.validate()); - } - if (disksReplicationDetails() != null) { - disksReplicationDetails().validate(); - } - if (esxiNfcBuffer() != null) { - esxiNfcBuffer().validate(); - } - if (networkBandwidth() != null) { - networkBandwidth().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApplianceMonitoringDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApplianceMonitoringDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ApplianceMonitoringDetails. - */ - public static ApplianceMonitoringDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApplianceMonitoringDetails deserializedApplianceMonitoringDetails = new ApplianceMonitoringDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("cpuDetails".equals(fieldName)) { - deserializedApplianceMonitoringDetails.cpuDetails = ApplianceResourceDetails.fromJson(reader); - } else if ("ramDetails".equals(fieldName)) { - deserializedApplianceMonitoringDetails.ramDetails = ApplianceResourceDetails.fromJson(reader); - } else if ("datastoreSnapshot".equals(fieldName)) { - List datastoreSnapshot - = reader.readArray(reader1 -> DataStoreUtilizationDetails.fromJson(reader1)); - deserializedApplianceMonitoringDetails.datastoreSnapshot = datastoreSnapshot; - } else if ("disksReplicationDetails".equals(fieldName)) { - deserializedApplianceMonitoringDetails.disksReplicationDetails - = ApplianceResourceDetails.fromJson(reader); - } else if ("esxiNfcBuffer".equals(fieldName)) { - deserializedApplianceMonitoringDetails.esxiNfcBuffer = ApplianceResourceDetails.fromJson(reader); - } else if ("networkBandwidth".equals(fieldName)) { - deserializedApplianceMonitoringDetails.networkBandwidth = ApplianceResourceDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedApplianceMonitoringDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplianceResourceDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplianceResourceDetails.java deleted file mode 100644 index f14407f2988e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplianceResourceDetails.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details of the appliance resource. - */ -@Immutable -public final class ApplianceResourceDetails implements JsonSerializable { - /* - * A value indicating the total capacity of appliance resource. - */ - private Long capacity; - - /* - * A value indicating the utilization percentage by gateway agent on appliance. - */ - private Double processUtilization; - - /* - * A value indicating the total utilization percentage for all processes on the appliance. - */ - private Double totalUtilization; - - /* - * A value indicating the status of appliance resource. - */ - private String status; - - /** - * Creates an instance of ApplianceResourceDetails class. - */ - public ApplianceResourceDetails() { - } - - /** - * Get the capacity property: A value indicating the total capacity of appliance resource. - * - * @return the capacity value. - */ - public Long capacity() { - return this.capacity; - } - - /** - * Get the processUtilization property: A value indicating the utilization percentage by gateway agent on appliance. - * - * @return the processUtilization value. - */ - public Double processUtilization() { - return this.processUtilization; - } - - /** - * Get the totalUtilization property: A value indicating the total utilization percentage for all processes on the - * appliance. - * - * @return the totalUtilization value. - */ - public Double totalUtilization() { - return this.totalUtilization; - } - - /** - * Get the status property: A value indicating the status of appliance resource. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApplianceResourceDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApplianceResourceDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ApplianceResourceDetails. - */ - public static ApplianceResourceDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApplianceResourceDetails deserializedApplianceResourceDetails = new ApplianceResourceDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("capacity".equals(fieldName)) { - deserializedApplianceResourceDetails.capacity = reader.getNullable(JsonReader::getLong); - } else if ("processUtilization".equals(fieldName)) { - deserializedApplianceResourceDetails.processUtilization = reader.getNullable(JsonReader::getDouble); - } else if ("totalUtilization".equals(fieldName)) { - deserializedApplianceResourceDetails.totalUtilization = reader.getNullable(JsonReader::getDouble); - } else if ("status".equals(fieldName)) { - deserializedApplianceResourceDetails.status = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedApplianceResourceDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplianceSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplianceSpecificDetails.java deleted file mode 100644 index 94452d399e79..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplianceSpecificDetails.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Appliance specific details. - */ -@Immutable -public class ApplianceSpecificDetails implements JsonSerializable { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "ApplianceSpecificDetails"; - - /** - * Creates an instance of ApplianceSpecificDetails class. - */ - public ApplianceSpecificDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApplianceSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApplianceSpecificDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ApplianceSpecificDetails. - */ - public static ApplianceSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmApplianceSpecificDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ApplianceSpecificDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApplianceSpecificDetails deserializedApplianceSpecificDetails = new ApplianceSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedApplianceSpecificDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedApplianceSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplyRecoveryPointInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplyRecoveryPointInput.java deleted file mode 100644 index 807cae4eb20e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplyRecoveryPointInput.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input to apply recovery point. - */ -@Fluent -public final class ApplyRecoveryPointInput implements JsonSerializable { - /* - * The input properties to apply recovery point. - */ - private ApplyRecoveryPointInputProperties properties; - - /** - * Creates an instance of ApplyRecoveryPointInput class. - */ - public ApplyRecoveryPointInput() { - } - - /** - * Get the properties property: The input properties to apply recovery point. - * - * @return the properties value. - */ - public ApplyRecoveryPointInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model ApplyRecoveryPointInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ApplyRecoveryPointInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApplyRecoveryPointInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApplyRecoveryPointInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ApplyRecoveryPointInput. - */ - public static ApplyRecoveryPointInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApplyRecoveryPointInput deserializedApplyRecoveryPointInput = new ApplyRecoveryPointInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedApplyRecoveryPointInput.properties = ApplyRecoveryPointInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedApplyRecoveryPointInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplyRecoveryPointInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplyRecoveryPointInputProperties.java deleted file mode 100644 index 0f81c3846d28..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplyRecoveryPointInputProperties.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input properties to apply recovery point. - */ -@Fluent -public final class ApplyRecoveryPointInputProperties implements JsonSerializable { - /* - * The recovery point Id. - */ - private String recoveryPointId; - - /* - * Provider specific input for applying recovery point. - */ - private ApplyRecoveryPointProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of ApplyRecoveryPointInputProperties class. - */ - public ApplyRecoveryPointInputProperties() { - } - - /** - * Get the recoveryPointId property: The recovery point Id. - * - * @return the recoveryPointId value. - */ - public String recoveryPointId() { - return this.recoveryPointId; - } - - /** - * Set the recoveryPointId property: 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 the providerSpecificDetails property: Provider specific input for applying recovery point. - * - * @return the providerSpecificDetails value. - */ - public ApplyRecoveryPointProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property providerSpecificDetails in model ApplyRecoveryPointInputProperties")); - } else { - providerSpecificDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ApplyRecoveryPointInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApplyRecoveryPointInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApplyRecoveryPointInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ApplyRecoveryPointInputProperties. - */ - public static ApplyRecoveryPointInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApplyRecoveryPointInputProperties deserializedApplyRecoveryPointInputProperties - = new ApplyRecoveryPointInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificDetails".equals(fieldName)) { - deserializedApplyRecoveryPointInputProperties.providerSpecificDetails - = ApplyRecoveryPointProviderSpecificInput.fromJson(reader); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedApplyRecoveryPointInputProperties.recoveryPointId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedApplyRecoveryPointInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplyRecoveryPointProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplyRecoveryPointProviderSpecificInput.java deleted file mode 100644 index 1fa7825e5fd7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ApplyRecoveryPointProviderSpecificInput.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific input for apply recovery point. - */ -@Immutable -public class ApplyRecoveryPointProviderSpecificInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "ApplyRecoveryPointProviderSpecificInput"; - - /** - * Creates an instance of ApplyRecoveryPointProviderSpecificInput class. - */ - public ApplyRecoveryPointProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApplyRecoveryPointProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApplyRecoveryPointProviderSpecificInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ApplyRecoveryPointProviderSpecificInput. - */ - public static ApplyRecoveryPointProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2AApplyRecoveryPointInput.fromJson(readerToUse.reset()); - } else if ("A2ACrossClusterMigration".equals(discriminatorValue)) { - return A2ACrossClusterMigrationApplyRecoveryPointInput.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzure".equals(discriminatorValue)) { - return HyperVReplicaAzureApplyRecoveryPointInput.fromJson(readerToUse.reset()); - } else if ("InMageAzureV2".equals(discriminatorValue)) { - return InMageAzureV2ApplyRecoveryPointInput.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmApplyRecoveryPointInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ApplyRecoveryPointProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ApplyRecoveryPointProviderSpecificInput deserializedApplyRecoveryPointProviderSpecificInput - = new ApplyRecoveryPointProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedApplyRecoveryPointProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedApplyRecoveryPointProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AsrJobDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AsrJobDetails.java deleted file mode 100644 index 10aaf7749a6d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AsrJobDetails.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * This class represents job details based on specific job type. - */ -@Fluent -public final class AsrJobDetails extends JobDetails { - /* - * Gets the type of job details (see JobDetailsTypes enum for possible values). - */ - private String instanceType = "AsrJobDetails"; - - /** - * Creates an instance of AsrJobDetails class. - */ - public AsrJobDetails() { - } - - /** - * Get the instanceType property: Gets the type of job details (see JobDetailsTypes enum for possible values). - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * {@inheritDoc} - */ - @Override - public AsrJobDetails withAffectedObjectDetails(Map affectedObjectDetails) { - super.withAffectedObjectDetails(affectedObjectDetails); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("affectedObjectDetails", affectedObjectDetails(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AsrJobDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AsrJobDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AsrJobDetails. - */ - public static AsrJobDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AsrJobDetails deserializedAsrJobDetails = new AsrJobDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("affectedObjectDetails".equals(fieldName)) { - Map affectedObjectDetails = reader.readMap(reader1 -> reader1.getString()); - deserializedAsrJobDetails.withAffectedObjectDetails(affectedObjectDetails); - } else if ("instanceType".equals(fieldName)) { - deserializedAsrJobDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAsrJobDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AsrTask.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AsrTask.java deleted file mode 100644 index a61c683a82c2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AsrTask.java +++ /dev/null @@ -1,429 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * Task of the Job. - */ -@Fluent -public final class AsrTask implements JsonSerializable { - /* - * The Id. - */ - private String taskId; - - /* - * The unique Task name. - */ - private String name; - - /* - * The start time. - */ - private OffsetDateTime startTime; - - /* - * The end time. - */ - private OffsetDateTime endTime; - - /* - * The state/actions applicable on this task. - */ - private List allowedActions; - - /* - * The name. - */ - private String friendlyName; - - /* - * The State. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. - */ - private String state; - - /* - * The description of the task state. For example - For Succeeded state, description can be Completed, - * PartiallySucceeded, CompletedWithInformation or Skipped. - */ - private String stateDescription; - - /* - * The type of task. Details in CustomDetails property depend on this type. - */ - private String taskType; - - /* - * The custom task details based on the task type. - */ - 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. - */ - private GroupTaskDetails groupTaskCustomDetails; - - /* - * The task error details. - */ - private List errors; - - /** - * Creates an instance of AsrTask class. - */ - public AsrTask() { - } - - /** - * Get the taskId property: The Id. - * - * @return the taskId value. - */ - public String taskId() { - return this.taskId; - } - - /** - * Set the taskId property: 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 name property: The unique Task name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 startTime property: The start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start time. - * - * @param startTime the startTime value to set. - * @return the AsrTask object itself. - */ - public AsrTask withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: The end time. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The end time. - * - * @param endTime the endTime value to set. - * @return the AsrTask object itself. - */ - public AsrTask withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the allowedActions property: The state/actions applicable on this task. - * - * @return the allowedActions value. - */ - public List allowedActions() { - return this.allowedActions; - } - - /** - * Set the allowedActions property: 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 friendlyName property: The name. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 property: 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 property: 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 stateDescription property: 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 stateDescription property: 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 taskType property: The type of task. Details in CustomDetails property depend on this type. - * - * @return the taskType value. - */ - public String taskType() { - return this.taskType; - } - - /** - * Set the taskType property: 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 customDetails property: The custom task details based on the task type. - * - * @return the customDetails value. - */ - public TaskTypeDetails customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: 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 groupTaskCustomDetails property: 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 groupTaskCustomDetails property: 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 errors property: The task error details. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Set the errors property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customDetails() != null) { - customDetails().validate(); - } - if (groupTaskCustomDetails() != null) { - groupTaskCustomDetails().validate(); - } - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("taskId", this.taskId); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("startTime", - this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); - jsonWriter.writeStringField("endTime", - this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); - jsonWriter.writeArrayField("allowedActions", this.allowedActions, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("state", this.state); - jsonWriter.writeStringField("stateDescription", this.stateDescription); - jsonWriter.writeStringField("taskType", this.taskType); - jsonWriter.writeJsonField("customDetails", this.customDetails); - jsonWriter.writeJsonField("groupTaskCustomDetails", this.groupTaskCustomDetails); - jsonWriter.writeArrayField("errors", this.errors, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AsrTask from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AsrTask if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the AsrTask. - */ - public static AsrTask fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AsrTask deserializedAsrTask = new AsrTask(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("taskId".equals(fieldName)) { - deserializedAsrTask.taskId = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAsrTask.name = reader.getString(); - } else if ("startTime".equals(fieldName)) { - deserializedAsrTask.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTime".equals(fieldName)) { - deserializedAsrTask.endTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("allowedActions".equals(fieldName)) { - List allowedActions = reader.readArray(reader1 -> reader1.getString()); - deserializedAsrTask.allowedActions = allowedActions; - } else if ("friendlyName".equals(fieldName)) { - deserializedAsrTask.friendlyName = reader.getString(); - } else if ("state".equals(fieldName)) { - deserializedAsrTask.state = reader.getString(); - } else if ("stateDescription".equals(fieldName)) { - deserializedAsrTask.stateDescription = reader.getString(); - } else if ("taskType".equals(fieldName)) { - deserializedAsrTask.taskType = reader.getString(); - } else if ("customDetails".equals(fieldName)) { - deserializedAsrTask.customDetails = TaskTypeDetails.fromJson(reader); - } else if ("groupTaskCustomDetails".equals(fieldName)) { - deserializedAsrTask.groupTaskCustomDetails = GroupTaskDetails.fromJson(reader); - } else if ("errors".equals(fieldName)) { - List errors = reader.readArray(reader1 -> JobErrorDetails.fromJson(reader1)); - deserializedAsrTask.errors = errors; - } else { - reader.skipChildren(); - } - } - - return deserializedAsrTask; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AutoProtectionOfDataDisk.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AutoProtectionOfDataDisk.java deleted file mode 100644 index 643061e5e1c0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AutoProtectionOfDataDisk.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether the auto protection is enabled. - */ -public final class AutoProtectionOfDataDisk extends ExpandableStringEnum { - /** - * Static value Disabled for AutoProtectionOfDataDisk. - */ - public static final AutoProtectionOfDataDisk DISABLED = fromString("Disabled"); - - /** - * Static value Enabled for AutoProtectionOfDataDisk. - */ - public static final AutoProtectionOfDataDisk ENABLED = fromString("Enabled"); - - /** - * Creates a new instance of AutoProtectionOfDataDisk value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AutoProtectionOfDataDisk() { - } - - /** - * Creates or finds a AutoProtectionOfDataDisk from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutoProtectionOfDataDisk. - */ - public static AutoProtectionOfDataDisk fromString(String name) { - return fromString(name, AutoProtectionOfDataDisk.class); - } - - /** - * Gets known AutoProtectionOfDataDisk values. - * - * @return known AutoProtectionOfDataDisk values. - */ - public static Collection values() { - return values(AutoProtectionOfDataDisk.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AutomationAccountAuthenticationType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AutomationAccountAuthenticationType.java deleted file mode 100644 index b2a805c716d6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AutomationAccountAuthenticationType.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating the type authentication to use for automation Account. - */ -public final class AutomationAccountAuthenticationType - extends ExpandableStringEnum { - /** - * Static value RunAsAccount for AutomationAccountAuthenticationType. - */ - public static final AutomationAccountAuthenticationType RUN_AS_ACCOUNT = fromString("RunAsAccount"); - - /** - * Static value SystemAssignedIdentity for AutomationAccountAuthenticationType. - */ - public static final AutomationAccountAuthenticationType SYSTEM_ASSIGNED_IDENTITY - = fromString("SystemAssignedIdentity"); - - /** - * Creates a new instance of AutomationAccountAuthenticationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AutomationAccountAuthenticationType() { - } - - /** - * Creates or finds a AutomationAccountAuthenticationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationAccountAuthenticationType. - */ - public static AutomationAccountAuthenticationType fromString(String name) { - return fromString(name, AutomationAccountAuthenticationType.class); - } - - /** - * Gets known AutomationAccountAuthenticationType values. - * - * @return known AutomationAccountAuthenticationType values. - */ - public static Collection values() { - return values(AutomationAccountAuthenticationType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AutomationRunbookTaskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AutomationRunbookTaskDetails.java deleted file mode 100644 index 47120860e34a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AutomationRunbookTaskDetails.java +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * This class represents the task details for an automation runbook. - */ -@Fluent -public final class AutomationRunbookTaskDetails extends TaskTypeDetails { - /* - * The type of task details. - */ - private String instanceType = "AutomationRunbookTaskDetails"; - - /* - * The recovery plan task name. - */ - private String name; - - /* - * The cloud service of the automation runbook account. - */ - private String cloudServiceName; - - /* - * The subscription Id of the automation runbook account. - */ - private String subscriptionId; - - /* - * The automation account name of the runbook. - */ - private String accountName; - - /* - * The runbook Id. - */ - private String runbookId; - - /* - * The runbook name. - */ - private String runbookName; - - /* - * The job Id of the runbook execution. - */ - private String jobId; - - /* - * The execution output of the runbook. - */ - private String jobOutput; - - /* - * A value indicating whether it is a primary side script or not. - */ - private Boolean isPrimarySideScript; - - /** - * Creates an instance of AutomationRunbookTaskDetails class. - */ - public AutomationRunbookTaskDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the name property: The recovery plan task name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 cloudServiceName property: The cloud service of the automation runbook account. - * - * @return the cloudServiceName value. - */ - public String cloudServiceName() { - return this.cloudServiceName; - } - - /** - * Set the cloudServiceName property: 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 subscriptionId property: The subscription Id of the automation runbook account. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: 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 accountName property: The automation account name of the runbook. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Set the accountName property: 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 runbookId property: The runbook Id. - * - * @return the runbookId value. - */ - public String runbookId() { - return this.runbookId; - } - - /** - * Set the runbookId property: 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 runbookName property: The runbook name. - * - * @return the runbookName value. - */ - public String runbookName() { - return this.runbookName; - } - - /** - * Set the runbookName property: 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 jobId property: The job Id of the runbook execution. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Set the jobId property: 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 jobOutput property: The execution output of the runbook. - * - * @return the jobOutput value. - */ - public String jobOutput() { - return this.jobOutput; - } - - /** - * Set the jobOutput property: 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 the isPrimarySideScript property: A value indicating whether it is a primary side script or not. - * - * @return the isPrimarySideScript value. - */ - public Boolean isPrimarySideScript() { - return this.isPrimarySideScript; - } - - /** - * Set the isPrimarySideScript property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("cloudServiceName", this.cloudServiceName); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("accountName", this.accountName); - jsonWriter.writeStringField("runbookId", this.runbookId); - jsonWriter.writeStringField("runbookName", this.runbookName); - jsonWriter.writeStringField("jobId", this.jobId); - jsonWriter.writeStringField("jobOutput", this.jobOutput); - jsonWriter.writeBooleanField("isPrimarySideScript", this.isPrimarySideScript); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AutomationRunbookTaskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AutomationRunbookTaskDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AutomationRunbookTaskDetails. - */ - public static AutomationRunbookTaskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AutomationRunbookTaskDetails deserializedAutomationRunbookTaskDetails = new AutomationRunbookTaskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedAutomationRunbookTaskDetails.instanceType = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAutomationRunbookTaskDetails.name = reader.getString(); - } else if ("cloudServiceName".equals(fieldName)) { - deserializedAutomationRunbookTaskDetails.cloudServiceName = reader.getString(); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAutomationRunbookTaskDetails.subscriptionId = reader.getString(); - } else if ("accountName".equals(fieldName)) { - deserializedAutomationRunbookTaskDetails.accountName = reader.getString(); - } else if ("runbookId".equals(fieldName)) { - deserializedAutomationRunbookTaskDetails.runbookId = reader.getString(); - } else if ("runbookName".equals(fieldName)) { - deserializedAutomationRunbookTaskDetails.runbookName = reader.getString(); - } else if ("jobId".equals(fieldName)) { - deserializedAutomationRunbookTaskDetails.jobId = reader.getString(); - } else if ("jobOutput".equals(fieldName)) { - deserializedAutomationRunbookTaskDetails.jobOutput = reader.getString(); - } else if ("isPrimarySideScript".equals(fieldName)) { - deserializedAutomationRunbookTaskDetails.isPrimarySideScript - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAutomationRunbookTaskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureFabricCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureFabricCreationInput.java deleted file mode 100644 index 63a83fda249a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureFabricCreationInput.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Fabric provider specific settings. - */ -@Fluent -public final class AzureFabricCreationInput extends FabricSpecificCreationInput { - /* - * Gets the class type. - */ - private String instanceType = "Azure"; - - /* - * The Location. - */ - private String location; - - /** - * Creates an instance of AzureFabricCreationInput class. - */ - public AzureFabricCreationInput() { - } - - /** - * Get the instanceType property: Gets the class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the location property: The Location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location. - * - * @param location the location value to set. - * @return the AzureFabricCreationInput object itself. - */ - public AzureFabricCreationInput withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureFabricCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureFabricCreationInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureFabricCreationInput. - */ - public static AzureFabricCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureFabricCreationInput deserializedAzureFabricCreationInput = new AzureFabricCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedAzureFabricCreationInput.instanceType = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedAzureFabricCreationInput.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureFabricCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureFabricSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureFabricSpecificDetails.java deleted file mode 100644 index 2e996d0b244e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureFabricSpecificDetails.java +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Azure Fabric Specific Details. - */ -@Fluent -public final class AzureFabricSpecificDetails extends FabricSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "Azure"; - - /* - * The Location for the Azure fabric. - */ - private String location; - - /* - * The container Ids for the Azure fabric. - */ - private List containerIds; - - /* - * The zones. - */ - private List zones; - - /* - * The ExtendedLocations. - */ - private List extendedLocations; - - /* - * The location details. - */ - private List locationDetails; - - /** - * Creates an instance of AzureFabricSpecificDetails class. - */ - public AzureFabricSpecificDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the location property: The Location for the Azure fabric. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: 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 containerIds property: The container Ids for the Azure fabric. - * - * @return the containerIds value. - */ - public List containerIds() { - return this.containerIds; - } - - /** - * Set the containerIds property: 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; - } - - /** - * Get the zones property: The zones. - * - * @return the zones value. - */ - public List zones() { - return this.zones; - } - - /** - * Set the zones property: The zones. - * - * @param zones the zones value to set. - * @return the AzureFabricSpecificDetails object itself. - */ - public AzureFabricSpecificDetails withZones(List zones) { - this.zones = zones; - return this; - } - - /** - * Get the extendedLocations property: The ExtendedLocations. - * - * @return the extendedLocations value. - */ - public List extendedLocations() { - return this.extendedLocations; - } - - /** - * Set the extendedLocations property: The ExtendedLocations. - * - * @param extendedLocations the extendedLocations value to set. - * @return the AzureFabricSpecificDetails object itself. - */ - public AzureFabricSpecificDetails withExtendedLocations(List extendedLocations) { - this.extendedLocations = extendedLocations; - return this; - } - - /** - * Get the locationDetails property: The location details. - * - * @return the locationDetails value. - */ - public List locationDetails() { - return this.locationDetails; - } - - /** - * Set the locationDetails property: The location details. - * - * @param locationDetails the locationDetails value to set. - * @return the AzureFabricSpecificDetails object itself. - */ - public AzureFabricSpecificDetails withLocationDetails(List locationDetails) { - this.locationDetails = locationDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (zones() != null) { - zones().forEach(e -> e.validate()); - } - if (extendedLocations() != null) { - extendedLocations().forEach(e -> e.validate()); - } - if (locationDetails() != null) { - locationDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeArrayField("containerIds", this.containerIds, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("extendedLocations", this.extendedLocations, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("locationDetails", this.locationDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureFabricSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureFabricSpecificDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureFabricSpecificDetails. - */ - public static AzureFabricSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureFabricSpecificDetails deserializedAzureFabricSpecificDetails = new AzureFabricSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedAzureFabricSpecificDetails.instanceType = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedAzureFabricSpecificDetails.location = reader.getString(); - } else if ("containerIds".equals(fieldName)) { - List containerIds = reader.readArray(reader1 -> reader1.getString()); - deserializedAzureFabricSpecificDetails.containerIds = containerIds; - } else if ("zones".equals(fieldName)) { - List zones = reader.readArray(reader1 -> A2AZoneDetails.fromJson(reader1)); - deserializedAzureFabricSpecificDetails.zones = zones; - } else if ("extendedLocations".equals(fieldName)) { - List extendedLocations - = reader.readArray(reader1 -> A2AExtendedLocationDetails.fromJson(reader1)); - deserializedAzureFabricSpecificDetails.extendedLocations = extendedLocations; - } else if ("locationDetails".equals(fieldName)) { - List locationDetails - = reader.readArray(reader1 -> A2AFabricSpecificLocationDetails.fromJson(reader1)); - deserializedAzureFabricSpecificDetails.locationDetails = locationDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedAzureFabricSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureToAzureCreateNetworkMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureToAzureCreateNetworkMappingInput.java deleted file mode 100644 index b0e9577c0563..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureToAzureCreateNetworkMappingInput.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Create network mappings input properties/behavior specific to Azure to Azure Network mapping. - */ -@Fluent -public final class AzureToAzureCreateNetworkMappingInput extends FabricSpecificCreateNetworkMappingInput { - /* - * The instance type. - */ - private String instanceType = "AzureToAzure"; - - /* - * The primary azure vnet Id. - */ - private String primaryNetworkId; - - /** - * Creates an instance of AzureToAzureCreateNetworkMappingInput class. - */ - public AzureToAzureCreateNetworkMappingInput() { - } - - /** - * Get the instanceType property: The instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the primaryNetworkId property: The primary azure vnet Id. - * - * @return the primaryNetworkId value. - */ - public String primaryNetworkId() { - return this.primaryNetworkId; - } - - /** - * Set the primaryNetworkId property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (primaryNetworkId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property primaryNetworkId in model AzureToAzureCreateNetworkMappingInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AzureToAzureCreateNetworkMappingInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryNetworkId", this.primaryNetworkId); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureToAzureCreateNetworkMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureToAzureCreateNetworkMappingInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AzureToAzureCreateNetworkMappingInput. - */ - public static AzureToAzureCreateNetworkMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureToAzureCreateNetworkMappingInput deserializedAzureToAzureCreateNetworkMappingInput - = new AzureToAzureCreateNetworkMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primaryNetworkId".equals(fieldName)) { - deserializedAzureToAzureCreateNetworkMappingInput.primaryNetworkId = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedAzureToAzureCreateNetworkMappingInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureToAzureCreateNetworkMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureToAzureNetworkMappingSettings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureToAzureNetworkMappingSettings.java deleted file mode 100644 index bf989a578bed..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureToAzureNetworkMappingSettings.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A2A Network Mapping fabric specific settings. - */ -@Fluent -public final class AzureToAzureNetworkMappingSettings extends NetworkMappingFabricSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "AzureToAzure"; - - /* - * The primary fabric location. - */ - private String primaryFabricLocation; - - /* - * The recovery fabric location. - */ - private String recoveryFabricLocation; - - /** - * Creates an instance of AzureToAzureNetworkMappingSettings class. - */ - public AzureToAzureNetworkMappingSettings() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the primaryFabricLocation property: The primary fabric location. - * - * @return the primaryFabricLocation value. - */ - public String primaryFabricLocation() { - return this.primaryFabricLocation; - } - - /** - * Set the primaryFabricLocation property: 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 recoveryFabricLocation property: The recovery fabric location. - * - * @return the recoveryFabricLocation value. - */ - public String recoveryFabricLocation() { - return this.recoveryFabricLocation; - } - - /** - * Set the recoveryFabricLocation property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("primaryFabricLocation", this.primaryFabricLocation); - jsonWriter.writeStringField("recoveryFabricLocation", this.recoveryFabricLocation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureToAzureNetworkMappingSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureToAzureNetworkMappingSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureToAzureNetworkMappingSettings. - */ - public static AzureToAzureNetworkMappingSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureToAzureNetworkMappingSettings deserializedAzureToAzureNetworkMappingSettings - = new AzureToAzureNetworkMappingSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedAzureToAzureNetworkMappingSettings.instanceType = reader.getString(); - } else if ("primaryFabricLocation".equals(fieldName)) { - deserializedAzureToAzureNetworkMappingSettings.primaryFabricLocation = reader.getString(); - } else if ("recoveryFabricLocation".equals(fieldName)) { - deserializedAzureToAzureNetworkMappingSettings.recoveryFabricLocation = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureToAzureNetworkMappingSettings; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureToAzureUpdateNetworkMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureToAzureUpdateNetworkMappingInput.java deleted file mode 100644 index d578ed29294f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureToAzureUpdateNetworkMappingInput.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Updates network mappings input. - */ -@Fluent -public final class AzureToAzureUpdateNetworkMappingInput extends FabricSpecificUpdateNetworkMappingInput { - /* - * The instance type. - */ - private String instanceType = "AzureToAzure"; - - /* - * The primary azure vnet Id. - */ - private String primaryNetworkId; - - /** - * Creates an instance of AzureToAzureUpdateNetworkMappingInput class. - */ - public AzureToAzureUpdateNetworkMappingInput() { - } - - /** - * Get the instanceType property: The instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the primaryNetworkId property: The primary azure vnet Id. - * - * @return the primaryNetworkId value. - */ - public String primaryNetworkId() { - return this.primaryNetworkId; - } - - /** - * Set the primaryNetworkId property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("primaryNetworkId", this.primaryNetworkId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureToAzureUpdateNetworkMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureToAzureUpdateNetworkMappingInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureToAzureUpdateNetworkMappingInput. - */ - public static AzureToAzureUpdateNetworkMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureToAzureUpdateNetworkMappingInput deserializedAzureToAzureUpdateNetworkMappingInput - = new AzureToAzureUpdateNetworkMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedAzureToAzureUpdateNetworkMappingInput.instanceType = reader.getString(); - } else if ("primaryNetworkId".equals(fieldName)) { - deserializedAzureToAzureUpdateNetworkMappingInput.primaryNetworkId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureToAzureUpdateNetworkMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureToAzureVmSyncedConfigDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureToAzureVmSyncedConfigDetails.java deleted file mode 100644 index f198948425d0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureToAzureVmSyncedConfigDetails.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Azure to Azure VM synced configuration details. - */ -@Fluent -public final class AzureToAzureVmSyncedConfigDetails implements JsonSerializable { - /* - * The Azure VM tags. - */ - private Map tags; - - /* - * The Azure VM input endpoints. - */ - private List inputEndpoints; - - /** - * Creates an instance of AzureToAzureVmSyncedConfigDetails class. - */ - public AzureToAzureVmSyncedConfigDetails() { - } - - /** - * Get the tags property: The Azure VM tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: 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 inputEndpoints property: The Azure VM input endpoints. - * - * @return the inputEndpoints value. - */ - public List inputEndpoints() { - return this.inputEndpoints; - } - - /** - * Set the inputEndpoints property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (inputEndpoints() != null) { - inputEndpoints().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("inputEndpoints", this.inputEndpoints, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureToAzureVmSyncedConfigDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureToAzureVmSyncedConfigDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureToAzureVmSyncedConfigDetails. - */ - public static AzureToAzureVmSyncedConfigDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureToAzureVmSyncedConfigDetails deserializedAzureToAzureVmSyncedConfigDetails - = new AzureToAzureVmSyncedConfigDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureToAzureVmSyncedConfigDetails.tags = tags; - } else if ("inputEndpoints".equals(fieldName)) { - List inputEndpoints = reader.readArray(reader1 -> InputEndpoint.fromJson(reader1)); - deserializedAzureToAzureVmSyncedConfigDetails.inputEndpoints = inputEndpoints; - } else { - reader.skipChildren(); - } - } - - return deserializedAzureToAzureVmSyncedConfigDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureVmDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureVmDiskDetails.java deleted file mode 100644 index 26c1280c4237..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/AzureVmDiskDetails.java +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Disk details for E2A provider. - */ -@Fluent -public final class AzureVmDiskDetails implements JsonSerializable { - /* - * VHD type. - */ - private String vhdType; - - /* - * The VHD id. - */ - private String vhdId; - - /* - * The disk resource id. - */ - private String diskId; - - /* - * VHD name. - */ - private String vhdName; - - /* - * Max side in MB. - */ - private String maxSizeMB; - - /* - * Blob uri of the Azure disk. - */ - private String targetDiskLocation; - - /* - * The target Azure disk name. - */ - private String targetDiskName; - - /* - * Ordinal\LunId of the disk for the Azure VM. - */ - private String lunId; - - /* - * The DiskEncryptionSet ARM ID. - */ - private String diskEncryptionSetId; - - /* - * The custom target Azure disk name. - */ - private String customTargetDiskName; - - /** - * Creates an instance of AzureVmDiskDetails class. - */ - public AzureVmDiskDetails() { - } - - /** - * Get the vhdType property: VHD type. - * - * @return the vhdType value. - */ - public String vhdType() { - return this.vhdType; - } - - /** - * Set the vhdType property: 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 vhdId property: The VHD id. - * - * @return the vhdId value. - */ - public String vhdId() { - return this.vhdId; - } - - /** - * Set the vhdId property: 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 the diskId property: The disk resource id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: The disk resource id. - * - * @param diskId the diskId value to set. - * @return the AzureVmDiskDetails object itself. - */ - public AzureVmDiskDetails withDiskId(String diskId) { - this.diskId = diskId; - return this; - } - - /** - * Get the vhdName property: VHD name. - * - * @return the vhdName value. - */ - public String vhdName() { - return this.vhdName; - } - - /** - * Set the vhdName property: 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 the maxSizeMB property: Max side in MB. - * - * @return the maxSizeMB value. - */ - public String maxSizeMB() { - return this.maxSizeMB; - } - - /** - * Set the maxSizeMB property: 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 the targetDiskLocation property: Blob uri of the Azure disk. - * - * @return the targetDiskLocation value. - */ - public String targetDiskLocation() { - return this.targetDiskLocation; - } - - /** - * Set the targetDiskLocation property: 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 targetDiskName property: The target Azure disk name. - * - * @return the targetDiskName value. - */ - public String targetDiskName() { - return this.targetDiskName; - } - - /** - * Set the targetDiskName property: 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 the lunId property: Ordinal\LunId of the disk for the Azure VM. - * - * @return the lunId value. - */ - public String lunId() { - return this.lunId; - } - - /** - * Set the lunId property: 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; - } - - /** - * Get the diskEncryptionSetId property: The DiskEncryptionSet ARM ID. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Set the diskEncryptionSetId property: The DiskEncryptionSet ARM ID. - * - * @param diskEncryptionSetId the diskEncryptionSetId value to set. - * @return the AzureVmDiskDetails object itself. - */ - public AzureVmDiskDetails withDiskEncryptionSetId(String diskEncryptionSetId) { - this.diskEncryptionSetId = diskEncryptionSetId; - return this; - } - - /** - * Get the customTargetDiskName property: The custom target Azure disk name. - * - * @return the customTargetDiskName value. - */ - public String customTargetDiskName() { - return this.customTargetDiskName; - } - - /** - * Set the customTargetDiskName property: The custom target Azure disk name. - * - * @param customTargetDiskName the customTargetDiskName value to set. - * @return the AzureVmDiskDetails object itself. - */ - public AzureVmDiskDetails withCustomTargetDiskName(String customTargetDiskName) { - this.customTargetDiskName = customTargetDiskName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("vhdType", this.vhdType); - jsonWriter.writeStringField("vhdId", this.vhdId); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("vhdName", this.vhdName); - jsonWriter.writeStringField("maxSizeMB", this.maxSizeMB); - jsonWriter.writeStringField("targetDiskLocation", this.targetDiskLocation); - jsonWriter.writeStringField("targetDiskName", this.targetDiskName); - jsonWriter.writeStringField("lunId", this.lunId); - jsonWriter.writeStringField("diskEncryptionSetId", this.diskEncryptionSetId); - jsonWriter.writeStringField("customTargetDiskName", this.customTargetDiskName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureVmDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureVmDiskDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureVmDiskDetails. - */ - public static AzureVmDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureVmDiskDetails deserializedAzureVmDiskDetails = new AzureVmDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("vhdType".equals(fieldName)) { - deserializedAzureVmDiskDetails.vhdType = reader.getString(); - } else if ("vhdId".equals(fieldName)) { - deserializedAzureVmDiskDetails.vhdId = reader.getString(); - } else if ("diskId".equals(fieldName)) { - deserializedAzureVmDiskDetails.diskId = reader.getString(); - } else if ("vhdName".equals(fieldName)) { - deserializedAzureVmDiskDetails.vhdName = reader.getString(); - } else if ("maxSizeMB".equals(fieldName)) { - deserializedAzureVmDiskDetails.maxSizeMB = reader.getString(); - } else if ("targetDiskLocation".equals(fieldName)) { - deserializedAzureVmDiskDetails.targetDiskLocation = reader.getString(); - } else if ("targetDiskName".equals(fieldName)) { - deserializedAzureVmDiskDetails.targetDiskName = reader.getString(); - } else if ("lunId".equals(fieldName)) { - deserializedAzureVmDiskDetails.lunId = reader.getString(); - } else if ("diskEncryptionSetId".equals(fieldName)) { - deserializedAzureVmDiskDetails.diskEncryptionSetId = reader.getString(); - } else if ("customTargetDiskName".equals(fieldName)) { - deserializedAzureVmDiskDetails.customTargetDiskName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureVmDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ChurnOptionSelected.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ChurnOptionSelected.java deleted file mode 100644 index b3033c11ae00..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ChurnOptionSelected.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating the churn option selected by user. - */ -public final class ChurnOptionSelected extends ExpandableStringEnum { - /** - * Static value Normal for ChurnOptionSelected. - */ - public static final ChurnOptionSelected NORMAL = fromString("Normal"); - - /** - * Static value High for ChurnOptionSelected. - */ - public static final ChurnOptionSelected HIGH = fromString("High"); - - /** - * Creates a new instance of ChurnOptionSelected value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ChurnOptionSelected() { - } - - /** - * Creates or finds a ChurnOptionSelected from its string representation. - * - * @param name a name to look for. - * @return the corresponding ChurnOptionSelected. - */ - public static ChurnOptionSelected fromString(String name) { - return fromString(name, ChurnOptionSelected.class); - } - - /** - * Gets known ChurnOptionSelected values. - * - * @return known ChurnOptionSelected values. - */ - public static Collection values() { - return values(ChurnOptionSelected.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ComputeSizeErrorDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ComputeSizeErrorDetails.java deleted file mode 100644 index e40a9d4609c4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ComputeSizeErrorDetails.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Represents the error used to indicate why the target compute size is not applicable. - */ -@Fluent -public final class ComputeSizeErrorDetails implements JsonSerializable { - /* - * The error message. - */ - private String message; - - /* - * The severity of the error. - */ - private String severity; - - /** - * Creates an instance of ComputeSizeErrorDetails class. - */ - public ComputeSizeErrorDetails() { - } - - /** - * Get the message property: The error message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: The error message. - * - * @param message the message value to set. - * @return the ComputeSizeErrorDetails object itself. - */ - public ComputeSizeErrorDetails withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the severity property: The severity of the error. - * - * @return the severity value. - */ - public String severity() { - return this.severity; - } - - /** - * Set the severity property: The severity of the error. - * - * @param severity the severity value to set. - * @return the ComputeSizeErrorDetails object itself. - */ - public ComputeSizeErrorDetails withSeverity(String severity) { - this.severity = severity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("message", this.message); - jsonWriter.writeStringField("severity", this.severity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeSizeErrorDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeSizeErrorDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeSizeErrorDetails. - */ - public static ComputeSizeErrorDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeSizeErrorDetails deserializedComputeSizeErrorDetails = new ComputeSizeErrorDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("message".equals(fieldName)) { - deserializedComputeSizeErrorDetails.message = reader.getString(); - } else if ("severity".equals(fieldName)) { - deserializedComputeSizeErrorDetails.severity = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeSizeErrorDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ConfigurationSettings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ConfigurationSettings.java deleted file mode 100644 index 299dc8afe0e5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ConfigurationSettings.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Replication provider specific settings. - */ -@Immutable -public class ConfigurationSettings implements JsonSerializable { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "ConfigurationSettings"; - - /** - * Creates an instance of ConfigurationSettings class. - */ - public ConfigurationSettings() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigurationSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigurationSettings if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConfigurationSettings. - */ - public static ConfigurationSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("HyperVVirtualMachine".equals(discriminatorValue)) { - return HyperVVirtualMachineDetails.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("VmmVirtualMachine".equals(discriminatorValue)) { - return VmmVirtualMachineDetails.fromJson(readerToUse.reset()); - } else if ("ReplicationGroupDetails".equals(discriminatorValue)) { - return ReplicationGroupDetails.fromJson(readerToUse.reset()); - } else if ("VMwareVirtualMachine".equals(discriminatorValue)) { - return VMwareVirtualMachineDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ConfigurationSettings fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigurationSettings deserializedConfigurationSettings = new ConfigurationSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedConfigurationSettings.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedConfigurationSettings; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ConfigureAlertRequest.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ConfigureAlertRequest.java deleted file mode 100644 index 20fee7667144..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ConfigureAlertRequest.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Request to configure alerts for the system. - */ -@Fluent -public final class ConfigureAlertRequest implements JsonSerializable { - /* - * The properties of a configure alert request. - */ - private ConfigureAlertRequestProperties properties; - - /** - * Creates an instance of ConfigureAlertRequest class. - */ - public ConfigureAlertRequest() { - } - - /** - * Get the properties property: The properties of a configure alert request. - * - * @return the properties value. - */ - public ConfigureAlertRequestProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigureAlertRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigureAlertRequest if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConfigureAlertRequest. - */ - public static ConfigureAlertRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigureAlertRequest deserializedConfigureAlertRequest = new ConfigureAlertRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedConfigureAlertRequest.properties = ConfigureAlertRequestProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedConfigureAlertRequest; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ConfigureAlertRequestProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ConfigureAlertRequestProperties.java deleted file mode 100644 index 06dad88e11a8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ConfigureAlertRequestProperties.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties of a configure alert request. - */ -@Fluent -public final class ConfigureAlertRequestProperties implements JsonSerializable { - /* - * A value indicating whether to send email to subscription administrator. - */ - private String sendToOwners; - - /* - * The custom email address for sending emails. - */ - private List customEmailAddresses; - - /* - * The locale for the email notification. - */ - private String locale; - - /** - * Creates an instance of ConfigureAlertRequestProperties class. - */ - public ConfigureAlertRequestProperties() { - } - - /** - * Get the sendToOwners property: A value indicating whether to send email to subscription administrator. - * - * @return the sendToOwners value. - */ - public String sendToOwners() { - return this.sendToOwners; - } - - /** - * Set the sendToOwners property: 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 customEmailAddresses property: The custom email address for sending emails. - * - * @return the customEmailAddresses value. - */ - public List customEmailAddresses() { - return this.customEmailAddresses; - } - - /** - * Set the customEmailAddresses property: 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 property: The locale for the email notification. - * - * @return the locale value. - */ - public String locale() { - return this.locale; - } - - /** - * Set the locale property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sendToOwners", this.sendToOwners); - jsonWriter.writeArrayField("customEmailAddresses", this.customEmailAddresses, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("locale", this.locale); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigureAlertRequestProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigureAlertRequestProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConfigureAlertRequestProperties. - */ - public static ConfigureAlertRequestProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigureAlertRequestProperties deserializedConfigureAlertRequestProperties - = new ConfigureAlertRequestProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sendToOwners".equals(fieldName)) { - deserializedConfigureAlertRequestProperties.sendToOwners = reader.getString(); - } else if ("customEmailAddresses".equals(fieldName)) { - List customEmailAddresses = reader.readArray(reader1 -> reader1.getString()); - deserializedConfigureAlertRequestProperties.customEmailAddresses = customEmailAddresses; - } else if ("locale".equals(fieldName)) { - deserializedConfigureAlertRequestProperties.locale = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedConfigureAlertRequestProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ConsistencyCheckTaskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ConsistencyCheckTaskDetails.java deleted file mode 100644 index ab2dc3908d83..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ConsistencyCheckTaskDetails.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * This class contains monitoring details of all the inconsistent Protected Entities in Vmm. - */ -@Fluent -public final class ConsistencyCheckTaskDetails extends TaskTypeDetails { - /* - * The type of task details. - */ - private String instanceType = "ConsistencyCheckTaskDetails"; - - /* - * The list of inconsistent Vm details. - */ - private List vmDetails; - - /** - * Creates an instance of ConsistencyCheckTaskDetails class. - */ - public ConsistencyCheckTaskDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the vmDetails property: The list of inconsistent Vm details. - * - * @return the vmDetails value. - */ - public List vmDetails() { - return this.vmDetails; - } - - /** - * Set the vmDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmDetails() != null) { - vmDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("vmDetails", this.vmDetails, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConsistencyCheckTaskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConsistencyCheckTaskDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConsistencyCheckTaskDetails. - */ - public static ConsistencyCheckTaskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConsistencyCheckTaskDetails deserializedConsistencyCheckTaskDetails = new ConsistencyCheckTaskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedConsistencyCheckTaskDetails.instanceType = reader.getString(); - } else if ("vmDetails".equals(fieldName)) { - List vmDetails - = reader.readArray(reader1 -> InconsistentVmDetails.fromJson(reader1)); - deserializedConsistencyCheckTaskDetails.vmDetails = vmDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedConsistencyCheckTaskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateNetworkMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateNetworkMappingInput.java deleted file mode 100644 index 6631d8d35f7f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateNetworkMappingInput.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Create network mappings input. - */ -@Fluent -public final class CreateNetworkMappingInput implements JsonSerializable { - /* - * Input properties for creating network mapping. - */ - private CreateNetworkMappingInputProperties properties; - - /** - * Creates an instance of CreateNetworkMappingInput class. - */ - public CreateNetworkMappingInput() { - } - - /** - * Get the properties property: Input properties for creating network mapping. - * - * @return the properties value. - */ - public CreateNetworkMappingInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model CreateNetworkMappingInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CreateNetworkMappingInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateNetworkMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateNetworkMappingInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CreateNetworkMappingInput. - */ - public static CreateNetworkMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateNetworkMappingInput deserializedCreateNetworkMappingInput = new CreateNetworkMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedCreateNetworkMappingInput.properties - = CreateNetworkMappingInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCreateNetworkMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateNetworkMappingInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateNetworkMappingInputProperties.java deleted file mode 100644 index a4be7e25a363..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateNetworkMappingInputProperties.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Common input details for network mapping operation. - */ -@Fluent -public final class CreateNetworkMappingInputProperties - implements JsonSerializable { - /* - * Recovery fabric Name. - */ - private String recoveryFabricName; - - /* - * Recovery network Id. - */ - private String recoveryNetworkId; - - /* - * Fabric specific input properties. - */ - private FabricSpecificCreateNetworkMappingInput fabricSpecificDetails; - - /** - * Creates an instance of CreateNetworkMappingInputProperties class. - */ - public CreateNetworkMappingInputProperties() { - } - - /** - * Get the recoveryFabricName property: Recovery fabric Name. - * - * @return the recoveryFabricName value. - */ - public String recoveryFabricName() { - return this.recoveryFabricName; - } - - /** - * Set the recoveryFabricName property: 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 the recoveryNetworkId property: Recovery network Id. - * - * @return the recoveryNetworkId value. - */ - public String recoveryNetworkId() { - return this.recoveryNetworkId; - } - - /** - * Set the recoveryNetworkId property: 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 the fabricSpecificDetails property: Fabric specific input properties. - * - * @return the fabricSpecificDetails value. - */ - public FabricSpecificCreateNetworkMappingInput fabricSpecificDetails() { - return this.fabricSpecificDetails; - } - - /** - * Set the fabricSpecificDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (recoveryNetworkId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryNetworkId in model CreateNetworkMappingInputProperties")); - } - if (fabricSpecificDetails() != null) { - fabricSpecificDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CreateNetworkMappingInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryNetworkId", this.recoveryNetworkId); - jsonWriter.writeStringField("recoveryFabricName", this.recoveryFabricName); - jsonWriter.writeJsonField("fabricSpecificDetails", this.fabricSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateNetworkMappingInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateNetworkMappingInputProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CreateNetworkMappingInputProperties. - */ - public static CreateNetworkMappingInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateNetworkMappingInputProperties deserializedCreateNetworkMappingInputProperties - = new CreateNetworkMappingInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryNetworkId".equals(fieldName)) { - deserializedCreateNetworkMappingInputProperties.recoveryNetworkId = reader.getString(); - } else if ("recoveryFabricName".equals(fieldName)) { - deserializedCreateNetworkMappingInputProperties.recoveryFabricName = reader.getString(); - } else if ("fabricSpecificDetails".equals(fieldName)) { - deserializedCreateNetworkMappingInputProperties.fabricSpecificDetails - = FabricSpecificCreateNetworkMappingInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCreateNetworkMappingInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreatePolicyInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreatePolicyInput.java deleted file mode 100644 index bb9adf9cc4a7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreatePolicyInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Protection Policy input. - */ -@Fluent -public final class CreatePolicyInput implements JsonSerializable { - /* - * Policy creation properties. - */ - private CreatePolicyInputProperties properties; - - /** - * Creates an instance of CreatePolicyInput class. - */ - public CreatePolicyInput() { - } - - /** - * Get the properties property: Policy creation properties. - * - * @return the properties value. - */ - public CreatePolicyInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreatePolicyInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreatePolicyInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CreatePolicyInput. - */ - public static CreatePolicyInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreatePolicyInput deserializedCreatePolicyInput = new CreatePolicyInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedCreatePolicyInput.properties = CreatePolicyInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCreatePolicyInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreatePolicyInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreatePolicyInputProperties.java deleted file mode 100644 index a19ce0c5a107..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreatePolicyInputProperties.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Policy creation properties. - */ -@Fluent -public final class CreatePolicyInputProperties implements JsonSerializable { - /* - * The ReplicationProviderSettings. - */ - private PolicyProviderSpecificInput providerSpecificInput; - - /** - * Creates an instance of CreatePolicyInputProperties class. - */ - public CreatePolicyInputProperties() { - } - - /** - * Get the providerSpecificInput property: The ReplicationProviderSettings. - * - * @return the providerSpecificInput value. - */ - public PolicyProviderSpecificInput providerSpecificInput() { - return this.providerSpecificInput; - } - - /** - * Set the providerSpecificInput property: The ReplicationProviderSettings. - * - * @param providerSpecificInput the providerSpecificInput value to set. - * @return the CreatePolicyInputProperties object itself. - */ - public CreatePolicyInputProperties withProviderSpecificInput(PolicyProviderSpecificInput providerSpecificInput) { - this.providerSpecificInput = providerSpecificInput; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificInput() != null) { - providerSpecificInput().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificInput", this.providerSpecificInput); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreatePolicyInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreatePolicyInputProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CreatePolicyInputProperties. - */ - public static CreatePolicyInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreatePolicyInputProperties deserializedCreatePolicyInputProperties = new CreatePolicyInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificInput".equals(fieldName)) { - deserializedCreatePolicyInputProperties.providerSpecificInput - = PolicyProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCreatePolicyInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionContainerInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionContainerInput.java deleted file mode 100644 index bd24b8a2e1dc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionContainerInput.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Create protection container input. - */ -@Fluent -public final class CreateProtectionContainerInput implements JsonSerializable { - /* - * Create protection container input properties. - */ - private CreateProtectionContainerInputProperties properties; - - /** - * Creates an instance of CreateProtectionContainerInput class. - */ - public CreateProtectionContainerInput() { - } - - /** - * Get the properties property: Create protection container input properties. - * - * @return the properties value. - */ - public CreateProtectionContainerInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateProtectionContainerInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateProtectionContainerInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CreateProtectionContainerInput. - */ - public static CreateProtectionContainerInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateProtectionContainerInput deserializedCreateProtectionContainerInput - = new CreateProtectionContainerInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedCreateProtectionContainerInput.properties - = CreateProtectionContainerInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCreateProtectionContainerInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionContainerInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionContainerInputProperties.java deleted file mode 100644 index ea7bc24d2342..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionContainerInputProperties.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Create protection container input properties. - */ -@Fluent -public final class CreateProtectionContainerInputProperties - implements JsonSerializable { - /* - * Provider specific inputs for container creation. - */ - private List providerSpecificInput; - - /** - * Creates an instance of CreateProtectionContainerInputProperties class. - */ - public CreateProtectionContainerInputProperties() { - } - - /** - * Get the providerSpecificInput property: Provider specific inputs for container creation. - * - * @return the providerSpecificInput value. - */ - public List providerSpecificInput() { - return this.providerSpecificInput; - } - - /** - * Set the providerSpecificInput property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificInput() != null) { - providerSpecificInput().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("providerSpecificInput", this.providerSpecificInput, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateProtectionContainerInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateProtectionContainerInputProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CreateProtectionContainerInputProperties. - */ - public static CreateProtectionContainerInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateProtectionContainerInputProperties deserializedCreateProtectionContainerInputProperties - = new CreateProtectionContainerInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificInput".equals(fieldName)) { - List providerSpecificInput = reader - .readArray(reader1 -> ReplicationProviderSpecificContainerCreationInput.fromJson(reader1)); - deserializedCreateProtectionContainerInputProperties.providerSpecificInput = providerSpecificInput; - } else { - reader.skipChildren(); - } - } - - return deserializedCreateProtectionContainerInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionContainerMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionContainerMappingInput.java deleted file mode 100644 index c9b8b17a603b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionContainerMappingInput.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configure pairing input. - */ -@Fluent -public final class CreateProtectionContainerMappingInput - implements JsonSerializable { - /* - * Configure protection input properties. - */ - private CreateProtectionContainerMappingInputProperties properties; - - /** - * Creates an instance of CreateProtectionContainerMappingInput class. - */ - public CreateProtectionContainerMappingInput() { - } - - /** - * Get the properties property: Configure protection input properties. - * - * @return the properties value. - */ - public CreateProtectionContainerMappingInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateProtectionContainerMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateProtectionContainerMappingInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CreateProtectionContainerMappingInput. - */ - public static CreateProtectionContainerMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateProtectionContainerMappingInput deserializedCreateProtectionContainerMappingInput - = new CreateProtectionContainerMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedCreateProtectionContainerMappingInput.properties - = CreateProtectionContainerMappingInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCreateProtectionContainerMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionContainerMappingInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionContainerMappingInputProperties.java deleted file mode 100644 index 689e11036298..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionContainerMappingInputProperties.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configure pairing input properties. - */ -@Fluent -public final class CreateProtectionContainerMappingInputProperties - implements JsonSerializable { - /* - * The target unique protection container name. - */ - private String targetProtectionContainerId; - - /* - * Applicable policy. - */ - private String policyId; - - /* - * Provider specific input for pairing. - */ - private ReplicationProviderSpecificContainerMappingInput providerSpecificInput; - - /** - * Creates an instance of CreateProtectionContainerMappingInputProperties class. - */ - public CreateProtectionContainerMappingInputProperties() { - } - - /** - * Get the targetProtectionContainerId property: The target unique protection container name. - * - * @return the targetProtectionContainerId value. - */ - public String targetProtectionContainerId() { - return this.targetProtectionContainerId; - } - - /** - * Set the targetProtectionContainerId property: 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 the policyId property: Applicable policy. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Set the policyId property: 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 the providerSpecificInput property: Provider specific input for pairing. - * - * @return the providerSpecificInput value. - */ - public ReplicationProviderSpecificContainerMappingInput providerSpecificInput() { - return this.providerSpecificInput; - } - - /** - * Set the providerSpecificInput property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificInput() != null) { - providerSpecificInput().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetProtectionContainerId", this.targetProtectionContainerId); - jsonWriter.writeStringField("policyId", this.policyId); - jsonWriter.writeJsonField("providerSpecificInput", this.providerSpecificInput); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateProtectionContainerMappingInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateProtectionContainerMappingInputProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CreateProtectionContainerMappingInputProperties. - */ - public static CreateProtectionContainerMappingInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateProtectionContainerMappingInputProperties deserializedCreateProtectionContainerMappingInputProperties - = new CreateProtectionContainerMappingInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetProtectionContainerId".equals(fieldName)) { - deserializedCreateProtectionContainerMappingInputProperties.targetProtectionContainerId - = reader.getString(); - } else if ("policyId".equals(fieldName)) { - deserializedCreateProtectionContainerMappingInputProperties.policyId = reader.getString(); - } else if ("providerSpecificInput".equals(fieldName)) { - deserializedCreateProtectionContainerMappingInputProperties.providerSpecificInput - = ReplicationProviderSpecificContainerMappingInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCreateProtectionContainerMappingInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionIntentInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionIntentInput.java deleted file mode 100644 index 086fde57de0b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionIntentInput.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Create protection intent input. - */ -@Fluent -public final class CreateProtectionIntentInput implements JsonSerializable { - /* - * Create protection intent input properties. - */ - private CreateProtectionIntentProperties properties; - - /** - * Creates an instance of CreateProtectionIntentInput class. - */ - public CreateProtectionIntentInput() { - } - - /** - * Get the properties property: Create protection intent input properties. - * - * @return the properties value. - */ - public CreateProtectionIntentProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Create protection intent input properties. - * - * @param properties the properties value to set. - * @return the CreateProtectionIntentInput object itself. - */ - public CreateProtectionIntentInput withProperties(CreateProtectionIntentProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateProtectionIntentInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateProtectionIntentInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CreateProtectionIntentInput. - */ - public static CreateProtectionIntentInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateProtectionIntentInput deserializedCreateProtectionIntentInput = new CreateProtectionIntentInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedCreateProtectionIntentInput.properties - = CreateProtectionIntentProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCreateProtectionIntentInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionIntentProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionIntentProperties.java deleted file mode 100644 index 4a0097f88c48..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionIntentProperties.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Create protection intent input properties. - */ -@Fluent -public final class CreateProtectionIntentProperties implements JsonSerializable { - /* - * The ReplicationProviderInput. For A2A provider, it will be A2ACreateProtectionIntentInput object. - */ - private CreateProtectionIntentProviderSpecificDetails providerSpecificDetails; - - /** - * Creates an instance of CreateProtectionIntentProperties class. - */ - public CreateProtectionIntentProperties() { - } - - /** - * Get the providerSpecificDetails property: The ReplicationProviderInput. For A2A provider, it will be - * A2ACreateProtectionIntentInput object. - * - * @return the providerSpecificDetails value. - */ - public CreateProtectionIntentProviderSpecificDetails providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: The ReplicationProviderInput. For A2A provider, it will be - * A2ACreateProtectionIntentInput object. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the CreateProtectionIntentProperties object itself. - */ - public CreateProtectionIntentProperties - withProviderSpecificDetails(CreateProtectionIntentProviderSpecificDetails providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateProtectionIntentProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateProtectionIntentProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CreateProtectionIntentProperties. - */ - public static CreateProtectionIntentProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateProtectionIntentProperties deserializedCreateProtectionIntentProperties - = new CreateProtectionIntentProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificDetails".equals(fieldName)) { - deserializedCreateProtectionIntentProperties.providerSpecificDetails - = CreateProtectionIntentProviderSpecificDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCreateProtectionIntentProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionIntentProviderSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionIntentProviderSpecificDetails.java deleted file mode 100644 index 4e177582e4a3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateProtectionIntentProviderSpecificDetails.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Create protection intent provider specific input. - */ -@Immutable -public class CreateProtectionIntentProviderSpecificDetails - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "CreateProtectionIntentProviderSpecificDetails"; - - /** - * Creates an instance of CreateProtectionIntentProviderSpecificDetails class. - */ - public CreateProtectionIntentProviderSpecificDetails() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateProtectionIntentProviderSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateProtectionIntentProviderSpecificDetails if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CreateProtectionIntentProviderSpecificDetails. - */ - public static CreateProtectionIntentProviderSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2ACreateProtectionIntentInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static CreateProtectionIntentProviderSpecificDetails fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - CreateProtectionIntentProviderSpecificDetails deserializedCreateProtectionIntentProviderSpecificDetails - = new CreateProtectionIntentProviderSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedCreateProtectionIntentProviderSpecificDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCreateProtectionIntentProviderSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateRecoveryPlanInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateRecoveryPlanInput.java deleted file mode 100644 index c1c503970fa0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateRecoveryPlanInput.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Create recovery plan input class. - */ -@Fluent -public final class CreateRecoveryPlanInput implements JsonSerializable { - /* - * Recovery plan creation properties. - */ - private CreateRecoveryPlanInputProperties properties; - - /** - * Creates an instance of CreateRecoveryPlanInput class. - */ - public CreateRecoveryPlanInput() { - } - - /** - * Get the properties property: Recovery plan creation properties. - * - * @return the properties value. - */ - public CreateRecoveryPlanInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model CreateRecoveryPlanInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CreateRecoveryPlanInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateRecoveryPlanInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateRecoveryPlanInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CreateRecoveryPlanInput. - */ - public static CreateRecoveryPlanInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateRecoveryPlanInput deserializedCreateRecoveryPlanInput = new CreateRecoveryPlanInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedCreateRecoveryPlanInput.properties = CreateRecoveryPlanInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCreateRecoveryPlanInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateRecoveryPlanInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateRecoveryPlanInputProperties.java deleted file mode 100644 index 01e2af211f6c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CreateRecoveryPlanInputProperties.java +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Recovery plan creation properties. - */ -@Fluent -public final class CreateRecoveryPlanInputProperties implements JsonSerializable { - /* - * The primary fabric Id. - */ - private String primaryFabricId; - - /* - * The recovery fabric Id. - */ - private String recoveryFabricId; - - /* - * The failover deployment model. - */ - private FailoverDeploymentModel failoverDeploymentModel; - - /* - * The recovery plan groups. - */ - private List groups; - - /* - * The provider specific input. - */ - private List providerSpecificInput; - - /** - * Creates an instance of CreateRecoveryPlanInputProperties class. - */ - public CreateRecoveryPlanInputProperties() { - } - - /** - * Get the primaryFabricId property: The primary fabric Id. - * - * @return the primaryFabricId value. - */ - public String primaryFabricId() { - return this.primaryFabricId; - } - - /** - * Set the primaryFabricId property: 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 recoveryFabricId property: The recovery fabric Id. - * - * @return the recoveryFabricId value. - */ - public String recoveryFabricId() { - return this.recoveryFabricId; - } - - /** - * Set the recoveryFabricId property: 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 failoverDeploymentModel property: The failover deployment model. - * - * @return the failoverDeploymentModel value. - */ - public FailoverDeploymentModel failoverDeploymentModel() { - return this.failoverDeploymentModel; - } - - /** - * Set the failoverDeploymentModel property: The failover deployment model. - * - * @param failoverDeploymentModel the failoverDeploymentModel value to set. - * @return the CreateRecoveryPlanInputProperties object itself. - */ - public CreateRecoveryPlanInputProperties - withFailoverDeploymentModel(FailoverDeploymentModel failoverDeploymentModel) { - this.failoverDeploymentModel = failoverDeploymentModel; - return this; - } - - /** - * Get the groups property: The recovery plan groups. - * - * @return the groups value. - */ - public List groups() { - return this.groups; - } - - /** - * Set the groups property: 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; - } - - /** - * Get the providerSpecificInput property: The provider specific input. - * - * @return the providerSpecificInput value. - */ - public List providerSpecificInput() { - return this.providerSpecificInput; - } - - /** - * Set the providerSpecificInput property: The provider specific input. - * - * @param providerSpecificInput the providerSpecificInput value to set. - * @return the CreateRecoveryPlanInputProperties object itself. - */ - public CreateRecoveryPlanInputProperties - withProviderSpecificInput(List providerSpecificInput) { - this.providerSpecificInput = providerSpecificInput; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (primaryFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property primaryFabricId in model CreateRecoveryPlanInputProperties")); - } - if (recoveryFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryFabricId in model CreateRecoveryPlanInputProperties")); - } - if (groups() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property groups in model CreateRecoveryPlanInputProperties")); - } else { - groups().forEach(e -> e.validate()); - } - if (providerSpecificInput() != null) { - providerSpecificInput().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CreateRecoveryPlanInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryFabricId", this.primaryFabricId); - jsonWriter.writeStringField("recoveryFabricId", this.recoveryFabricId); - jsonWriter.writeArrayField("groups", this.groups, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("failoverDeploymentModel", - this.failoverDeploymentModel == null ? null : this.failoverDeploymentModel.toString()); - jsonWriter.writeArrayField("providerSpecificInput", this.providerSpecificInput, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateRecoveryPlanInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateRecoveryPlanInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CreateRecoveryPlanInputProperties. - */ - public static CreateRecoveryPlanInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateRecoveryPlanInputProperties deserializedCreateRecoveryPlanInputProperties - = new CreateRecoveryPlanInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primaryFabricId".equals(fieldName)) { - deserializedCreateRecoveryPlanInputProperties.primaryFabricId = reader.getString(); - } else if ("recoveryFabricId".equals(fieldName)) { - deserializedCreateRecoveryPlanInputProperties.recoveryFabricId = reader.getString(); - } else if ("groups".equals(fieldName)) { - List groups = reader.readArray(reader1 -> RecoveryPlanGroup.fromJson(reader1)); - deserializedCreateRecoveryPlanInputProperties.groups = groups; - } else if ("failoverDeploymentModel".equals(fieldName)) { - deserializedCreateRecoveryPlanInputProperties.failoverDeploymentModel - = FailoverDeploymentModel.fromString(reader.getString()); - } else if ("providerSpecificInput".equals(fieldName)) { - List providerSpecificInput - = reader.readArray(reader1 -> RecoveryPlanProviderSpecificInput.fromJson(reader1)); - deserializedCreateRecoveryPlanInputProperties.providerSpecificInput = providerSpecificInput; - } else { - reader.skipChildren(); - } - } - - return deserializedCreateRecoveryPlanInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CriticalJobHistoryDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CriticalJobHistoryDetails.java deleted file mode 100644 index 669af5f6cf58..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CriticalJobHistoryDetails.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Critical past job details of the migration item. - */ -@Immutable -public final class CriticalJobHistoryDetails implements JsonSerializable { - /* - * The job name. - */ - private String jobName; - - /* - * The ARM Id of the job being executed. - */ - private String jobId; - - /* - * The start time of the job. - */ - private OffsetDateTime startTime; - - /* - * The job state. - */ - private String jobStatus; - - /** - * Creates an instance of CriticalJobHistoryDetails class. - */ - public CriticalJobHistoryDetails() { - } - - /** - * Get the jobName property: The job name. - * - * @return the jobName value. - */ - public String jobName() { - return this.jobName; - } - - /** - * Get the jobId property: The ARM Id of the job being executed. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Get the startTime property: The start time of the job. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the jobStatus property: The job state. - * - * @return the jobStatus value. - */ - public String jobStatus() { - return this.jobStatus; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CriticalJobHistoryDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CriticalJobHistoryDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CriticalJobHistoryDetails. - */ - public static CriticalJobHistoryDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CriticalJobHistoryDetails deserializedCriticalJobHistoryDetails = new CriticalJobHistoryDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobName".equals(fieldName)) { - deserializedCriticalJobHistoryDetails.jobName = reader.getString(); - } else if ("jobId".equals(fieldName)) { - deserializedCriticalJobHistoryDetails.jobId = reader.getString(); - } else if ("startTime".equals(fieldName)) { - deserializedCriticalJobHistoryDetails.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("jobStatus".equals(fieldName)) { - deserializedCriticalJobHistoryDetails.jobStatus = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCriticalJobHistoryDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CurrentJobDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CurrentJobDetails.java deleted file mode 100644 index bb4339c27809..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CurrentJobDetails.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Current job details of the migration item. - */ -@Immutable -public final class CurrentJobDetails implements JsonSerializable { - /* - * The job name. - */ - private String jobName; - - /* - * The ARM Id of the job being executed. - */ - private String jobId; - - /* - * The start time of the job. - */ - private OffsetDateTime startTime; - - /** - * Creates an instance of CurrentJobDetails class. - */ - public CurrentJobDetails() { - } - - /** - * Get the jobName property: The job name. - * - * @return the jobName value. - */ - public String jobName() { - return this.jobName; - } - - /** - * Get the jobId property: The ARM Id of the job being executed. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Get the startTime property: The start time of the job. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CurrentJobDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CurrentJobDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CurrentJobDetails. - */ - public static CurrentJobDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CurrentJobDetails deserializedCurrentJobDetails = new CurrentJobDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobName".equals(fieldName)) { - deserializedCurrentJobDetails.jobName = reader.getString(); - } else if ("jobId".equals(fieldName)) { - deserializedCurrentJobDetails.jobId = reader.getString(); - } else if ("startTime".equals(fieldName)) { - deserializedCurrentJobDetails.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedCurrentJobDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CurrentScenarioDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CurrentScenarioDetails.java deleted file mode 100644 index 93b49c005569..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/CurrentScenarioDetails.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Current scenario details of the protected entity. - */ -@Fluent -public final class CurrentScenarioDetails implements JsonSerializable { - /* - * Scenario name. - */ - private String scenarioName; - - /* - * ARM Id of the job being executed. - */ - private String jobId; - - /* - * Start time of the workflow. - */ - private OffsetDateTime startTime; - - /** - * Creates an instance of CurrentScenarioDetails class. - */ - public CurrentScenarioDetails() { - } - - /** - * Get the scenarioName property: Scenario name. - * - * @return the scenarioName value. - */ - public String scenarioName() { - return this.scenarioName; - } - - /** - * Set the scenarioName property: 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 the jobId property: ARM Id of the job being executed. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Set the jobId property: 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 the startTime property: Start time of the workflow. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: Start time of the workflow. - * - * @param startTime the startTime value to set. - * @return the CurrentScenarioDetails object itself. - */ - public CurrentScenarioDetails withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("scenarioName", this.scenarioName); - jsonWriter.writeStringField("jobId", this.jobId); - jsonWriter.writeStringField("startTime", - this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CurrentScenarioDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CurrentScenarioDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CurrentScenarioDetails. - */ - public static CurrentScenarioDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CurrentScenarioDetails deserializedCurrentScenarioDetails = new CurrentScenarioDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scenarioName".equals(fieldName)) { - deserializedCurrentScenarioDetails.scenarioName = reader.getString(); - } else if ("jobId".equals(fieldName)) { - deserializedCurrentScenarioDetails.jobId = reader.getString(); - } else if ("startTime".equals(fieldName)) { - deserializedCurrentScenarioDetails.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedCurrentScenarioDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DataStore.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DataStore.java deleted file mode 100644 index 369ee0e51a2e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DataStore.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The datastore details of the MT. - */ -@Fluent -public final class DataStore implements JsonSerializable { - /* - * The symbolic name of data store. - */ - private String symbolicName; - - /* - * The uuid of data store. - */ - private String uuid; - - /* - * The capacity of data store in GBs. - */ - private String capacity; - - /* - * The free space of data store in GBs. - */ - private String freeSpace; - - /* - * The type of data store. - */ - private String type; - - /** - * Creates an instance of DataStore class. - */ - public DataStore() { - } - - /** - * Get the symbolicName property: The symbolic name of data store. - * - * @return the symbolicName value. - */ - public String symbolicName() { - return this.symbolicName; - } - - /** - * Set the symbolicName property: 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 property: The uuid of data store. - * - * @return the uuid value. - */ - public String uuid() { - return this.uuid; - } - - /** - * Set the uuid property: 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 property: The capacity of data store in GBs. - * - * @return the capacity value. - */ - public String capacity() { - return this.capacity; - } - - /** - * Set the capacity property: 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 freeSpace property: The free space of data store in GBs. - * - * @return the freeSpace value. - */ - public String freeSpace() { - return this.freeSpace; - } - - /** - * Set the freeSpace property: 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 property: The type of data store. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("symbolicName", this.symbolicName); - jsonWriter.writeStringField("uuid", this.uuid); - jsonWriter.writeStringField("capacity", this.capacity); - jsonWriter.writeStringField("freeSpace", this.freeSpace); - jsonWriter.writeStringField("type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataStore from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataStore if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the DataStore. - */ - public static DataStore fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataStore deserializedDataStore = new DataStore(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("symbolicName".equals(fieldName)) { - deserializedDataStore.symbolicName = reader.getString(); - } else if ("uuid".equals(fieldName)) { - deserializedDataStore.uuid = reader.getString(); - } else if ("capacity".equals(fieldName)) { - deserializedDataStore.capacity = reader.getString(); - } else if ("freeSpace".equals(fieldName)) { - deserializedDataStore.freeSpace = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDataStore.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDataStore; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DataStoreUtilizationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DataStoreUtilizationDetails.java deleted file mode 100644 index 56bbcee160e4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DataStoreUtilizationDetails.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details of the appliance resource. - */ -@Immutable -public final class DataStoreUtilizationDetails implements JsonSerializable { - /* - * The total count of snapshots supported by the datastore. - */ - private Long totalSnapshotsSupported; - - /* - * The total snapshots created for server migration in the datastore. - */ - private Long totalSnapshotsCreated; - - /* - * The datastore name. - */ - private String dataStoreName; - - /** - * Creates an instance of DataStoreUtilizationDetails class. - */ - public DataStoreUtilizationDetails() { - } - - /** - * Get the totalSnapshotsSupported property: The total count of snapshots supported by the datastore. - * - * @return the totalSnapshotsSupported value. - */ - public Long totalSnapshotsSupported() { - return this.totalSnapshotsSupported; - } - - /** - * Get the totalSnapshotsCreated property: The total snapshots created for server migration in the datastore. - * - * @return the totalSnapshotsCreated value. - */ - public Long totalSnapshotsCreated() { - return this.totalSnapshotsCreated; - } - - /** - * Get the dataStoreName property: The datastore name. - * - * @return the dataStoreName value. - */ - public String dataStoreName() { - return this.dataStoreName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataStoreUtilizationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataStoreUtilizationDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DataStoreUtilizationDetails. - */ - public static DataStoreUtilizationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataStoreUtilizationDetails deserializedDataStoreUtilizationDetails = new DataStoreUtilizationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("totalSnapshotsSupported".equals(fieldName)) { - deserializedDataStoreUtilizationDetails.totalSnapshotsSupported - = reader.getNullable(JsonReader::getLong); - } else if ("totalSnapshotsCreated".equals(fieldName)) { - deserializedDataStoreUtilizationDetails.totalSnapshotsCreated - = reader.getNullable(JsonReader::getLong); - } else if ("dataStoreName".equals(fieldName)) { - deserializedDataStoreUtilizationDetails.dataStoreName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDataStoreUtilizationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DataSyncStatus.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DataSyncStatus.java deleted file mode 100644 index f737f992f69c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DataSyncStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The data sync option. - */ -public final class DataSyncStatus extends ExpandableStringEnum { - /** - * Static value ForDownTime for DataSyncStatus. - */ - public static final DataSyncStatus FOR_DOWN_TIME = fromString("ForDownTime"); - - /** - * Static value ForSynchronization for DataSyncStatus. - */ - public static final DataSyncStatus FOR_SYNCHRONIZATION = fromString("ForSynchronization"); - - /** - * Creates a new instance of DataSyncStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DataSyncStatus() { - } - - /** - * Creates or finds a DataSyncStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataSyncStatus. - */ - public static DataSyncStatus fromString(String name) { - return fromString(name, DataSyncStatus.class); - } - - /** - * Gets known DataSyncStatus values. - * - * @return known DataSyncStatus values. - */ - public static Collection values() { - return values(DataSyncStatus.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DisableProtectionInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DisableProtectionInput.java deleted file mode 100644 index 2cd81c762daf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DisableProtectionInput.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Disable protection input. - */ -@Fluent -public final class DisableProtectionInput implements JsonSerializable { - /* - * Disable protection input properties. - */ - private DisableProtectionInputProperties properties; - - /** - * Creates an instance of DisableProtectionInput class. - */ - public DisableProtectionInput() { - } - - /** - * Get the properties property: Disable protection input properties. - * - * @return the properties value. - */ - public DisableProtectionInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model DisableProtectionInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DisableProtectionInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DisableProtectionInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DisableProtectionInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DisableProtectionInput. - */ - public static DisableProtectionInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DisableProtectionInput deserializedDisableProtectionInput = new DisableProtectionInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedDisableProtectionInput.properties = DisableProtectionInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDisableProtectionInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DisableProtectionInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DisableProtectionInputProperties.java deleted file mode 100644 index e851d8cd3c4c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DisableProtectionInputProperties.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Disable protection input properties. - */ -@Fluent -public final class DisableProtectionInputProperties implements JsonSerializable { - /* - * Disable protection reason. It can have values NotSpecified/MigrationComplete. - */ - private DisableProtectionReason disableProtectionReason; - - /* - * Replication provider specific input. - */ - private DisableProtectionProviderSpecificInput replicationProviderInput; - - /** - * Creates an instance of DisableProtectionInputProperties class. - */ - public DisableProtectionInputProperties() { - } - - /** - * Get the disableProtectionReason property: Disable protection reason. It can have values - * NotSpecified/MigrationComplete. - * - * @return the disableProtectionReason value. - */ - public DisableProtectionReason disableProtectionReason() { - return this.disableProtectionReason; - } - - /** - * Set the disableProtectionReason property: Disable protection reason. It can have values - * 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 the replicationProviderInput property: Replication provider specific input. - * - * @return the replicationProviderInput value. - */ - public DisableProtectionProviderSpecificInput replicationProviderInput() { - return this.replicationProviderInput; - } - - /** - * Set the replicationProviderInput property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (replicationProviderInput() != null) { - replicationProviderInput().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("disableProtectionReason", - this.disableProtectionReason == null ? null : this.disableProtectionReason.toString()); - jsonWriter.writeJsonField("replicationProviderInput", this.replicationProviderInput); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DisableProtectionInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DisableProtectionInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DisableProtectionInputProperties. - */ - public static DisableProtectionInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DisableProtectionInputProperties deserializedDisableProtectionInputProperties - = new DisableProtectionInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("disableProtectionReason".equals(fieldName)) { - deserializedDisableProtectionInputProperties.disableProtectionReason - = DisableProtectionReason.fromString(reader.getString()); - } else if ("replicationProviderInput".equals(fieldName)) { - deserializedDisableProtectionInputProperties.replicationProviderInput - = DisableProtectionProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDisableProtectionInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DisableProtectionProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DisableProtectionProviderSpecificInput.java deleted file mode 100644 index 88cdfe9d7a49..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DisableProtectionProviderSpecificInput.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Disable protection provider specific input. - */ -@Immutable -public class DisableProtectionProviderSpecificInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "DisableProtectionProviderSpecificInput"; - - /** - * Creates an instance of DisableProtectionProviderSpecificInput class. - */ - public DisableProtectionProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DisableProtectionProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DisableProtectionProviderSpecificInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DisableProtectionProviderSpecificInput. - */ - public static DisableProtectionProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("InMage".equals(discriminatorValue)) { - return InMageDisableProtectionProviderSpecificInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static DisableProtectionProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DisableProtectionProviderSpecificInput deserializedDisableProtectionProviderSpecificInput - = new DisableProtectionProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedDisableProtectionProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDisableProtectionProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DisableProtectionReason.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DisableProtectionReason.java deleted file mode 100644 index 7a5e95c60298..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DisableProtectionReason.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Disable protection reason. It can have values NotSpecified/MigrationComplete. - */ -public final class DisableProtectionReason extends ExpandableStringEnum { - /** - * Static value NotSpecified for DisableProtectionReason. - */ - public static final DisableProtectionReason NOT_SPECIFIED = fromString("NotSpecified"); - - /** - * Static value MigrationComplete for DisableProtectionReason. - */ - public static final DisableProtectionReason MIGRATION_COMPLETE = fromString("MigrationComplete"); - - /** - * Creates a new instance of DisableProtectionReason value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DisableProtectionReason() { - } - - /** - * Creates or finds a DisableProtectionReason from its string representation. - * - * @param name a name to look for. - * @return the corresponding DisableProtectionReason. - */ - public static DisableProtectionReason fromString(String name) { - return fromString(name, DisableProtectionReason.class); - } - - /** - * Gets known DisableProtectionReason values. - * - * @return known DisableProtectionReason values. - */ - public static Collection values() { - return values(DisableProtectionReason.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiscoverProtectableItemRequest.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiscoverProtectableItemRequest.java deleted file mode 100644 index 304ceddd1827..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiscoverProtectableItemRequest.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Request to add a physical machine as a protectable item in a container. - */ -@Fluent -public final class DiscoverProtectableItemRequest implements JsonSerializable { - /* - * The properties of a discover protectable item request. - */ - private DiscoverProtectableItemRequestProperties properties; - - /** - * Creates an instance of DiscoverProtectableItemRequest class. - */ - public DiscoverProtectableItemRequest() { - } - - /** - * Get the properties property: The properties of a discover protectable item request. - * - * @return the properties value. - */ - public DiscoverProtectableItemRequestProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiscoverProtectableItemRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiscoverProtectableItemRequest if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiscoverProtectableItemRequest. - */ - public static DiscoverProtectableItemRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiscoverProtectableItemRequest deserializedDiscoverProtectableItemRequest - = new DiscoverProtectableItemRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedDiscoverProtectableItemRequest.properties - = DiscoverProtectableItemRequestProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDiscoverProtectableItemRequest; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiscoverProtectableItemRequestProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiscoverProtectableItemRequestProperties.java deleted file mode 100644 index 439560d85ffb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiscoverProtectableItemRequestProperties.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Discover protectable item properties. - */ -@Fluent -public final class DiscoverProtectableItemRequestProperties - implements JsonSerializable { - /* - * The friendly name of the physical machine. - */ - private String friendlyName; - - /* - * The IP address of the physical machine to be discovered. - */ - private String ipAddress; - - /* - * The OS type on the physical machine. - */ - private String osType; - - /** - * Creates an instance of DiscoverProtectableItemRequestProperties class. - */ - public DiscoverProtectableItemRequestProperties() { - } - - /** - * Get the friendlyName property: The friendly name of the physical machine. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 ipAddress property: The IP address of the physical machine to be discovered. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: 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 osType property: The OS type on the physical machine. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("osType", this.osType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiscoverProtectableItemRequestProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiscoverProtectableItemRequestProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiscoverProtectableItemRequestProperties. - */ - public static DiscoverProtectableItemRequestProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiscoverProtectableItemRequestProperties deserializedDiscoverProtectableItemRequestProperties - = new DiscoverProtectableItemRequestProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedDiscoverProtectableItemRequestProperties.friendlyName = reader.getString(); - } else if ("ipAddress".equals(fieldName)) { - deserializedDiscoverProtectableItemRequestProperties.ipAddress = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedDiscoverProtectableItemRequestProperties.osType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDiscoverProtectableItemRequestProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskAccountType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskAccountType.java deleted file mode 100644 index e4234b8505dc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskAccountType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The DiskType. - */ -public final class DiskAccountType extends ExpandableStringEnum { - /** - * Static value Standard_LRS for DiskAccountType. - */ - public static final DiskAccountType STANDARD_LRS = fromString("Standard_LRS"); - - /** - * Static value Premium_LRS for DiskAccountType. - */ - public static final DiskAccountType PREMIUM_LRS = fromString("Premium_LRS"); - - /** - * Static value StandardSSD_LRS for DiskAccountType. - */ - public static final DiskAccountType STANDARD_SSD_LRS = fromString("StandardSSD_LRS"); - - /** - * Creates a new instance of DiskAccountType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiskAccountType() { - } - - /** - * Creates or finds a DiskAccountType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiskAccountType. - */ - public static DiskAccountType fromString(String name) { - return fromString(name, DiskAccountType.class); - } - - /** - * Gets known DiskAccountType values. - * - * @return known DiskAccountType values. - */ - public static Collection values() { - return values(DiskAccountType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskDetails.java deleted file mode 100644 index 29dfa98d5256..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskDetails.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Onprem disk details data. - */ -@Fluent -public final class DiskDetails implements JsonSerializable { - /* - * The hard disk max size in MB. - */ - private Long maxSizeMB; - - /* - * The type of the volume. - */ - private String vhdType; - - /* - * The VHD Id. - */ - private String vhdId; - - /* - * The VHD name. - */ - private String vhdName; - - /** - * Creates an instance of DiskDetails class. - */ - public DiskDetails() { - } - - /** - * Get the maxSizeMB property: The hard disk max size in MB. - * - * @return the maxSizeMB value. - */ - public Long maxSizeMB() { - return this.maxSizeMB; - } - - /** - * Set the maxSizeMB property: 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 vhdType property: The type of the volume. - * - * @return the vhdType value. - */ - public String vhdType() { - return this.vhdType; - } - - /** - * Set the vhdType property: 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 vhdId property: The VHD Id. - * - * @return the vhdId value. - */ - public String vhdId() { - return this.vhdId; - } - - /** - * Set the vhdId property: 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 vhdName property: The VHD name. - * - * @return the vhdName value. - */ - public String vhdName() { - return this.vhdName; - } - - /** - * Set the vhdName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("maxSizeMB", this.maxSizeMB); - jsonWriter.writeStringField("vhdType", this.vhdType); - jsonWriter.writeStringField("vhdId", this.vhdId); - jsonWriter.writeStringField("vhdName", this.vhdName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DiskDetails. - */ - public static DiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskDetails deserializedDiskDetails = new DiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxSizeMB".equals(fieldName)) { - deserializedDiskDetails.maxSizeMB = reader.getNullable(JsonReader::getLong); - } else if ("vhdType".equals(fieldName)) { - deserializedDiskDetails.vhdType = reader.getString(); - } else if ("vhdId".equals(fieldName)) { - deserializedDiskDetails.vhdId = reader.getString(); - } else if ("vhdName".equals(fieldName)) { - deserializedDiskDetails.vhdName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskEncryptionInfo.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskEncryptionInfo.java deleted file mode 100644 index a88980c46e9b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskEncryptionInfo.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery disk encryption info (BEK and KEK). - */ -@Fluent -public final class DiskEncryptionInfo implements JsonSerializable { - /* - * The recovery KeyVault reference for secret. - */ - private DiskEncryptionKeyInfo diskEncryptionKeyInfo; - - /* - * The recovery KeyVault reference for key. - */ - private KeyEncryptionKeyInfo keyEncryptionKeyInfo; - - /** - * Creates an instance of DiskEncryptionInfo class. - */ - public DiskEncryptionInfo() { - } - - /** - * Get the diskEncryptionKeyInfo property: The recovery KeyVault reference for secret. - * - * @return the diskEncryptionKeyInfo value. - */ - public DiskEncryptionKeyInfo diskEncryptionKeyInfo() { - return this.diskEncryptionKeyInfo; - } - - /** - * Set the diskEncryptionKeyInfo property: The recovery KeyVault reference for secret. - * - * @param diskEncryptionKeyInfo the diskEncryptionKeyInfo value to set. - * @return the DiskEncryptionInfo object itself. - */ - public DiskEncryptionInfo withDiskEncryptionKeyInfo(DiskEncryptionKeyInfo diskEncryptionKeyInfo) { - this.diskEncryptionKeyInfo = diskEncryptionKeyInfo; - return this; - } - - /** - * Get the keyEncryptionKeyInfo property: The recovery KeyVault reference for key. - * - * @return the keyEncryptionKeyInfo value. - */ - public KeyEncryptionKeyInfo keyEncryptionKeyInfo() { - return this.keyEncryptionKeyInfo; - } - - /** - * Set the keyEncryptionKeyInfo property: The recovery KeyVault reference for key. - * - * @param keyEncryptionKeyInfo the keyEncryptionKeyInfo value to set. - * @return the DiskEncryptionInfo object itself. - */ - public DiskEncryptionInfo withKeyEncryptionKeyInfo(KeyEncryptionKeyInfo keyEncryptionKeyInfo) { - this.keyEncryptionKeyInfo = keyEncryptionKeyInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskEncryptionKeyInfo() != null) { - diskEncryptionKeyInfo().validate(); - } - if (keyEncryptionKeyInfo() != null) { - keyEncryptionKeyInfo().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("diskEncryptionKeyInfo", this.diskEncryptionKeyInfo); - jsonWriter.writeJsonField("keyEncryptionKeyInfo", this.keyEncryptionKeyInfo); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskEncryptionInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskEncryptionInfo if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DiskEncryptionInfo. - */ - public static DiskEncryptionInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskEncryptionInfo deserializedDiskEncryptionInfo = new DiskEncryptionInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskEncryptionKeyInfo".equals(fieldName)) { - deserializedDiskEncryptionInfo.diskEncryptionKeyInfo = DiskEncryptionKeyInfo.fromJson(reader); - } else if ("keyEncryptionKeyInfo".equals(fieldName)) { - deserializedDiskEncryptionInfo.keyEncryptionKeyInfo = KeyEncryptionKeyInfo.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDiskEncryptionInfo; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskEncryptionKeyInfo.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskEncryptionKeyInfo.java deleted file mode 100644 index c43deec87dd5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskEncryptionKeyInfo.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Disk Encryption Key Information (BitLocker Encryption Key (BEK) on Windows). - */ -@Fluent -public final class DiskEncryptionKeyInfo implements JsonSerializable { - /* - * The secret url / identifier. - */ - private String secretIdentifier; - - /* - * The KeyVault resource ARM id for secret. - */ - private String keyVaultResourceArmId; - - /** - * Creates an instance of DiskEncryptionKeyInfo class. - */ - public DiskEncryptionKeyInfo() { - } - - /** - * Get the secretIdentifier property: The secret url / identifier. - * - * @return the secretIdentifier value. - */ - public String secretIdentifier() { - return this.secretIdentifier; - } - - /** - * Set the secretIdentifier property: The secret url / identifier. - * - * @param secretIdentifier the secretIdentifier value to set. - * @return the DiskEncryptionKeyInfo object itself. - */ - public DiskEncryptionKeyInfo withSecretIdentifier(String secretIdentifier) { - this.secretIdentifier = secretIdentifier; - return this; - } - - /** - * Get the keyVaultResourceArmId property: The KeyVault resource ARM id for secret. - * - * @return the keyVaultResourceArmId value. - */ - public String keyVaultResourceArmId() { - return this.keyVaultResourceArmId; - } - - /** - * Set the keyVaultResourceArmId property: The KeyVault resource ARM id for secret. - * - * @param keyVaultResourceArmId the keyVaultResourceArmId value to set. - * @return the DiskEncryptionKeyInfo object itself. - */ - public DiskEncryptionKeyInfo withKeyVaultResourceArmId(String keyVaultResourceArmId) { - this.keyVaultResourceArmId = keyVaultResourceArmId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("secretIdentifier", this.secretIdentifier); - jsonWriter.writeStringField("keyVaultResourceArmId", this.keyVaultResourceArmId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskEncryptionKeyInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskEncryptionKeyInfo if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiskEncryptionKeyInfo. - */ - public static DiskEncryptionKeyInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskEncryptionKeyInfo deserializedDiskEncryptionKeyInfo = new DiskEncryptionKeyInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secretIdentifier".equals(fieldName)) { - deserializedDiskEncryptionKeyInfo.secretIdentifier = reader.getString(); - } else if ("keyVaultResourceArmId".equals(fieldName)) { - deserializedDiskEncryptionKeyInfo.keyVaultResourceArmId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDiskEncryptionKeyInfo; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskReplicationProgressHealth.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskReplicationProgressHealth.java deleted file mode 100644 index a5144771c6b4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskReplicationProgressHealth.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The progress health. - */ -public final class DiskReplicationProgressHealth extends ExpandableStringEnum { - /** - * Static value None for DiskReplicationProgressHealth. - */ - public static final DiskReplicationProgressHealth NONE = fromString("None"); - - /** - * Static value InProgress for DiskReplicationProgressHealth. - */ - public static final DiskReplicationProgressHealth IN_PROGRESS = fromString("InProgress"); - - /** - * Static value SlowProgress for DiskReplicationProgressHealth. - */ - public static final DiskReplicationProgressHealth SLOW_PROGRESS = fromString("SlowProgress"); - - /** - * Static value NoProgress for DiskReplicationProgressHealth. - */ - public static final DiskReplicationProgressHealth NO_PROGRESS = fromString("NoProgress"); - - /** - * Static value Queued for DiskReplicationProgressHealth. - */ - public static final DiskReplicationProgressHealth QUEUED = fromString("Queued"); - - /** - * Creates a new instance of DiskReplicationProgressHealth value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiskReplicationProgressHealth() { - } - - /** - * Creates or finds a DiskReplicationProgressHealth from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiskReplicationProgressHealth. - */ - public static DiskReplicationProgressHealth fromString(String name) { - return fromString(name, DiskReplicationProgressHealth.class); - } - - /** - * Gets known DiskReplicationProgressHealth values. - * - * @return known DiskReplicationProgressHealth values. - */ - public static Collection values() { - return values(DiskReplicationProgressHealth.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskVolumeDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskVolumeDetails.java deleted file mode 100644 index beaa78d18c7f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DiskVolumeDetails.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Volume details. - */ -@Fluent -public final class DiskVolumeDetails implements JsonSerializable { - /* - * The volume label. - */ - private String label; - - /* - * The volume name. - */ - private String name; - - /** - * Creates an instance of DiskVolumeDetails class. - */ - public DiskVolumeDetails() { - } - - /** - * Get the label property: The volume label. - * - * @return the label value. - */ - public String label() { - return this.label; - } - - /** - * Set the label property: 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 name property: The volume name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("label", this.label); - jsonWriter.writeStringField("name", this.name); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskVolumeDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskVolumeDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DiskVolumeDetails. - */ - public static DiskVolumeDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskVolumeDetails deserializedDiskVolumeDetails = new DiskVolumeDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("label".equals(fieldName)) { - deserializedDiskVolumeDetails.label = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDiskVolumeDetails.name = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDiskVolumeDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Display.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Display.java deleted file mode 100644 index 08a91faffabf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Display.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * 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. - */ -@Fluent -public final class Display implements JsonSerializable { - /* - * 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.". - */ - 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". - */ - 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'. - */ - 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'. - */ - private String description; - - /** - * Creates an instance of Display class. - */ - public Display() { - } - - /** - * Get the provider property: 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 property: 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 property: 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 property: 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 property: 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 property: 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 property: 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 property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("provider", this.provider); - jsonWriter.writeStringField("resource", this.resource); - jsonWriter.writeStringField("operation", this.operation); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Display from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Display if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Display. - */ - public static Display fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Display deserializedDisplay = new Display(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedDisplay.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedDisplay.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedDisplay.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedDisplay.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDisplay; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DraDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DraDetails.java deleted file mode 100644 index 79b7414f8745..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/DraDetails.java +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * DRA details. - */ -@Immutable -public final class DraDetails implements JsonSerializable { - /* - * The DRA Id. - */ - private String id; - - /* - * The DRA name. - */ - private String name; - - /* - * The DRA Bios Id. - */ - private String biosId; - - /* - * The version. - */ - private String version; - - /* - * The last heartbeat received from the DRA. - */ - private OffsetDateTime lastHeartbeatUtc; - - /* - * The health. - */ - private ProtectionHealth health; - - /* - * The health errors. - */ - private List healthErrors; - - /* - * The count of protected items which are protected in forward direction. - */ - private Integer forwardProtectedItemCount; - - /* - * The count of protected items which are protected in reverse direction. - */ - private Integer reverseProtectedItemCount; - - /** - * Creates an instance of DraDetails class. - */ - public DraDetails() { - } - - /** - * Get the id property: The DRA Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The DRA name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the biosId property: The DRA Bios Id. - * - * @return the biosId value. - */ - public String biosId() { - return this.biosId; - } - - /** - * Get the version property: The version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the lastHeartbeatUtc property: The last heartbeat received from the DRA. - * - * @return the lastHeartbeatUtc value. - */ - public OffsetDateTime lastHeartbeatUtc() { - return this.lastHeartbeatUtc; - } - - /** - * Get the health property: The health. - * - * @return the health value. - */ - public ProtectionHealth health() { - return this.health; - } - - /** - * Get the healthErrors property: The health errors. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Get the forwardProtectedItemCount property: The count of protected items which are protected in forward - * direction. - * - * @return the forwardProtectedItemCount value. - */ - public Integer forwardProtectedItemCount() { - return this.forwardProtectedItemCount; - } - - /** - * Get the reverseProtectedItemCount property: The count of protected items which are protected in reverse - * direction. - * - * @return the reverseProtectedItemCount value. - */ - public Integer reverseProtectedItemCount() { - return this.reverseProtectedItemCount; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DraDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DraDetails if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the DraDetails. - */ - public static DraDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DraDetails deserializedDraDetails = new DraDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDraDetails.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDraDetails.name = reader.getString(); - } else if ("biosId".equals(fieldName)) { - deserializedDraDetails.biosId = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedDraDetails.version = reader.getString(); - } else if ("lastHeartbeatUtc".equals(fieldName)) { - deserializedDraDetails.lastHeartbeatUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("health".equals(fieldName)) { - deserializedDraDetails.health = ProtectionHealth.fromString(reader.getString()); - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedDraDetails.healthErrors = healthErrors; - } else if ("forwardProtectedItemCount".equals(fieldName)) { - deserializedDraDetails.forwardProtectedItemCount = reader.getNullable(JsonReader::getInt); - } else if ("reverseProtectedItemCount".equals(fieldName)) { - deserializedDraDetails.reverseProtectedItemCount = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDraDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableMigrationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableMigrationInput.java deleted file mode 100644 index dad2f5d62ceb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableMigrationInput.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Enable migration input. - */ -@Fluent -public final class EnableMigrationInput implements JsonSerializable { - /* - * Enable migration input properties. - */ - private EnableMigrationInputProperties properties; - - /** - * Creates an instance of EnableMigrationInput class. - */ - public EnableMigrationInput() { - } - - /** - * Get the properties property: Enable migration input properties. - * - * @return the properties value. - */ - public EnableMigrationInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Enable migration input properties. - * - * @param properties the properties value to set. - * @return the EnableMigrationInput object itself. - */ - public EnableMigrationInput withProperties(EnableMigrationInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property properties in model EnableMigrationInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EnableMigrationInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnableMigrationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnableMigrationInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EnableMigrationInput. - */ - public static EnableMigrationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnableMigrationInput deserializedEnableMigrationInput = new EnableMigrationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedEnableMigrationInput.properties = EnableMigrationInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEnableMigrationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableMigrationInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableMigrationInputProperties.java deleted file mode 100644 index 8e86924d9a58..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableMigrationInputProperties.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Enable migration input properties. - */ -@Fluent -public final class EnableMigrationInputProperties implements JsonSerializable { - /* - * The policy Id. - */ - private String policyId; - - /* - * The provider specific details. - */ - private EnableMigrationProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of EnableMigrationInputProperties class. - */ - public EnableMigrationInputProperties() { - } - - /** - * Get the policyId property: The policy Id. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Set the policyId property: The policy Id. - * - * @param policyId the policyId value to set. - * @return the EnableMigrationInputProperties object itself. - */ - public EnableMigrationInputProperties withPolicyId(String policyId) { - this.policyId = policyId; - return this; - } - - /** - * Get the providerSpecificDetails property: The provider specific details. - * - * @return the providerSpecificDetails value. - */ - public EnableMigrationProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: The provider specific details. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the EnableMigrationInputProperties object itself. - */ - public EnableMigrationInputProperties - withProviderSpecificDetails(EnableMigrationProviderSpecificInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (policyId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property policyId in model EnableMigrationInputProperties")); - } - if (providerSpecificDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property providerSpecificDetails in model EnableMigrationInputProperties")); - } else { - providerSpecificDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EnableMigrationInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("policyId", this.policyId); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnableMigrationInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnableMigrationInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EnableMigrationInputProperties. - */ - public static EnableMigrationInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnableMigrationInputProperties deserializedEnableMigrationInputProperties - = new EnableMigrationInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("policyId".equals(fieldName)) { - deserializedEnableMigrationInputProperties.policyId = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedEnableMigrationInputProperties.providerSpecificDetails - = EnableMigrationProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEnableMigrationInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableMigrationProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableMigrationProviderSpecificInput.java deleted file mode 100644 index 9eaa20f04f75..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableMigrationProviderSpecificInput.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Enable migration provider specific input. - */ -@Immutable -public class EnableMigrationProviderSpecificInput implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "EnableMigrationProviderSpecificInput"; - - /** - * Creates an instance of EnableMigrationProviderSpecificInput class. - */ - public EnableMigrationProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnableMigrationProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnableMigrationProviderSpecificInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EnableMigrationProviderSpecificInput. - */ - public static EnableMigrationProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("VMwareCbt".equals(discriminatorValue)) { - return VMwareCbtEnableMigrationInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static EnableMigrationProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnableMigrationProviderSpecificInput deserializedEnableMigrationProviderSpecificInput - = new EnableMigrationProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedEnableMigrationProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEnableMigrationProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableProtectionInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableProtectionInput.java deleted file mode 100644 index fda688f260c9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableProtectionInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Enable protection input. - */ -@Fluent -public final class EnableProtectionInput implements JsonSerializable { - /* - * Enable protection input properties. - */ - private EnableProtectionInputProperties properties; - - /** - * Creates an instance of EnableProtectionInput class. - */ - public EnableProtectionInput() { - } - - /** - * Get the properties property: Enable protection input properties. - * - * @return the properties value. - */ - public EnableProtectionInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnableProtectionInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnableProtectionInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the EnableProtectionInput. - */ - public static EnableProtectionInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnableProtectionInput deserializedEnableProtectionInput = new EnableProtectionInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedEnableProtectionInput.properties = EnableProtectionInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEnableProtectionInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableProtectionInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableProtectionInputProperties.java deleted file mode 100644 index e09820e6d782..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableProtectionInputProperties.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Enable protection input properties. - */ -@Fluent -public final class EnableProtectionInputProperties implements JsonSerializable { - /* - * The Policy Id. - */ - private String policyId; - - /* - * The protectable item Id. - */ - 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. - */ - private EnableProtectionProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of EnableProtectionInputProperties class. - */ - public EnableProtectionInputProperties() { - } - - /** - * Get the policyId property: The Policy Id. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Set the policyId property: 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 protectableItemId property: The protectable item Id. - * - * @return the protectableItemId value. - */ - public String protectableItemId() { - return this.protectableItemId; - } - - /** - * Set the protectableItemId property: 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 providerSpecificDetails property: 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 providerSpecificDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("policyId", this.policyId); - jsonWriter.writeStringField("protectableItemId", this.protectableItemId); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnableProtectionInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnableProtectionInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EnableProtectionInputProperties. - */ - public static EnableProtectionInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnableProtectionInputProperties deserializedEnableProtectionInputProperties - = new EnableProtectionInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("policyId".equals(fieldName)) { - deserializedEnableProtectionInputProperties.policyId = reader.getString(); - } else if ("protectableItemId".equals(fieldName)) { - deserializedEnableProtectionInputProperties.protectableItemId = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedEnableProtectionInputProperties.providerSpecificDetails - = EnableProtectionProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEnableProtectionInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableProtectionProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableProtectionProviderSpecificInput.java deleted file mode 100644 index 730a38e02d39..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EnableProtectionProviderSpecificInput.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Enable protection provider specific input. - */ -@Immutable -public class EnableProtectionProviderSpecificInput implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "EnableProtectionProviderSpecificInput"; - - /** - * Creates an instance of EnableProtectionProviderSpecificInput class. - */ - public EnableProtectionProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnableProtectionProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnableProtectionProviderSpecificInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EnableProtectionProviderSpecificInput. - */ - public static EnableProtectionProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2ACrossClusterMigration".equals(discriminatorValue)) { - return A2ACrossClusterMigrationEnableProtectionInput.fromJson(readerToUse.reset()); - } else if ("A2A".equals(discriminatorValue)) { - return A2AEnableProtectionInput.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzure".equals(discriminatorValue)) { - return HyperVReplicaAzureEnableProtectionInput.fromJson(readerToUse.reset()); - } else if ("InMageAzureV2".equals(discriminatorValue)) { - return InMageAzureV2EnableProtectionInput.fromJson(readerToUse.reset()); - } else if ("InMage".equals(discriminatorValue)) { - return InMageEnableProtectionInput.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmEnableProtectionInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static EnableProtectionProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnableProtectionProviderSpecificInput deserializedEnableProtectionProviderSpecificInput - = new EnableProtectionProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedEnableProtectionProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEnableProtectionProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EncryptionDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EncryptionDetails.java deleted file mode 100644 index da98dc0b7e18..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EncryptionDetails.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Encryption details for the fabric. - */ -@Fluent -public final class EncryptionDetails implements JsonSerializable { - /* - * The key encryption key state for the Vmm. - */ - private String kekState; - - /* - * The key encryption key certificate thumbprint. - */ - private String kekCertThumbprint; - - /* - * The key encryption key certificate expiry date. - */ - private OffsetDateTime kekCertExpiryDate; - - /** - * Creates an instance of EncryptionDetails class. - */ - public EncryptionDetails() { - } - - /** - * Get the kekState property: The key encryption key state for the Vmm. - * - * @return the kekState value. - */ - public String kekState() { - return this.kekState; - } - - /** - * Set the kekState property: 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 kekCertThumbprint property: The key encryption key certificate thumbprint. - * - * @return the kekCertThumbprint value. - */ - public String kekCertThumbprint() { - return this.kekCertThumbprint; - } - - /** - * Set the kekCertThumbprint property: 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 kekCertExpiryDate property: The key encryption key certificate expiry date. - * - * @return the kekCertExpiryDate value. - */ - public OffsetDateTime kekCertExpiryDate() { - return this.kekCertExpiryDate; - } - - /** - * Set the kekCertExpiryDate property: The key encryption key certificate expiry date. - * - * @param kekCertExpiryDate the kekCertExpiryDate value to set. - * @return the EncryptionDetails object itself. - */ - public EncryptionDetails withKekCertExpiryDate(OffsetDateTime kekCertExpiryDate) { - this.kekCertExpiryDate = kekCertExpiryDate; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("kekState", this.kekState); - jsonWriter.writeStringField("kekCertThumbprint", this.kekCertThumbprint); - jsonWriter.writeStringField("kekCertExpiryDate", - this.kekCertExpiryDate == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.kekCertExpiryDate)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EncryptionDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EncryptionDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EncryptionDetails. - */ - public static EncryptionDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EncryptionDetails deserializedEncryptionDetails = new EncryptionDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("kekState".equals(fieldName)) { - deserializedEncryptionDetails.kekState = reader.getString(); - } else if ("kekCertThumbprint".equals(fieldName)) { - deserializedEncryptionDetails.kekCertThumbprint = reader.getString(); - } else if ("kekCertExpiryDate".equals(fieldName)) { - deserializedEncryptionDetails.kekCertExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedEncryptionDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EthernetAddressType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EthernetAddressType.java deleted file mode 100644 index 43954021d755..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EthernetAddressType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The source IP address type. - */ -public final class EthernetAddressType extends ExpandableStringEnum { - /** - * Static value Dynamic for EthernetAddressType. - */ - public static final EthernetAddressType DYNAMIC = fromString("Dynamic"); - - /** - * Static value Static for EthernetAddressType. - */ - public static final EthernetAddressType STATIC = fromString("Static"); - - /** - * Creates a new instance of EthernetAddressType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EthernetAddressType() { - } - - /** - * Creates or finds a EthernetAddressType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EthernetAddressType. - */ - public static EthernetAddressType fromString(String name) { - return fromString(name, EthernetAddressType.class); - } - - /** - * Gets known EthernetAddressType values. - * - * @return known EthernetAddressType values. - */ - public static Collection values() { - return values(EthernetAddressType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Event.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Event.java deleted file mode 100644 index adb80e817061..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Event.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.EventInner; - -/** - * An immutable client-side representation of Event. - */ -public interface Event { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Event related data. - * - * @return the properties value. - */ - EventProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.EventInner object. - * - * @return the inner object. - */ - EventInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EventCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EventCollection.java deleted file mode 100644 index 4215f97420ee..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EventCollection.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.EventInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of fabric details. - */ -@Fluent -public final class EventCollection implements JsonSerializable { - /* - * The list of events. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of EventCollection class. - */ - public EventCollection() { - } - - /** - * Get the value property: The list of events. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of events. - * - * @param value the value value to set. - * @return the EventCollection object itself. - */ - public EventCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the EventCollection object itself. - */ - public EventCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EventCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EventCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EventCollection. - */ - public static EventCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EventCollection deserializedEventCollection = new EventCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> EventInner.fromJson(reader1)); - deserializedEventCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEventCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEventCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EventProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EventProperties.java deleted file mode 100644 index 75e0224d1a40..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EventProperties.java +++ /dev/null @@ -1,393 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * The properties of a monitoring event. - */ -@Fluent -public final class EventProperties implements JsonSerializable { - /* - * The Id of the monitoring event. - */ - private String eventCode; - - /* - * The event name. - */ - private String description; - - /* - * The type of the event. for example: VM Health, Server Health, Job Failure etc. - */ - private String eventType; - - /* - * The friendly name of the source of the event on which it is raised (for example, VM, VMM etc). - */ - private String affectedObjectFriendlyName; - - /* - * The affected object correlationId for the event. - */ - private String affectedObjectCorrelationId; - - /* - * The severity of the event. - */ - private String severity; - - /* - * The time of occurrence of the event. - */ - private OffsetDateTime timeOfOccurrence; - - /* - * The ARM ID of the fabric. - */ - private String fabricId; - - /* - * The provider specific settings. - */ - private EventProviderSpecificDetails providerSpecificDetails; - - /* - * The event specific settings. - */ - private EventSpecificDetails eventSpecificDetails; - - /* - * The list of errors / warnings capturing details associated with the issue(s). - */ - private List healthErrors; - - /** - * Creates an instance of EventProperties class. - */ - public EventProperties() { - } - - /** - * Get the eventCode property: The Id of the monitoring event. - * - * @return the eventCode value. - */ - public String eventCode() { - return this.eventCode; - } - - /** - * Set the eventCode property: 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 description property: The event name. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: 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 eventType property: 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 eventType property: 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 affectedObjectFriendlyName property: 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 affectedObjectFriendlyName property: 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 affectedObjectCorrelationId property: The affected object correlationId for the event. - * - * @return the affectedObjectCorrelationId value. - */ - public String affectedObjectCorrelationId() { - return this.affectedObjectCorrelationId; - } - - /** - * Set the affectedObjectCorrelationId property: The affected object correlationId for the event. - * - * @param affectedObjectCorrelationId the affectedObjectCorrelationId value to set. - * @return the EventProperties object itself. - */ - public EventProperties withAffectedObjectCorrelationId(String affectedObjectCorrelationId) { - this.affectedObjectCorrelationId = affectedObjectCorrelationId; - return this; - } - - /** - * Get the severity property: The severity of the event. - * - * @return the severity value. - */ - public String severity() { - return this.severity; - } - - /** - * Set the severity property: 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 timeOfOccurrence property: The time of occurrence of the event. - * - * @return the timeOfOccurrence value. - */ - public OffsetDateTime timeOfOccurrence() { - return this.timeOfOccurrence; - } - - /** - * Set the timeOfOccurrence property: The time of occurrence of the event. - * - * @param timeOfOccurrence the timeOfOccurrence value to set. - * @return the EventProperties object itself. - */ - public EventProperties withTimeOfOccurrence(OffsetDateTime timeOfOccurrence) { - this.timeOfOccurrence = timeOfOccurrence; - return this; - } - - /** - * Get the fabricId property: The ARM ID of the fabric. - * - * @return the fabricId value. - */ - public String fabricId() { - return this.fabricId; - } - - /** - * Set the fabricId property: 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 providerSpecificDetails property: The provider specific settings. - * - * @return the providerSpecificDetails value. - */ - public EventProviderSpecificDetails providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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 eventSpecificDetails property: The event specific settings. - * - * @return the eventSpecificDetails value. - */ - public EventSpecificDetails eventSpecificDetails() { - return this.eventSpecificDetails; - } - - /** - * Set the eventSpecificDetails property: 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 healthErrors property: The list of errors / warnings capturing details associated with the issue(s). - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Set the healthErrors property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - if (eventSpecificDetails() != null) { - eventSpecificDetails().validate(); - } - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("eventCode", this.eventCode); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("eventType", this.eventType); - jsonWriter.writeStringField("affectedObjectFriendlyName", this.affectedObjectFriendlyName); - jsonWriter.writeStringField("affectedObjectCorrelationId", this.affectedObjectCorrelationId); - jsonWriter.writeStringField("severity", this.severity); - jsonWriter.writeStringField("timeOfOccurrence", - this.timeOfOccurrence == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timeOfOccurrence)); - jsonWriter.writeStringField("fabricId", this.fabricId); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - jsonWriter.writeJsonField("eventSpecificDetails", this.eventSpecificDetails); - jsonWriter.writeArrayField("healthErrors", this.healthErrors, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EventProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EventProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EventProperties. - */ - public static EventProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EventProperties deserializedEventProperties = new EventProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("eventCode".equals(fieldName)) { - deserializedEventProperties.eventCode = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedEventProperties.description = reader.getString(); - } else if ("eventType".equals(fieldName)) { - deserializedEventProperties.eventType = reader.getString(); - } else if ("affectedObjectFriendlyName".equals(fieldName)) { - deserializedEventProperties.affectedObjectFriendlyName = reader.getString(); - } else if ("affectedObjectCorrelationId".equals(fieldName)) { - deserializedEventProperties.affectedObjectCorrelationId = reader.getString(); - } else if ("severity".equals(fieldName)) { - deserializedEventProperties.severity = reader.getString(); - } else if ("timeOfOccurrence".equals(fieldName)) { - deserializedEventProperties.timeOfOccurrence = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("fabricId".equals(fieldName)) { - deserializedEventProperties.fabricId = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedEventProperties.providerSpecificDetails = EventProviderSpecificDetails.fromJson(reader); - } else if ("eventSpecificDetails".equals(fieldName)) { - deserializedEventProperties.eventSpecificDetails = EventSpecificDetails.fromJson(reader); - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedEventProperties.healthErrors = healthErrors; - } else { - reader.skipChildren(); - } - } - - return deserializedEventProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EventProviderSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EventProviderSpecificDetails.java deleted file mode 100644 index 8460b5192230..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EventProviderSpecificDetails.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model class for provider specific details for an event. - */ -@Immutable -public class EventProviderSpecificDetails implements JsonSerializable { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "EventProviderSpecificDetails"; - - /** - * Creates an instance of EventProviderSpecificDetails class. - */ - public EventProviderSpecificDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EventProviderSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EventProviderSpecificDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EventProviderSpecificDetails. - */ - public static EventProviderSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2AEventDetails.fromJson(readerToUse.reset()); - } else if ("HyperVReplica2012".equals(discriminatorValue)) { - return HyperVReplica2012EventDetails.fromJson(readerToUse.reset()); - } else if ("HyperVReplica2012R2".equals(discriminatorValue)) { - return HyperVReplica2012R2EventDetails.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzure".equals(discriminatorValue)) { - return HyperVReplicaAzureEventDetails.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaBaseEventDetails".equals(discriminatorValue)) { - return HyperVReplicaBaseEventDetails.fromJson(readerToUse.reset()); - } else if ("InMageAzureV2".equals(discriminatorValue)) { - return InMageAzureV2EventDetails.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmEventDetails.fromJson(readerToUse.reset()); - } else if ("InMageRcmFailback".equals(discriminatorValue)) { - return InMageRcmFailbackEventDetails.fromJson(readerToUse.reset()); - } else if ("VMwareCbt".equals(discriminatorValue)) { - return VMwareCbtEventDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static EventProviderSpecificDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EventProviderSpecificDetails deserializedEventProviderSpecificDetails = new EventProviderSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedEventProviderSpecificDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEventProviderSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EventSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EventSpecificDetails.java deleted file mode 100644 index a5da2074f56e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/EventSpecificDetails.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model class for event specific details for an event. - */ -@Immutable -public class EventSpecificDetails implements JsonSerializable { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "EventSpecificDetails"; - - /** - * Creates an instance of EventSpecificDetails class. - */ - public EventSpecificDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EventSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EventSpecificDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the EventSpecificDetails. - */ - public static EventSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("JobStatus".equals(discriminatorValue)) { - return JobStatusEventDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static EventSpecificDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EventSpecificDetails deserializedEventSpecificDetails = new EventSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedEventSpecificDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEventSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingProtectionProfile.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingProtectionProfile.java deleted file mode 100644 index f2637c8991d3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingProtectionProfile.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Existing storage account input. - */ -@Fluent -public final class ExistingProtectionProfile extends ProtectionProfileCustomDetails { - /* - * The class type. - */ - private String resourceType = "Existing"; - - /* - * The protection profile Arm Id. Throw error, if resource does not exists. - */ - private String protectionProfileId; - - /** - * Creates an instance of ExistingProtectionProfile class. - */ - public ExistingProtectionProfile() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - @Override - public String resourceType() { - return this.resourceType; - } - - /** - * Get the protectionProfileId property: The protection profile Arm Id. Throw error, if resource does not exists. - * - * @return the protectionProfileId value. - */ - public String protectionProfileId() { - return this.protectionProfileId; - } - - /** - * Set the protectionProfileId property: The protection profile Arm Id. Throw error, if resource does not exists. - * - * @param protectionProfileId the protectionProfileId value to set. - * @return the ExistingProtectionProfile object itself. - */ - public ExistingProtectionProfile withProtectionProfileId(String protectionProfileId) { - this.protectionProfileId = protectionProfileId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (protectionProfileId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property protectionProfileId in model ExistingProtectionProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ExistingProtectionProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("protectionProfileId", this.protectionProfileId); - jsonWriter.writeStringField("resourceType", this.resourceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExistingProtectionProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExistingProtectionProfile if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ExistingProtectionProfile. - */ - public static ExistingProtectionProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExistingProtectionProfile deserializedExistingProtectionProfile = new ExistingProtectionProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("protectionProfileId".equals(fieldName)) { - deserializedExistingProtectionProfile.protectionProfileId = reader.getString(); - } else if ("resourceType".equals(fieldName)) { - deserializedExistingProtectionProfile.resourceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedExistingProtectionProfile; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingRecoveryAvailabilitySet.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingRecoveryAvailabilitySet.java deleted file mode 100644 index 8e9976744747..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingRecoveryAvailabilitySet.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Existing recovery availability set input. - */ -@Fluent -public final class ExistingRecoveryAvailabilitySet extends RecoveryAvailabilitySetCustomDetails { - /* - * The class type. - */ - private String resourceType = "Existing"; - - /* - * The recovery availability set Id. Will throw error, if resource does not exist. - */ - private String recoveryAvailabilitySetId; - - /** - * Creates an instance of ExistingRecoveryAvailabilitySet class. - */ - public ExistingRecoveryAvailabilitySet() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - @Override - public String resourceType() { - return this.resourceType; - } - - /** - * Get the recoveryAvailabilitySetId property: The recovery availability set Id. Will throw error, if resource does - * not exist. - * - * @return the recoveryAvailabilitySetId value. - */ - public String recoveryAvailabilitySetId() { - return this.recoveryAvailabilitySetId; - } - - /** - * Set the recoveryAvailabilitySetId property: The recovery availability set Id. Will throw error, if resource does - * not exist. - * - * @param recoveryAvailabilitySetId the recoveryAvailabilitySetId value to set. - * @return the ExistingRecoveryAvailabilitySet object itself. - */ - public ExistingRecoveryAvailabilitySet withRecoveryAvailabilitySetId(String recoveryAvailabilitySetId) { - this.recoveryAvailabilitySetId = recoveryAvailabilitySetId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceType", this.resourceType); - jsonWriter.writeStringField("recoveryAvailabilitySetId", this.recoveryAvailabilitySetId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExistingRecoveryAvailabilitySet from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExistingRecoveryAvailabilitySet if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ExistingRecoveryAvailabilitySet. - */ - public static ExistingRecoveryAvailabilitySet fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExistingRecoveryAvailabilitySet deserializedExistingRecoveryAvailabilitySet - = new ExistingRecoveryAvailabilitySet(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceType".equals(fieldName)) { - deserializedExistingRecoveryAvailabilitySet.resourceType = reader.getString(); - } else if ("recoveryAvailabilitySetId".equals(fieldName)) { - deserializedExistingRecoveryAvailabilitySet.recoveryAvailabilitySetId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedExistingRecoveryAvailabilitySet; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingRecoveryProximityPlacementGroup.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingRecoveryProximityPlacementGroup.java deleted file mode 100644 index 219638cdc9a0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingRecoveryProximityPlacementGroup.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Existing recovery proximity placement group input. - */ -@Fluent -public final class ExistingRecoveryProximityPlacementGroup extends RecoveryProximityPlacementGroupCustomDetails { - /* - * The class type. - */ - private String resourceType = "Existing"; - - /* - * The recovery proximity placement group Id. Will throw error, if resource does not exist. - */ - private String recoveryProximityPlacementGroupId; - - /** - * Creates an instance of ExistingRecoveryProximityPlacementGroup class. - */ - public ExistingRecoveryProximityPlacementGroup() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - @Override - public String resourceType() { - return this.resourceType; - } - - /** - * Get the recoveryProximityPlacementGroupId property: The recovery proximity placement group Id. Will throw error, - * if resource does not exist. - * - * @return the recoveryProximityPlacementGroupId value. - */ - public String recoveryProximityPlacementGroupId() { - return this.recoveryProximityPlacementGroupId; - } - - /** - * Set the recoveryProximityPlacementGroupId property: The recovery proximity placement group Id. Will throw error, - * if resource does not exist. - * - * @param recoveryProximityPlacementGroupId the recoveryProximityPlacementGroupId value to set. - * @return the ExistingRecoveryProximityPlacementGroup object itself. - */ - public ExistingRecoveryProximityPlacementGroup - withRecoveryProximityPlacementGroupId(String recoveryProximityPlacementGroupId) { - this.recoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceType", this.resourceType); - jsonWriter.writeStringField("recoveryProximityPlacementGroupId", this.recoveryProximityPlacementGroupId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExistingRecoveryProximityPlacementGroup from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExistingRecoveryProximityPlacementGroup if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ExistingRecoveryProximityPlacementGroup. - */ - public static ExistingRecoveryProximityPlacementGroup fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExistingRecoveryProximityPlacementGroup deserializedExistingRecoveryProximityPlacementGroup - = new ExistingRecoveryProximityPlacementGroup(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceType".equals(fieldName)) { - deserializedExistingRecoveryProximityPlacementGroup.resourceType = reader.getString(); - } else if ("recoveryProximityPlacementGroupId".equals(fieldName)) { - deserializedExistingRecoveryProximityPlacementGroup.recoveryProximityPlacementGroupId - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedExistingRecoveryProximityPlacementGroup; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingRecoveryResourceGroup.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingRecoveryResourceGroup.java deleted file mode 100644 index ccce63aab702..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingRecoveryResourceGroup.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Existing recovery resource group input. - */ -@Fluent -public final class ExistingRecoveryResourceGroup extends RecoveryResourceGroupCustomDetails { - /* - * The class type. - */ - private String resourceType = "Existing"; - - /* - * The recovery resource group Id. Valid for V2 scenarios. - */ - private String recoveryResourceGroupId; - - /** - * Creates an instance of ExistingRecoveryResourceGroup class. - */ - public ExistingRecoveryResourceGroup() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - @Override - public String resourceType() { - return this.resourceType; - } - - /** - * Get the recoveryResourceGroupId property: The recovery resource group Id. Valid for V2 scenarios. - * - * @return the recoveryResourceGroupId value. - */ - public String recoveryResourceGroupId() { - return this.recoveryResourceGroupId; - } - - /** - * Set the recoveryResourceGroupId property: The recovery resource group Id. Valid for V2 scenarios. - * - * @param recoveryResourceGroupId the recoveryResourceGroupId value to set. - * @return the ExistingRecoveryResourceGroup object itself. - */ - public ExistingRecoveryResourceGroup withRecoveryResourceGroupId(String recoveryResourceGroupId) { - this.recoveryResourceGroupId = recoveryResourceGroupId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceType", this.resourceType); - jsonWriter.writeStringField("recoveryResourceGroupId", this.recoveryResourceGroupId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExistingRecoveryResourceGroup from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExistingRecoveryResourceGroup if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ExistingRecoveryResourceGroup. - */ - public static ExistingRecoveryResourceGroup fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExistingRecoveryResourceGroup deserializedExistingRecoveryResourceGroup - = new ExistingRecoveryResourceGroup(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceType".equals(fieldName)) { - deserializedExistingRecoveryResourceGroup.resourceType = reader.getString(); - } else if ("recoveryResourceGroupId".equals(fieldName)) { - deserializedExistingRecoveryResourceGroup.recoveryResourceGroupId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedExistingRecoveryResourceGroup; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingRecoveryVirtualNetwork.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingRecoveryVirtualNetwork.java deleted file mode 100644 index ebed90c3704f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingRecoveryVirtualNetwork.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Existing recovery virtual network input. - */ -@Fluent -public final class ExistingRecoveryVirtualNetwork extends RecoveryVirtualNetworkCustomDetails { - /* - * The class type. - */ - private String resourceType = "Existing"; - - /* - * The recovery virtual network Id. Will throw error, if resource does not exist. - */ - private String recoveryVirtualNetworkId; - - /* - * The recovery subnet name. - */ - private String recoverySubnetName; - - /** - * Creates an instance of ExistingRecoveryVirtualNetwork class. - */ - public ExistingRecoveryVirtualNetwork() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - @Override - public String resourceType() { - return this.resourceType; - } - - /** - * Get the recoveryVirtualNetworkId property: The recovery virtual network Id. Will throw error, if resource does - * not exist. - * - * @return the recoveryVirtualNetworkId value. - */ - public String recoveryVirtualNetworkId() { - return this.recoveryVirtualNetworkId; - } - - /** - * Set the recoveryVirtualNetworkId property: The recovery virtual network Id. Will throw error, if resource does - * not exist. - * - * @param recoveryVirtualNetworkId the recoveryVirtualNetworkId value to set. - * @return the ExistingRecoveryVirtualNetwork object itself. - */ - public ExistingRecoveryVirtualNetwork withRecoveryVirtualNetworkId(String recoveryVirtualNetworkId) { - this.recoveryVirtualNetworkId = recoveryVirtualNetworkId; - return this; - } - - /** - * Get the recoverySubnetName property: The recovery subnet name. - * - * @return the recoverySubnetName value. - */ - public String recoverySubnetName() { - return this.recoverySubnetName; - } - - /** - * Set the recoverySubnetName property: The recovery subnet name. - * - * @param recoverySubnetName the recoverySubnetName value to set. - * @return the ExistingRecoveryVirtualNetwork object itself. - */ - public ExistingRecoveryVirtualNetwork withRecoverySubnetName(String recoverySubnetName) { - this.recoverySubnetName = recoverySubnetName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryVirtualNetworkId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryVirtualNetworkId in model ExistingRecoveryVirtualNetwork")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ExistingRecoveryVirtualNetwork.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryVirtualNetworkId", this.recoveryVirtualNetworkId); - jsonWriter.writeStringField("resourceType", this.resourceType); - jsonWriter.writeStringField("recoverySubnetName", this.recoverySubnetName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExistingRecoveryVirtualNetwork from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExistingRecoveryVirtualNetwork if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ExistingRecoveryVirtualNetwork. - */ - public static ExistingRecoveryVirtualNetwork fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExistingRecoveryVirtualNetwork deserializedExistingRecoveryVirtualNetwork - = new ExistingRecoveryVirtualNetwork(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryVirtualNetworkId".equals(fieldName)) { - deserializedExistingRecoveryVirtualNetwork.recoveryVirtualNetworkId = reader.getString(); - } else if ("resourceType".equals(fieldName)) { - deserializedExistingRecoveryVirtualNetwork.resourceType = reader.getString(); - } else if ("recoverySubnetName".equals(fieldName)) { - deserializedExistingRecoveryVirtualNetwork.recoverySubnetName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedExistingRecoveryVirtualNetwork; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingStorageAccount.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingStorageAccount.java deleted file mode 100644 index f56773434d25..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExistingStorageAccount.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Existing storage account input. - */ -@Fluent -public final class ExistingStorageAccount extends StorageAccountCustomDetails { - /* - * The class type. - */ - private String resourceType = "Existing"; - - /* - * The storage account Arm Id. Throw error, if resource does not exists. - */ - private String azureStorageAccountId; - - /** - * Creates an instance of ExistingStorageAccount class. - */ - public ExistingStorageAccount() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - @Override - public String resourceType() { - return this.resourceType; - } - - /** - * Get the azureStorageAccountId property: The storage account Arm Id. Throw error, if resource does not exists. - * - * @return the azureStorageAccountId value. - */ - public String azureStorageAccountId() { - return this.azureStorageAccountId; - } - - /** - * Set the azureStorageAccountId property: The storage account Arm Id. Throw error, if resource does not exists. - * - * @param azureStorageAccountId the azureStorageAccountId value to set. - * @return the ExistingStorageAccount object itself. - */ - public ExistingStorageAccount withAzureStorageAccountId(String azureStorageAccountId) { - this.azureStorageAccountId = azureStorageAccountId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (azureStorageAccountId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property azureStorageAccountId in model ExistingStorageAccount")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ExistingStorageAccount.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("azureStorageAccountId", this.azureStorageAccountId); - jsonWriter.writeStringField("resourceType", this.resourceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExistingStorageAccount from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExistingStorageAccount if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ExistingStorageAccount. - */ - public static ExistingStorageAccount fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExistingStorageAccount deserializedExistingStorageAccount = new ExistingStorageAccount(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("azureStorageAccountId".equals(fieldName)) { - deserializedExistingStorageAccount.azureStorageAccountId = reader.getString(); - } else if ("resourceType".equals(fieldName)) { - deserializedExistingStorageAccount.resourceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedExistingStorageAccount; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExportJobDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExportJobDetails.java deleted file mode 100644 index f2b70eb91083..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExportJobDetails.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * This class represents details for export jobs workflow. - */ -@Fluent -public final class ExportJobDetails extends JobDetails { - /* - * Gets the type of job details (see JobDetailsTypes enum for possible values). - */ - private String instanceType = "ExportJobDetails"; - - /* - * BlobUri of the exported jobs. - */ - private String blobUri; - - /* - * The sas token to access blob. - */ - private String sasToken; - - /** - * Creates an instance of ExportJobDetails class. - */ - public ExportJobDetails() { - } - - /** - * Get the instanceType property: Gets the type of job details (see JobDetailsTypes enum for possible values). - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the blobUri property: BlobUri of the exported jobs. - * - * @return the blobUri value. - */ - public String blobUri() { - return this.blobUri; - } - - /** - * Set the blobUri property: 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 sasToken property: The sas token to access blob. - * - * @return the sasToken value. - */ - public String sasToken() { - return this.sasToken; - } - - /** - * Set the sasToken property: 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; - } - - /** - * {@inheritDoc} - */ - @Override - public ExportJobDetails withAffectedObjectDetails(Map affectedObjectDetails) { - super.withAffectedObjectDetails(affectedObjectDetails); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("affectedObjectDetails", affectedObjectDetails(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("blobUri", this.blobUri); - jsonWriter.writeStringField("sasToken", this.sasToken); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExportJobDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExportJobDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ExportJobDetails. - */ - public static ExportJobDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExportJobDetails deserializedExportJobDetails = new ExportJobDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("affectedObjectDetails".equals(fieldName)) { - Map affectedObjectDetails = reader.readMap(reader1 -> reader1.getString()); - deserializedExportJobDetails.withAffectedObjectDetails(affectedObjectDetails); - } else if ("instanceType".equals(fieldName)) { - deserializedExportJobDetails.instanceType = reader.getString(); - } else if ("blobUri".equals(fieldName)) { - deserializedExportJobDetails.blobUri = reader.getString(); - } else if ("sasToken".equals(fieldName)) { - deserializedExportJobDetails.sasToken = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedExportJobDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExportJobOutputSerializationType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExportJobOutputSerializationType.java deleted file mode 100644 index 4d1625539690..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExportJobOutputSerializationType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The output type of the jobs. - */ -public final class ExportJobOutputSerializationType extends ExpandableStringEnum { - /** - * Static value Json for ExportJobOutputSerializationType. - */ - public static final ExportJobOutputSerializationType JSON = fromString("Json"); - - /** - * Static value Xml for ExportJobOutputSerializationType. - */ - public static final ExportJobOutputSerializationType XML = fromString("Xml"); - - /** - * Static value Excel for ExportJobOutputSerializationType. - */ - public static final ExportJobOutputSerializationType EXCEL = fromString("Excel"); - - /** - * Creates a new instance of ExportJobOutputSerializationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ExportJobOutputSerializationType() { - } - - /** - * Creates or finds a ExportJobOutputSerializationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ExportJobOutputSerializationType. - */ - public static ExportJobOutputSerializationType fromString(String name) { - return fromString(name, ExportJobOutputSerializationType.class); - } - - /** - * Gets known ExportJobOutputSerializationType values. - * - * @return known ExportJobOutputSerializationType values. - */ - public static Collection values() { - return values(ExportJobOutputSerializationType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExtendedLocation.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExtendedLocation.java deleted file mode 100644 index 5423883b1be2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExtendedLocation.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Extended location of the resource. - */ -@Fluent -public final class ExtendedLocation implements JsonSerializable { - /* - * The name of the extended location. - */ - private String name; - - /* - * The extended location type. - */ - private ExtendedLocationType type; - - /** - * Creates an instance of ExtendedLocation class. - */ - public ExtendedLocation() { - } - - /** - * Get the name property: The name of the extended location. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the extended location. - * - * @param name the name value to set. - * @return the ExtendedLocation object itself. - */ - public ExtendedLocation withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The extended location type. - * - * @return the type value. - */ - public ExtendedLocationType type() { - return this.type; - } - - /** - * Set the type property: The extended location type. - * - * @param type the type value to set. - * @return the ExtendedLocation object itself. - */ - public ExtendedLocation withType(ExtendedLocationType type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model ExtendedLocation")); - } - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model ExtendedLocation")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ExtendedLocation.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExtendedLocation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExtendedLocation if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ExtendedLocation. - */ - public static ExtendedLocation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExtendedLocation deserializedExtendedLocation = new ExtendedLocation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedExtendedLocation.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedExtendedLocation.type = ExtendedLocationType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedExtendedLocation; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExtendedLocationType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExtendedLocationType.java deleted file mode 100644 index 2d2adb4b2cb2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ExtendedLocationType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The extended location type. - */ -public final class ExtendedLocationType extends ExpandableStringEnum { - /** - * Static value EdgeZone for ExtendedLocationType. - */ - public static final ExtendedLocationType EDGE_ZONE = fromString("EdgeZone"); - - /** - * Creates a new instance of ExtendedLocationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ExtendedLocationType() { - } - - /** - * Creates or finds a ExtendedLocationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ExtendedLocationType. - */ - public static ExtendedLocationType fromString(String name) { - return fromString(name, ExtendedLocationType.class); - } - - /** - * Gets known ExtendedLocationType values. - * - * @return known ExtendedLocationType values. - */ - public static Collection values() { - return values(ExtendedLocationType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Fabric.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Fabric.java deleted file mode 100644 index 0f62fe1152a4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Fabric.java +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.FabricInner; - -/** - * An immutable client-side representation of Fabric. - */ -public interface Fabric { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Fabric related data. - * - * @return the properties value. - */ - FabricProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.FabricInner object. - * - * @return the inner object. - */ - FabricInner innerModel(); - - /** - * The entirety of the Fabric definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Fabric definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Fabric definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Fabric definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @return the next definition stage. - */ - WithCreate withExistingVault(String resourceName, String resourceGroupName); - } - - /** - * The stage of the Fabric definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Fabric create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Fabric create(Context context); - } - - /** - * The stage of the Fabric definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Fabric creation input.. - * - * @param properties Fabric creation input. - * @return the next definition stage. - */ - WithCreate withProperties(FabricCreationInputProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Fabric refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Fabric refresh(Context context); - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - Fabric checkConsistency(); - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - Fabric checkConsistency(Context context); - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void migrateToAad(); - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void migrateToAad(Context context); - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param failoverProcessServerRequest The input to the failover process server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - Fabric reassociateGateway(FailoverProcessServerRequest failoverProcessServerRequest); - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param failoverProcessServerRequest The input to the failover process server operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - Fabric reassociateGateway(FailoverProcessServerRequest failoverProcessServerRequest, Context context); - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(); - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(Context context); - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param renewCertificate Renew certificate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - Fabric renewCertificate(RenewCertificateInput renewCertificate); - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param renewCertificate Renew certificate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - Fabric renewCertificate(RenewCertificateInput renewCertificate, Context context); - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void removeInfra(); - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void removeInfra(Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricCollection.java deleted file mode 100644 index 5c02529094e4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricCollection.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.FabricInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of fabric details. - */ -@Fluent -public final class FabricCollection implements JsonSerializable { - /* - * The fabric details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of FabricCollection class. - */ - public FabricCollection() { - } - - /** - * Get the value property: The fabric details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The fabric details. - * - * @param value the value value to set. - * @return the FabricCollection object itself. - */ - public FabricCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the FabricCollection object itself. - */ - public FabricCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FabricCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FabricCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the FabricCollection. - */ - public static FabricCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FabricCollection deserializedFabricCollection = new FabricCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> FabricInner.fromJson(reader1)); - deserializedFabricCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedFabricCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFabricCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricCreationInput.java deleted file mode 100644 index 3e1687386312..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricCreationInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Site details provided during the time of site creation. - */ -@Fluent -public final class FabricCreationInput implements JsonSerializable { - /* - * Fabric creation input. - */ - private FabricCreationInputProperties properties; - - /** - * Creates an instance of FabricCreationInput class. - */ - public FabricCreationInput() { - } - - /** - * Get the properties property: Fabric creation input. - * - * @return the properties value. - */ - public FabricCreationInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FabricCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FabricCreationInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the FabricCreationInput. - */ - public static FabricCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FabricCreationInput deserializedFabricCreationInput = new FabricCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedFabricCreationInput.properties = FabricCreationInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFabricCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricCreationInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricCreationInputProperties.java deleted file mode 100644 index 21fab45b8ff9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricCreationInputProperties.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of site details provided during the time of site creation. - */ -@Fluent -public final class FabricCreationInputProperties implements JsonSerializable { - /* - * Fabric provider specific creation input. - */ - private FabricSpecificCreationInput customDetails; - - /** - * Creates an instance of FabricCreationInputProperties class. - */ - public FabricCreationInputProperties() { - } - - /** - * Get the customDetails property: Fabric provider specific creation input. - * - * @return the customDetails value. - */ - public FabricSpecificCreationInput customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customDetails() != null) { - customDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("customDetails", this.customDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FabricCreationInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FabricCreationInputProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FabricCreationInputProperties. - */ - public static FabricCreationInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FabricCreationInputProperties deserializedFabricCreationInputProperties - = new FabricCreationInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("customDetails".equals(fieldName)) { - deserializedFabricCreationInputProperties.customDetails - = FabricSpecificCreationInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFabricCreationInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricProperties.java deleted file mode 100644 index d746fc8a210b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricProperties.java +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Fabric properties. - */ -@Fluent -public final class FabricProperties implements JsonSerializable { - /* - * Friendly name of the fabric. - */ - private String friendlyName; - - /* - * Encryption details for the fabric. - */ - private EncryptionDetails encryptionDetails; - - /* - * Rollover encryption details for the fabric. - */ - private EncryptionDetails rolloverEncryptionDetails; - - /* - * Dra Registration Id. - */ - private String internalIdentifier; - - /* - * BCDR state of the fabric. - */ - private String bcdrState; - - /* - * Fabric specific settings. - */ - private FabricSpecificDetails customDetails; - - /* - * Fabric health error details. - */ - private List healthErrorDetails; - - /* - * Health of fabric. - */ - private String health; - - /** - * Creates an instance of FabricProperties class. - */ - public FabricProperties() { - } - - /** - * Get the friendlyName property: Friendly name of the fabric. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 the encryptionDetails property: Encryption details for the fabric. - * - * @return the encryptionDetails value. - */ - public EncryptionDetails encryptionDetails() { - return this.encryptionDetails; - } - - /** - * Set the encryptionDetails property: 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 the rolloverEncryptionDetails property: Rollover encryption details for the fabric. - * - * @return the rolloverEncryptionDetails value. - */ - public EncryptionDetails rolloverEncryptionDetails() { - return this.rolloverEncryptionDetails; - } - - /** - * Set the rolloverEncryptionDetails property: 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 the internalIdentifier property: Dra Registration Id. - * - * @return the internalIdentifier value. - */ - public String internalIdentifier() { - return this.internalIdentifier; - } - - /** - * Set the internalIdentifier property: 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 the bcdrState property: BCDR state of the fabric. - * - * @return the bcdrState value. - */ - public String bcdrState() { - return this.bcdrState; - } - - /** - * Set the bcdrState property: 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 the customDetails property: Fabric specific settings. - * - * @return the customDetails value. - */ - public FabricSpecificDetails customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: 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 the healthErrorDetails property: Fabric health error details. - * - * @return the healthErrorDetails value. - */ - public List healthErrorDetails() { - return this.healthErrorDetails; - } - - /** - * Set the healthErrorDetails property: 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 the health property: Health of fabric. - * - * @return the health value. - */ - public String health() { - return this.health; - } - - /** - * Set the health property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (encryptionDetails() != null) { - encryptionDetails().validate(); - } - if (rolloverEncryptionDetails() != null) { - rolloverEncryptionDetails().validate(); - } - if (customDetails() != null) { - customDetails().validate(); - } - if (healthErrorDetails() != null) { - healthErrorDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeJsonField("encryptionDetails", this.encryptionDetails); - jsonWriter.writeJsonField("rolloverEncryptionDetails", this.rolloverEncryptionDetails); - jsonWriter.writeStringField("internalIdentifier", this.internalIdentifier); - jsonWriter.writeStringField("bcdrState", this.bcdrState); - jsonWriter.writeJsonField("customDetails", this.customDetails); - jsonWriter.writeArrayField("healthErrorDetails", this.healthErrorDetails, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("health", this.health); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FabricProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FabricProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the FabricProperties. - */ - public static FabricProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FabricProperties deserializedFabricProperties = new FabricProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedFabricProperties.friendlyName = reader.getString(); - } else if ("encryptionDetails".equals(fieldName)) { - deserializedFabricProperties.encryptionDetails = EncryptionDetails.fromJson(reader); - } else if ("rolloverEncryptionDetails".equals(fieldName)) { - deserializedFabricProperties.rolloverEncryptionDetails = EncryptionDetails.fromJson(reader); - } else if ("internalIdentifier".equals(fieldName)) { - deserializedFabricProperties.internalIdentifier = reader.getString(); - } else if ("bcdrState".equals(fieldName)) { - deserializedFabricProperties.bcdrState = reader.getString(); - } else if ("customDetails".equals(fieldName)) { - deserializedFabricProperties.customDetails = FabricSpecificDetails.fromJson(reader); - } else if ("healthErrorDetails".equals(fieldName)) { - List healthErrorDetails = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedFabricProperties.healthErrorDetails = healthErrorDetails; - } else if ("health".equals(fieldName)) { - deserializedFabricProperties.health = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFabricProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricReplicationGroupTaskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricReplicationGroupTaskDetails.java deleted file mode 100644 index 617f9e1afae8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricReplicationGroupTaskDetails.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * This class represents the fabric replication group task details. - */ -@Fluent -public final class FabricReplicationGroupTaskDetails extends JobTaskDetails { - /* - * The type of task details. - */ - private String instanceType = "FabricReplicationGroupTaskDetails"; - - /* - * The skipped reason. - */ - private String skippedReason; - - /* - * The skipped reason string. - */ - private String skippedReasonString; - - /** - * Creates an instance of FabricReplicationGroupTaskDetails class. - */ - public FabricReplicationGroupTaskDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the skippedReason property: The skipped reason. - * - * @return the skippedReason value. - */ - public String skippedReason() { - return this.skippedReason; - } - - /** - * Set the skippedReason property: 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 skippedReasonString property: The skipped reason string. - * - * @return the skippedReasonString value. - */ - public String skippedReasonString() { - return this.skippedReasonString; - } - - /** - * Set the skippedReasonString property: 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; - } - - /** - * {@inheritDoc} - */ - @Override - public FabricReplicationGroupTaskDetails withJobTask(JobEntity jobTask) { - super.withJobTask(jobTask); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (jobTask() != null) { - jobTask().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("jobTask", jobTask()); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("skippedReason", this.skippedReason); - jsonWriter.writeStringField("skippedReasonString", this.skippedReasonString); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FabricReplicationGroupTaskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FabricReplicationGroupTaskDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FabricReplicationGroupTaskDetails. - */ - public static FabricReplicationGroupTaskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FabricReplicationGroupTaskDetails deserializedFabricReplicationGroupTaskDetails - = new FabricReplicationGroupTaskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobTask".equals(fieldName)) { - deserializedFabricReplicationGroupTaskDetails.withJobTask(JobEntity.fromJson(reader)); - } else if ("instanceType".equals(fieldName)) { - deserializedFabricReplicationGroupTaskDetails.instanceType = reader.getString(); - } else if ("skippedReason".equals(fieldName)) { - deserializedFabricReplicationGroupTaskDetails.skippedReason = reader.getString(); - } else if ("skippedReasonString".equals(fieldName)) { - deserializedFabricReplicationGroupTaskDetails.skippedReasonString = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFabricReplicationGroupTaskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricSpecificCreateNetworkMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricSpecificCreateNetworkMappingInput.java deleted file mode 100644 index e57327ed8a0e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricSpecificCreateNetworkMappingInput.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input details specific to fabrics during Network Mapping. - */ -@Immutable -public class FabricSpecificCreateNetworkMappingInput - implements JsonSerializable { - /* - * The instance type. - */ - private String instanceType = "FabricSpecificCreateNetworkMappingInput"; - - /** - * Creates an instance of FabricSpecificCreateNetworkMappingInput class. - */ - public FabricSpecificCreateNetworkMappingInput() { - } - - /** - * Get the instanceType property: The instance type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FabricSpecificCreateNetworkMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FabricSpecificCreateNetworkMappingInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FabricSpecificCreateNetworkMappingInput. - */ - public static FabricSpecificCreateNetworkMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureToAzure".equals(discriminatorValue)) { - return AzureToAzureCreateNetworkMappingInput.fromJson(readerToUse.reset()); - } else if ("VmmToAzure".equals(discriminatorValue)) { - return VmmToAzureCreateNetworkMappingInput.fromJson(readerToUse.reset()); - } else if ("VmmToVmm".equals(discriminatorValue)) { - return VmmToVmmCreateNetworkMappingInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static FabricSpecificCreateNetworkMappingInput fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - FabricSpecificCreateNetworkMappingInput deserializedFabricSpecificCreateNetworkMappingInput - = new FabricSpecificCreateNetworkMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedFabricSpecificCreateNetworkMappingInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFabricSpecificCreateNetworkMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricSpecificCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricSpecificCreationInput.java deleted file mode 100644 index 2eec9aa50bd3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricSpecificCreationInput.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Fabric provider specific settings. - */ -@Immutable -public class FabricSpecificCreationInput implements JsonSerializable { - /* - * Gets the class type. - */ - private String instanceType = "FabricSpecificCreationInput"; - - /** - * Creates an instance of FabricSpecificCreationInput class. - */ - public FabricSpecificCreationInput() { - } - - /** - * Get the instanceType property: Gets the class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FabricSpecificCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FabricSpecificCreationInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FabricSpecificCreationInput. - */ - public static FabricSpecificCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Azure".equals(discriminatorValue)) { - return AzureFabricCreationInput.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmFabricCreationInput.fromJson(readerToUse.reset()); - } else if ("VMwareV2".equals(discriminatorValue)) { - return VMwareV2FabricCreationInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static FabricSpecificCreationInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FabricSpecificCreationInput deserializedFabricSpecificCreationInput = new FabricSpecificCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedFabricSpecificCreationInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFabricSpecificCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricSpecificDetails.java deleted file mode 100644 index 00b932217d5b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricSpecificDetails.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Fabric specific details. - */ -@Immutable -public class FabricSpecificDetails implements JsonSerializable { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "FabricSpecificDetails"; - - /** - * Creates an instance of FabricSpecificDetails class. - */ - public FabricSpecificDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FabricSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FabricSpecificDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the FabricSpecificDetails. - */ - public static FabricSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Azure".equals(discriminatorValue)) { - return AzureFabricSpecificDetails.fromJson(readerToUse.reset()); - } else if ("HyperVSite".equals(discriminatorValue)) { - return HyperVSiteDetails.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmFabricSpecificDetails.fromJson(readerToUse.reset()); - } else if ("VMM".equals(discriminatorValue)) { - return VmmDetails.fromJson(readerToUse.reset()); - } else if ("VMware".equals(discriminatorValue)) { - return VMwareDetails.fromJson(readerToUse.reset()); - } else if ("VMwareV2".equals(discriminatorValue)) { - return VMwareV2FabricSpecificDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static FabricSpecificDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FabricSpecificDetails deserializedFabricSpecificDetails = new FabricSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedFabricSpecificDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFabricSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricSpecificUpdateNetworkMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricSpecificUpdateNetworkMappingInput.java deleted file mode 100644 index 34b9c951dadc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FabricSpecificUpdateNetworkMappingInput.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input details specific to fabrics during Network Mapping. - */ -@Immutable -public class FabricSpecificUpdateNetworkMappingInput - implements JsonSerializable { - /* - * The instance type. - */ - private String instanceType = "FabricSpecificUpdateNetworkMappingInput"; - - /** - * Creates an instance of FabricSpecificUpdateNetworkMappingInput class. - */ - public FabricSpecificUpdateNetworkMappingInput() { - } - - /** - * Get the instanceType property: The instance type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FabricSpecificUpdateNetworkMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FabricSpecificUpdateNetworkMappingInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FabricSpecificUpdateNetworkMappingInput. - */ - public static FabricSpecificUpdateNetworkMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureToAzure".equals(discriminatorValue)) { - return AzureToAzureUpdateNetworkMappingInput.fromJson(readerToUse.reset()); - } else if ("VmmToAzure".equals(discriminatorValue)) { - return VmmToAzureUpdateNetworkMappingInput.fromJson(readerToUse.reset()); - } else if ("VmmToVmm".equals(discriminatorValue)) { - return VmmToVmmUpdateNetworkMappingInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static FabricSpecificUpdateNetworkMappingInput fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - FabricSpecificUpdateNetworkMappingInput deserializedFabricSpecificUpdateNetworkMappingInput - = new FabricSpecificUpdateNetworkMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedFabricSpecificUpdateNetworkMappingInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFabricSpecificUpdateNetworkMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverDeploymentModel.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverDeploymentModel.java deleted file mode 100644 index 7aed76918c85..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverDeploymentModel.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The failover deployment model. - */ -public final class FailoverDeploymentModel extends ExpandableStringEnum { - /** - * Static value NotApplicable for FailoverDeploymentModel. - */ - public static final FailoverDeploymentModel NOT_APPLICABLE = fromString("NotApplicable"); - - /** - * Static value Classic for FailoverDeploymentModel. - */ - public static final FailoverDeploymentModel CLASSIC = fromString("Classic"); - - /** - * Static value ResourceManager for FailoverDeploymentModel. - */ - public static final FailoverDeploymentModel RESOURCE_MANAGER = fromString("ResourceManager"); - - /** - * Creates a new instance of FailoverDeploymentModel value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FailoverDeploymentModel() { - } - - /** - * Creates or finds a FailoverDeploymentModel from its string representation. - * - * @param name a name to look for. - * @return the corresponding FailoverDeploymentModel. - */ - public static FailoverDeploymentModel fromString(String name) { - return fromString(name, FailoverDeploymentModel.class); - } - - /** - * Gets known FailoverDeploymentModel values. - * - * @return known FailoverDeploymentModel values. - */ - public static Collection values() { - return values(FailoverDeploymentModel.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverJobDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverJobDetails.java deleted file mode 100644 index ce928228cbb1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverJobDetails.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * This class represents the details for a failover job. - */ -@Fluent -public final class FailoverJobDetails extends JobDetails { - /* - * Gets the type of job details (see JobDetailsTypes enum for possible values). - */ - private String instanceType = "FailoverJobDetails"; - - /* - * The test VM details. - */ - private List protectedItemDetails; - - /** - * Creates an instance of FailoverJobDetails class. - */ - public FailoverJobDetails() { - } - - /** - * Get the instanceType property: Gets the type of job details (see JobDetailsTypes enum for possible values). - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the protectedItemDetails property: The test VM details. - * - * @return the protectedItemDetails value. - */ - public List protectedItemDetails() { - return this.protectedItemDetails; - } - - /** - * Set the protectedItemDetails property: 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; - } - - /** - * {@inheritDoc} - */ - @Override - public FailoverJobDetails withAffectedObjectDetails(Map affectedObjectDetails) { - super.withAffectedObjectDetails(affectedObjectDetails); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (protectedItemDetails() != null) { - protectedItemDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("affectedObjectDetails", affectedObjectDetails(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("protectedItemDetails", this.protectedItemDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FailoverJobDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FailoverJobDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the FailoverJobDetails. - */ - public static FailoverJobDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FailoverJobDetails deserializedFailoverJobDetails = new FailoverJobDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("affectedObjectDetails".equals(fieldName)) { - Map affectedObjectDetails = reader.readMap(reader1 -> reader1.getString()); - deserializedFailoverJobDetails.withAffectedObjectDetails(affectedObjectDetails); - } else if ("instanceType".equals(fieldName)) { - deserializedFailoverJobDetails.instanceType = reader.getString(); - } else if ("protectedItemDetails".equals(fieldName)) { - List protectedItemDetails - = reader.readArray(reader1 -> FailoverReplicationProtectedItemDetails.fromJson(reader1)); - deserializedFailoverJobDetails.protectedItemDetails = protectedItemDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedFailoverJobDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverProcessServerRequest.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverProcessServerRequest.java deleted file mode 100644 index 9d16da3e19cb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverProcessServerRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Request to failover a process server. - */ -@Fluent -public final class FailoverProcessServerRequest implements JsonSerializable { - /* - * The properties of the PS Failover request. - */ - private FailoverProcessServerRequestProperties properties; - - /** - * Creates an instance of FailoverProcessServerRequest class. - */ - public FailoverProcessServerRequest() { - } - - /** - * Get the properties property: The properties of the PS Failover request. - * - * @return the properties value. - */ - public FailoverProcessServerRequestProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FailoverProcessServerRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FailoverProcessServerRequest if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FailoverProcessServerRequest. - */ - public static FailoverProcessServerRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FailoverProcessServerRequest deserializedFailoverProcessServerRequest = new FailoverProcessServerRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedFailoverProcessServerRequest.properties - = FailoverProcessServerRequestProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFailoverProcessServerRequest; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverProcessServerRequestProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverProcessServerRequestProperties.java deleted file mode 100644 index 1da7ec903ad9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverProcessServerRequestProperties.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The properties of the Failover Process Server request. - */ -@Fluent -public final class FailoverProcessServerRequestProperties - implements JsonSerializable { - /* - * The container identifier. - */ - private String containerName; - - /* - * The source process server. - */ - private String sourceProcessServerId; - - /* - * The new process server. - */ - private String targetProcessServerId; - - /* - * The VMS to migrate. - */ - private List vmsToMigrate; - - /* - * A value for failover type. It can be systemlevel/serverlevel. - */ - private String updateType; - - /** - * Creates an instance of FailoverProcessServerRequestProperties class. - */ - public FailoverProcessServerRequestProperties() { - } - - /** - * Get the containerName property: The container identifier. - * - * @return the containerName value. - */ - public String containerName() { - return this.containerName; - } - - /** - * Set the containerName property: 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 sourceProcessServerId property: The source process server. - * - * @return the sourceProcessServerId value. - */ - public String sourceProcessServerId() { - return this.sourceProcessServerId; - } - - /** - * Set the sourceProcessServerId property: 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 targetProcessServerId property: The new process server. - * - * @return the targetProcessServerId value. - */ - public String targetProcessServerId() { - return this.targetProcessServerId; - } - - /** - * Set the targetProcessServerId property: 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 vmsToMigrate property: The VMS to migrate. - * - * @return the vmsToMigrate value. - */ - public List vmsToMigrate() { - return this.vmsToMigrate; - } - - /** - * Set the vmsToMigrate property: 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 the updateType property: A value for failover type. It can be systemlevel/serverlevel. - * - * @return the updateType value. - */ - public String updateType() { - return this.updateType; - } - - /** - * Set the updateType property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("containerName", this.containerName); - jsonWriter.writeStringField("sourceProcessServerId", this.sourceProcessServerId); - jsonWriter.writeStringField("targetProcessServerId", this.targetProcessServerId); - jsonWriter.writeArrayField("vmsToMigrate", this.vmsToMigrate, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("updateType", this.updateType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FailoverProcessServerRequestProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FailoverProcessServerRequestProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FailoverProcessServerRequestProperties. - */ - public static FailoverProcessServerRequestProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FailoverProcessServerRequestProperties deserializedFailoverProcessServerRequestProperties - = new FailoverProcessServerRequestProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("containerName".equals(fieldName)) { - deserializedFailoverProcessServerRequestProperties.containerName = reader.getString(); - } else if ("sourceProcessServerId".equals(fieldName)) { - deserializedFailoverProcessServerRequestProperties.sourceProcessServerId = reader.getString(); - } else if ("targetProcessServerId".equals(fieldName)) { - deserializedFailoverProcessServerRequestProperties.targetProcessServerId = reader.getString(); - } else if ("vmsToMigrate".equals(fieldName)) { - List vmsToMigrate = reader.readArray(reader1 -> reader1.getString()); - deserializedFailoverProcessServerRequestProperties.vmsToMigrate = vmsToMigrate; - } else if ("updateType".equals(fieldName)) { - deserializedFailoverProcessServerRequestProperties.updateType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFailoverProcessServerRequestProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverReplicationProtectedItemDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverReplicationProtectedItemDetails.java deleted file mode 100644 index d44df2d9055d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/FailoverReplicationProtectedItemDetails.java +++ /dev/null @@ -1,326 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Failover details for a replication protected item. - */ -@Fluent -public final class FailoverReplicationProtectedItemDetails - implements JsonSerializable { - /* - * The name. - */ - private String name; - - /* - * The friendly name. - */ - private String friendlyName; - - /* - * The test Vm name. - */ - private String testVmName; - - /* - * The test Vm friendly name. - */ - private String testVmFriendlyName; - - /* - * The network connection status. - */ - private String networkConnectionStatus; - - /* - * The network friendly name. - */ - private String networkFriendlyName; - - /* - * The network subnet. - */ - private String subnet; - - /* - * The recovery point Id. - */ - private String recoveryPointId; - - /* - * The recovery point time. - */ - private OffsetDateTime recoveryPointTime; - - /** - * Creates an instance of FailoverReplicationProtectedItemDetails class. - */ - public FailoverReplicationProtectedItemDetails() { - } - - /** - * Get the name property: The name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 friendlyName property: The friendly name. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 testVmName property: The test Vm name. - * - * @return the testVmName value. - */ - public String testVmName() { - return this.testVmName; - } - - /** - * Set the testVmName property: 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 testVmFriendlyName property: The test Vm friendly name. - * - * @return the testVmFriendlyName value. - */ - public String testVmFriendlyName() { - return this.testVmFriendlyName; - } - - /** - * Set the testVmFriendlyName property: 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 networkConnectionStatus property: The network connection status. - * - * @return the networkConnectionStatus value. - */ - public String networkConnectionStatus() { - return this.networkConnectionStatus; - } - - /** - * Set the networkConnectionStatus property: 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 networkFriendlyName property: The network friendly name. - * - * @return the networkFriendlyName value. - */ - public String networkFriendlyName() { - return this.networkFriendlyName; - } - - /** - * Set the networkFriendlyName property: 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 subnet property: The network subnet. - * - * @return the subnet value. - */ - public String subnet() { - return this.subnet; - } - - /** - * Set the subnet property: 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 recoveryPointId property: The recovery point Id. - * - * @return the recoveryPointId value. - */ - public String recoveryPointId() { - return this.recoveryPointId; - } - - /** - * Set the recoveryPointId property: 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 recoveryPointTime property: The recovery point time. - * - * @return the recoveryPointTime value. - */ - public OffsetDateTime recoveryPointTime() { - return this.recoveryPointTime; - } - - /** - * Set the recoveryPointTime property: The recovery point time. - * - * @param recoveryPointTime the recoveryPointTime value to set. - * @return the FailoverReplicationProtectedItemDetails object itself. - */ - public FailoverReplicationProtectedItemDetails withRecoveryPointTime(OffsetDateTime recoveryPointTime) { - this.recoveryPointTime = recoveryPointTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("testVmName", this.testVmName); - jsonWriter.writeStringField("testVmFriendlyName", this.testVmFriendlyName); - jsonWriter.writeStringField("networkConnectionStatus", this.networkConnectionStatus); - jsonWriter.writeStringField("networkFriendlyName", this.networkFriendlyName); - jsonWriter.writeStringField("subnet", this.subnet); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - jsonWriter.writeStringField("recoveryPointTime", - this.recoveryPointTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.recoveryPointTime)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FailoverReplicationProtectedItemDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FailoverReplicationProtectedItemDetails if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FailoverReplicationProtectedItemDetails. - */ - public static FailoverReplicationProtectedItemDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FailoverReplicationProtectedItemDetails deserializedFailoverReplicationProtectedItemDetails - = new FailoverReplicationProtectedItemDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedFailoverReplicationProtectedItemDetails.name = reader.getString(); - } else if ("friendlyName".equals(fieldName)) { - deserializedFailoverReplicationProtectedItemDetails.friendlyName = reader.getString(); - } else if ("testVmName".equals(fieldName)) { - deserializedFailoverReplicationProtectedItemDetails.testVmName = reader.getString(); - } else if ("testVmFriendlyName".equals(fieldName)) { - deserializedFailoverReplicationProtectedItemDetails.testVmFriendlyName = reader.getString(); - } else if ("networkConnectionStatus".equals(fieldName)) { - deserializedFailoverReplicationProtectedItemDetails.networkConnectionStatus = reader.getString(); - } else if ("networkFriendlyName".equals(fieldName)) { - deserializedFailoverReplicationProtectedItemDetails.networkFriendlyName = reader.getString(); - } else if ("subnet".equals(fieldName)) { - deserializedFailoverReplicationProtectedItemDetails.subnet = reader.getString(); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedFailoverReplicationProtectedItemDetails.recoveryPointId = reader.getString(); - } else if ("recoveryPointTime".equals(fieldName)) { - deserializedFailoverReplicationProtectedItemDetails.recoveryPointTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedFailoverReplicationProtectedItemDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/GatewayOperationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/GatewayOperationDetails.java deleted file mode 100644 index c9b46d184ba9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/GatewayOperationDetails.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Details of the gateway operation. - */ -@Immutable -public final class GatewayOperationDetails implements JsonSerializable { - /* - * A value indicating the state of gateway operation. - */ - private String state; - - /* - * A value indicating the progress percentage of gateway operation. - */ - private Integer progressPercentage; - - /* - * A value indicating the time elapsed for the operation in milliseconds. - */ - private Long timeElapsed; - - /* - * A value indicating the time remaining for the operation in milliseconds. - */ - private Long timeRemaining; - - /* - * A value indicating the upload speed in bytes per second. - */ - private Long uploadSpeed; - - /* - * A value indicating the ESXi host name. - */ - private String hostname; - - /* - * A value indicating the datastore collection. - */ - private List dataStores; - - /* - * A value indicating the VMware read throughput in bytes per second. - */ - private Long vmwareReadThroughput; - - /** - * Creates an instance of GatewayOperationDetails class. - */ - public GatewayOperationDetails() { - } - - /** - * Get the state property: A value indicating the state of gateway operation. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Get the progressPercentage property: A value indicating the progress percentage of gateway operation. - * - * @return the progressPercentage value. - */ - public Integer progressPercentage() { - return this.progressPercentage; - } - - /** - * Get the timeElapsed property: A value indicating the time elapsed for the operation in milliseconds. - * - * @return the timeElapsed value. - */ - public Long timeElapsed() { - return this.timeElapsed; - } - - /** - * Get the timeRemaining property: A value indicating the time remaining for the operation in milliseconds. - * - * @return the timeRemaining value. - */ - public Long timeRemaining() { - return this.timeRemaining; - } - - /** - * Get the uploadSpeed property: A value indicating the upload speed in bytes per second. - * - * @return the uploadSpeed value. - */ - public Long uploadSpeed() { - return this.uploadSpeed; - } - - /** - * Get the hostname property: A value indicating the ESXi host name. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Get the dataStores property: A value indicating the datastore collection. - * - * @return the dataStores value. - */ - public List dataStores() { - return this.dataStores; - } - - /** - * Get the vmwareReadThroughput property: A value indicating the VMware read throughput in bytes per second. - * - * @return the vmwareReadThroughput value. - */ - public Long vmwareReadThroughput() { - return this.vmwareReadThroughput; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GatewayOperationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GatewayOperationDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the GatewayOperationDetails. - */ - public static GatewayOperationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GatewayOperationDetails deserializedGatewayOperationDetails = new GatewayOperationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("state".equals(fieldName)) { - deserializedGatewayOperationDetails.state = reader.getString(); - } else if ("progressPercentage".equals(fieldName)) { - deserializedGatewayOperationDetails.progressPercentage = reader.getNullable(JsonReader::getInt); - } else if ("timeElapsed".equals(fieldName)) { - deserializedGatewayOperationDetails.timeElapsed = reader.getNullable(JsonReader::getLong); - } else if ("timeRemaining".equals(fieldName)) { - deserializedGatewayOperationDetails.timeRemaining = reader.getNullable(JsonReader::getLong); - } else if ("uploadSpeed".equals(fieldName)) { - deserializedGatewayOperationDetails.uploadSpeed = reader.getNullable(JsonReader::getLong); - } else if ("hostName".equals(fieldName)) { - deserializedGatewayOperationDetails.hostname = reader.getString(); - } else if ("dataStores".equals(fieldName)) { - List dataStores = reader.readArray(reader1 -> reader1.getString()); - deserializedGatewayOperationDetails.dataStores = dataStores; - } else if ("vmwareReadThroughput".equals(fieldName)) { - deserializedGatewayOperationDetails.vmwareReadThroughput = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedGatewayOperationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/GroupTaskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/GroupTaskDetails.java deleted file mode 100644 index 98356c3b50ec..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/GroupTaskDetails.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * This class represents the group task details when parent child relationship exists in the drill down. - */ -@Fluent -public class GroupTaskDetails implements JsonSerializable { - /* - * The type of task details. - */ - private String instanceType = "GroupTaskDetails"; - - /* - * The child tasks. - */ - private List childTasks; - - /** - * Creates an instance of GroupTaskDetails class. - */ - public GroupTaskDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Get the childTasks property: The child tasks. - * - * @return the childTasks value. - */ - public List childTasks() { - return this.childTasks; - } - - /** - * Set the childTasks property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (childTasks() != null) { - childTasks().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("childTasks", this.childTasks, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GroupTaskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GroupTaskDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the GroupTaskDetails. - */ - public static GroupTaskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("InlineWorkflowTaskDetails".equals(discriminatorValue)) { - return InlineWorkflowTaskDetails.fromJson(readerToUse.reset()); - } else if ("RecoveryPlanGroupTaskDetails".equals(discriminatorValue)) { - return RecoveryPlanGroupTaskDetails.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("RecoveryPlanShutdownGroupTaskDetails".equals(discriminatorValue)) { - return RecoveryPlanShutdownGroupTaskDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static GroupTaskDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GroupTaskDetails deserializedGroupTaskDetails = new GroupTaskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedGroupTaskDetails.instanceType = reader.getString(); - } else if ("childTasks".equals(fieldName)) { - List childTasks = reader.readArray(reader1 -> AsrTask.fromJson(reader1)); - deserializedGroupTaskDetails.childTasks = childTasks; - } else { - reader.skipChildren(); - } - } - - return deserializedGroupTaskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HealthError.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HealthError.java deleted file mode 100644 index 219c7ba4f27b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HealthError.java +++ /dev/null @@ -1,508 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * Health Error. - */ -@Fluent -public final class HealthError implements JsonSerializable { - /* - * The inner health errors. HealthError having a list of HealthError as child errors is problematic. - * InnerHealthError is used because this will prevent an infinite loop of structures when Hydra tries to - * auto-generate the contract. We are exposing the related health errors as inner health errors and all API - * consumers can utilize this in the same fashion as Exception -> InnerException. - */ - private List innerHealthErrors; - - /* - * Source of error. - */ - private String errorSource; - - /* - * Type of error. - */ - private String errorType; - - /* - * Level of error. - */ - private String errorLevel; - - /* - * Category of error. - */ - private String errorCategory; - - /* - * Error code. - */ - private String errorCode; - - /* - * Summary message of the entity. - */ - private String summaryMessage; - - /* - * Error message. - */ - private String errorMessage; - - /* - * Possible causes of error. - */ - private String possibleCauses; - - /* - * Recommended action to resolve error. - */ - private String recommendedAction; - - /* - * Error creation time (UTC). - */ - private OffsetDateTime creationTimeUtc; - - /* - * DRA error message. - */ - private String recoveryProviderErrorMessage; - - /* - * ID of the entity. - */ - private String entityId; - - /* - * The health error unique id. - */ - private String errorId; - - /* - * Value indicating whether the health error is customer resolvable. - */ - private HealthErrorCustomerResolvability customerResolvability; - - /** - * Creates an instance of HealthError class. - */ - public HealthError() { - } - - /** - * Get the innerHealthErrors property: The inner health errors. HealthError having a list of HealthError as child - * errors is problematic. InnerHealthError is used because this will prevent an infinite loop of structures when - * Hydra tries to auto-generate the contract. We are exposing the related health errors as inner health errors and - * all API consumers can utilize this in the same fashion as Exception -&gt; InnerException. - * - * @return the innerHealthErrors value. - */ - public List innerHealthErrors() { - return this.innerHealthErrors; - } - - /** - * Set the innerHealthErrors property: The inner health errors. HealthError having a list of HealthError as child - * errors is problematic. InnerHealthError is used because this will prevent an infinite loop of structures when - * Hydra tries to auto-generate the contract. We are exposing the related health errors as inner health errors and - * all API consumers can utilize this in the same fashion as Exception -&gt; InnerException. - * - * @param innerHealthErrors the innerHealthErrors value to set. - * @return the HealthError object itself. - */ - public HealthError withInnerHealthErrors(List innerHealthErrors) { - this.innerHealthErrors = innerHealthErrors; - return this; - } - - /** - * Get the errorSource property: Source of error. - * - * @return the errorSource value. - */ - public String errorSource() { - return this.errorSource; - } - - /** - * Set the errorSource property: 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 the errorType property: Type of error. - * - * @return the errorType value. - */ - public String errorType() { - return this.errorType; - } - - /** - * Set the errorType property: 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 the errorLevel property: Level of error. - * - * @return the errorLevel value. - */ - public String errorLevel() { - return this.errorLevel; - } - - /** - * Set the errorLevel property: 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 the errorCategory property: Category of error. - * - * @return the errorCategory value. - */ - public String errorCategory() { - return this.errorCategory; - } - - /** - * Set the errorCategory property: Category of error. - * - * @param errorCategory the errorCategory value to set. - * @return the HealthError object itself. - */ - public HealthError withErrorCategory(String errorCategory) { - this.errorCategory = errorCategory; - return this; - } - - /** - * Get the errorCode property: Error code. - * - * @return the errorCode value. - */ - public String errorCode() { - return this.errorCode; - } - - /** - * Set the errorCode property: 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 the summaryMessage property: Summary message of the entity. - * - * @return the summaryMessage value. - */ - public String summaryMessage() { - return this.summaryMessage; - } - - /** - * Set the summaryMessage property: Summary message of the entity. - * - * @param summaryMessage the summaryMessage value to set. - * @return the HealthError object itself. - */ - public HealthError withSummaryMessage(String summaryMessage) { - this.summaryMessage = summaryMessage; - return this; - } - - /** - * Get the errorMessage property: Error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: 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 the possibleCauses property: Possible causes of error. - * - * @return the possibleCauses value. - */ - public String possibleCauses() { - return this.possibleCauses; - } - - /** - * Set the possibleCauses property: 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 the recommendedAction property: Recommended action to resolve error. - * - * @return the recommendedAction value. - */ - public String recommendedAction() { - return this.recommendedAction; - } - - /** - * Set the recommendedAction property: 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 the creationTimeUtc property: Error creation time (UTC). - * - * @return the creationTimeUtc value. - */ - public OffsetDateTime creationTimeUtc() { - return this.creationTimeUtc; - } - - /** - * Set the creationTimeUtc property: Error creation time (UTC). - * - * @param creationTimeUtc the creationTimeUtc value to set. - * @return the HealthError object itself. - */ - public HealthError withCreationTimeUtc(OffsetDateTime creationTimeUtc) { - this.creationTimeUtc = creationTimeUtc; - return this; - } - - /** - * Get the recoveryProviderErrorMessage property: DRA error message. - * - * @return the recoveryProviderErrorMessage value. - */ - public String recoveryProviderErrorMessage() { - return this.recoveryProviderErrorMessage; - } - - /** - * Set the recoveryProviderErrorMessage property: 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 the entityId property: ID of the entity. - * - * @return the entityId value. - */ - public String entityId() { - return this.entityId; - } - - /** - * Set the entityId property: 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 errorId property: The health error unique id. - * - * @return the errorId value. - */ - public String errorId() { - return this.errorId; - } - - /** - * Set the errorId property: The health error unique id. - * - * @param errorId the errorId value to set. - * @return the HealthError object itself. - */ - public HealthError withErrorId(String errorId) { - this.errorId = errorId; - return this; - } - - /** - * Get the customerResolvability property: Value indicating whether the health error is customer resolvable. - * - * @return the customerResolvability value. - */ - public HealthErrorCustomerResolvability customerResolvability() { - return this.customerResolvability; - } - - /** - * Set the customerResolvability property: Value indicating whether the health error is customer resolvable. - * - * @param customerResolvability the customerResolvability value to set. - * @return the HealthError object itself. - */ - public HealthError withCustomerResolvability(HealthErrorCustomerResolvability customerResolvability) { - this.customerResolvability = customerResolvability; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerHealthErrors() != null) { - innerHealthErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("innerHealthErrors", this.innerHealthErrors, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("errorSource", this.errorSource); - jsonWriter.writeStringField("errorType", this.errorType); - jsonWriter.writeStringField("errorLevel", this.errorLevel); - jsonWriter.writeStringField("errorCategory", this.errorCategory); - jsonWriter.writeStringField("errorCode", this.errorCode); - jsonWriter.writeStringField("summaryMessage", this.summaryMessage); - jsonWriter.writeStringField("errorMessage", this.errorMessage); - jsonWriter.writeStringField("possibleCauses", this.possibleCauses); - jsonWriter.writeStringField("recommendedAction", this.recommendedAction); - jsonWriter.writeStringField("creationTimeUtc", - this.creationTimeUtc == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.creationTimeUtc)); - jsonWriter.writeStringField("recoveryProviderErrorMessage", this.recoveryProviderErrorMessage); - jsonWriter.writeStringField("entityId", this.entityId); - jsonWriter.writeStringField("errorId", this.errorId); - jsonWriter.writeStringField("customerResolvability", - this.customerResolvability == null ? null : this.customerResolvability.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HealthError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HealthError if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HealthError. - */ - public static HealthError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HealthError deserializedHealthError = new HealthError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("innerHealthErrors".equals(fieldName)) { - List innerHealthErrors - = reader.readArray(reader1 -> InnerHealthError.fromJson(reader1)); - deserializedHealthError.innerHealthErrors = innerHealthErrors; - } else if ("errorSource".equals(fieldName)) { - deserializedHealthError.errorSource = reader.getString(); - } else if ("errorType".equals(fieldName)) { - deserializedHealthError.errorType = reader.getString(); - } else if ("errorLevel".equals(fieldName)) { - deserializedHealthError.errorLevel = reader.getString(); - } else if ("errorCategory".equals(fieldName)) { - deserializedHealthError.errorCategory = reader.getString(); - } else if ("errorCode".equals(fieldName)) { - deserializedHealthError.errorCode = reader.getString(); - } else if ("summaryMessage".equals(fieldName)) { - deserializedHealthError.summaryMessage = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedHealthError.errorMessage = reader.getString(); - } else if ("possibleCauses".equals(fieldName)) { - deserializedHealthError.possibleCauses = reader.getString(); - } else if ("recommendedAction".equals(fieldName)) { - deserializedHealthError.recommendedAction = reader.getString(); - } else if ("creationTimeUtc".equals(fieldName)) { - deserializedHealthError.creationTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("recoveryProviderErrorMessage".equals(fieldName)) { - deserializedHealthError.recoveryProviderErrorMessage = reader.getString(); - } else if ("entityId".equals(fieldName)) { - deserializedHealthError.entityId = reader.getString(); - } else if ("errorId".equals(fieldName)) { - deserializedHealthError.errorId = reader.getString(); - } else if ("customerResolvability".equals(fieldName)) { - deserializedHealthError.customerResolvability - = HealthErrorCustomerResolvability.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedHealthError; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HealthErrorCategory.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HealthErrorCategory.java deleted file mode 100644 index 044f19020c5f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HealthErrorCategory.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The category of the health error. - */ -public final class HealthErrorCategory extends ExpandableStringEnum { - /** - * Static value None for HealthErrorCategory. - */ - public static final HealthErrorCategory NONE = fromString("None"); - - /** - * Static value Replication for HealthErrorCategory. - */ - public static final HealthErrorCategory REPLICATION = fromString("Replication"); - - /** - * Static value TestFailover for HealthErrorCategory. - */ - public static final HealthErrorCategory TEST_FAILOVER = fromString("TestFailover"); - - /** - * Static value Configuration for HealthErrorCategory. - */ - public static final HealthErrorCategory CONFIGURATION = fromString("Configuration"); - - /** - * Static value FabricInfrastructure for HealthErrorCategory. - */ - public static final HealthErrorCategory FABRIC_INFRASTRUCTURE = fromString("FabricInfrastructure"); - - /** - * Static value VersionExpiry for HealthErrorCategory. - */ - public static final HealthErrorCategory VERSION_EXPIRY = fromString("VersionExpiry"); - - /** - * Static value AgentAutoUpdateInfra for HealthErrorCategory. - */ - public static final HealthErrorCategory AGENT_AUTO_UPDATE_INFRA = fromString("AgentAutoUpdateInfra"); - - /** - * Static value AgentAutoUpdateArtifactDeleted for HealthErrorCategory. - */ - public static final HealthErrorCategory AGENT_AUTO_UPDATE_ARTIFACT_DELETED - = fromString("AgentAutoUpdateArtifactDeleted"); - - /** - * Static value AgentAutoUpdateRunAsAccount for HealthErrorCategory. - */ - public static final HealthErrorCategory AGENT_AUTO_UPDATE_RUN_AS_ACCOUNT - = fromString("AgentAutoUpdateRunAsAccount"); - - /** - * Static value AgentAutoUpdateRunAsAccountExpiry for HealthErrorCategory. - */ - public static final HealthErrorCategory AGENT_AUTO_UPDATE_RUN_AS_ACCOUNT_EXPIRY - = fromString("AgentAutoUpdateRunAsAccountExpiry"); - - /** - * Static value AgentAutoUpdateRunAsAccountExpired for HealthErrorCategory. - */ - public static final HealthErrorCategory AGENT_AUTO_UPDATE_RUN_AS_ACCOUNT_EXPIRED - = fromString("AgentAutoUpdateRunAsAccountExpired"); - - /** - * Creates a new instance of HealthErrorCategory value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public HealthErrorCategory() { - } - - /** - * Creates or finds a HealthErrorCategory from its string representation. - * - * @param name a name to look for. - * @return the corresponding HealthErrorCategory. - */ - public static HealthErrorCategory fromString(String name) { - return fromString(name, HealthErrorCategory.class); - } - - /** - * Gets known HealthErrorCategory values. - * - * @return known HealthErrorCategory values. - */ - public static Collection values() { - return values(HealthErrorCategory.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HealthErrorCustomerResolvability.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HealthErrorCustomerResolvability.java deleted file mode 100644 index c716fb7868dc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HealthErrorCustomerResolvability.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Value indicating whether the health error is customer resolvable. - */ -public final class HealthErrorCustomerResolvability extends ExpandableStringEnum { - /** - * Static value Allowed for HealthErrorCustomerResolvability. - */ - public static final HealthErrorCustomerResolvability ALLOWED = fromString("Allowed"); - - /** - * Static value NotAllowed for HealthErrorCustomerResolvability. - */ - public static final HealthErrorCustomerResolvability NOT_ALLOWED = fromString("NotAllowed"); - - /** - * Creates a new instance of HealthErrorCustomerResolvability value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public HealthErrorCustomerResolvability() { - } - - /** - * Creates or finds a HealthErrorCustomerResolvability from its string representation. - * - * @param name a name to look for. - * @return the corresponding HealthErrorCustomerResolvability. - */ - public static HealthErrorCustomerResolvability fromString(String name) { - return fromString(name, HealthErrorCustomerResolvability.class); - } - - /** - * Gets known HealthErrorCustomerResolvability values. - * - * @return known HealthErrorCustomerResolvability values. - */ - public static Collection values() { - return values(HealthErrorCustomerResolvability.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HealthErrorSummary.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HealthErrorSummary.java deleted file mode 100644 index 87bdac5c7899..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HealthErrorSummary.java +++ /dev/null @@ -1,272 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * class to define the summary of the health error details. - */ -@Fluent -public final class HealthErrorSummary implements JsonSerializable { - /* - * The code of the health error. - */ - private String summaryCode; - - /* - * The category of the health error. - */ - private HealthErrorCategory category; - - /* - * Severity of error. - */ - private Severity severity; - - /* - * The summary message of the health error. - */ - private String summaryMessage; - - /* - * The type of affected ARM resource. - */ - private String affectedResourceType; - - /* - * The sub type of any subcomponent within the ARM resource that this might be applicable. Value remains null if not - * applicable. - */ - 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. - */ - private List affectedResourceCorrelationIds; - - /** - * Creates an instance of HealthErrorSummary class. - */ - public HealthErrorSummary() { - } - - /** - * Get the summaryCode property: The code of the health error. - * - * @return the summaryCode value. - */ - public String summaryCode() { - return this.summaryCode; - } - - /** - * Set the summaryCode property: 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 property: The category of the health error. - * - * @return the category value. - */ - public HealthErrorCategory category() { - return this.category; - } - - /** - * Set the category property: The category of the health error. - * - * @param category the category value to set. - * @return the HealthErrorSummary object itself. - */ - public HealthErrorSummary withCategory(HealthErrorCategory category) { - this.category = category; - return this; - } - - /** - * Get the severity property: Severity of error. - * - * @return the severity value. - */ - public Severity severity() { - return this.severity; - } - - /** - * Set the severity property: Severity of error. - * - * @param severity the severity value to set. - * @return the HealthErrorSummary object itself. - */ - public HealthErrorSummary withSeverity(Severity severity) { - this.severity = severity; - return this; - } - - /** - * Get the summaryMessage property: The summary message of the health error. - * - * @return the summaryMessage value. - */ - public String summaryMessage() { - return this.summaryMessage; - } - - /** - * Set the summaryMessage property: 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 affectedResourceType property: The type of affected ARM resource. - * - * @return the affectedResourceType value. - */ - public String affectedResourceType() { - return this.affectedResourceType; - } - - /** - * Set the affectedResourceType property: 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 affectedResourceSubtype property: 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 affectedResourceSubtype property: 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 affectedResourceCorrelationIds property: 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 affectedResourceCorrelationIds property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("summaryCode", this.summaryCode); - jsonWriter.writeStringField("category", this.category == null ? null : this.category.toString()); - jsonWriter.writeStringField("severity", this.severity == null ? null : this.severity.toString()); - jsonWriter.writeStringField("summaryMessage", this.summaryMessage); - jsonWriter.writeStringField("affectedResourceType", this.affectedResourceType); - jsonWriter.writeStringField("affectedResourceSubtype", this.affectedResourceSubtype); - jsonWriter.writeArrayField("affectedResourceCorrelationIds", this.affectedResourceCorrelationIds, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HealthErrorSummary from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HealthErrorSummary if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HealthErrorSummary. - */ - public static HealthErrorSummary fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HealthErrorSummary deserializedHealthErrorSummary = new HealthErrorSummary(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("summaryCode".equals(fieldName)) { - deserializedHealthErrorSummary.summaryCode = reader.getString(); - } else if ("category".equals(fieldName)) { - deserializedHealthErrorSummary.category = HealthErrorCategory.fromString(reader.getString()); - } else if ("severity".equals(fieldName)) { - deserializedHealthErrorSummary.severity = Severity.fromString(reader.getString()); - } else if ("summaryMessage".equals(fieldName)) { - deserializedHealthErrorSummary.summaryMessage = reader.getString(); - } else if ("affectedResourceType".equals(fieldName)) { - deserializedHealthErrorSummary.affectedResourceType = reader.getString(); - } else if ("affectedResourceSubtype".equals(fieldName)) { - deserializedHealthErrorSummary.affectedResourceSubtype = reader.getString(); - } else if ("affectedResourceCorrelationIds".equals(fieldName)) { - List affectedResourceCorrelationIds = reader.readArray(reader1 -> reader1.getString()); - deserializedHealthErrorSummary.affectedResourceCorrelationIds = affectedResourceCorrelationIds; - } else { - reader.skipChildren(); - } - } - - return deserializedHealthErrorSummary; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVHostDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVHostDetails.java deleted file mode 100644 index 21cdec24e172..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVHostDetails.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Hyper-V host details. - */ -@Immutable -public final class HyperVHostDetails implements JsonSerializable { - /* - * The Hyper-V host Id. - */ - private String id; - - /* - * The Hyper-V host name. - */ - private String name; - - /* - * The Mars agent version. - */ - private String marsAgentVersion; - - /** - * Creates an instance of HyperVHostDetails class. - */ - public HyperVHostDetails() { - } - - /** - * Get the id property: The Hyper-V host Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The Hyper-V host name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the marsAgentVersion property: The Mars agent version. - * - * @return the marsAgentVersion value. - */ - public String marsAgentVersion() { - return this.marsAgentVersion; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVHostDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVHostDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVHostDetails. - */ - public static HyperVHostDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVHostDetails deserializedHyperVHostDetails = new HyperVHostDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedHyperVHostDetails.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedHyperVHostDetails.name = reader.getString(); - } else if ("marsAgentVersion".equals(fieldName)) { - deserializedHyperVHostDetails.marsAgentVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVHostDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplica2012EventDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplica2012EventDetails.java deleted file mode 100644 index 0cedd98def7c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplica2012EventDetails.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model class for event details of a HyperVReplica E2E event. - */ -@Fluent -public final class HyperVReplica2012EventDetails extends EventProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "HyperVReplica2012"; - - /* - * The container friendly name. - */ - private String containerName; - - /* - * The fabric friendly name. - */ - private String fabricName; - - /* - * The remote container name. - */ - private String remoteContainerName; - - /* - * The remote fabric name. - */ - private String remoteFabricName; - - /** - * Creates an instance of HyperVReplica2012EventDetails class. - */ - public HyperVReplica2012EventDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the containerName property: The container friendly name. - * - * @return the containerName value. - */ - public String containerName() { - return this.containerName; - } - - /** - * Set the containerName property: 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 fabricName property: The fabric friendly name. - * - * @return the fabricName value. - */ - public String fabricName() { - return this.fabricName; - } - - /** - * Set the fabricName property: 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 remoteContainerName property: The remote container name. - * - * @return the remoteContainerName value. - */ - public String remoteContainerName() { - return this.remoteContainerName; - } - - /** - * Set the remoteContainerName property: 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 remoteFabricName property: The remote fabric name. - * - * @return the remoteFabricName value. - */ - public String remoteFabricName() { - return this.remoteFabricName; - } - - /** - * Set the remoteFabricName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("containerName", this.containerName); - jsonWriter.writeStringField("fabricName", this.fabricName); - jsonWriter.writeStringField("remoteContainerName", this.remoteContainerName); - jsonWriter.writeStringField("remoteFabricName", this.remoteFabricName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplica2012EventDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplica2012EventDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplica2012EventDetails. - */ - public static HyperVReplica2012EventDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplica2012EventDetails deserializedHyperVReplica2012EventDetails - = new HyperVReplica2012EventDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplica2012EventDetails.instanceType = reader.getString(); - } else if ("containerName".equals(fieldName)) { - deserializedHyperVReplica2012EventDetails.containerName = reader.getString(); - } else if ("fabricName".equals(fieldName)) { - deserializedHyperVReplica2012EventDetails.fabricName = reader.getString(); - } else if ("remoteContainerName".equals(fieldName)) { - deserializedHyperVReplica2012EventDetails.remoteContainerName = reader.getString(); - } else if ("remoteFabricName".equals(fieldName)) { - deserializedHyperVReplica2012EventDetails.remoteFabricName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplica2012EventDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplica2012R2EventDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplica2012R2EventDetails.java deleted file mode 100644 index 9e35a16d553e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplica2012R2EventDetails.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model class for event details of a HyperVReplica blue E2E event. - */ -@Fluent -public final class HyperVReplica2012R2EventDetails extends EventProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "HyperVReplica2012R2"; - - /* - * The container friendly name. - */ - private String containerName; - - /* - * The fabric friendly name. - */ - private String fabricName; - - /* - * The remote container name. - */ - private String remoteContainerName; - - /* - * The remote fabric name. - */ - private String remoteFabricName; - - /** - * Creates an instance of HyperVReplica2012R2EventDetails class. - */ - public HyperVReplica2012R2EventDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the containerName property: The container friendly name. - * - * @return the containerName value. - */ - public String containerName() { - return this.containerName; - } - - /** - * Set the containerName property: 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 fabricName property: The fabric friendly name. - * - * @return the fabricName value. - */ - public String fabricName() { - return this.fabricName; - } - - /** - * Set the fabricName property: 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 remoteContainerName property: The remote container name. - * - * @return the remoteContainerName value. - */ - public String remoteContainerName() { - return this.remoteContainerName; - } - - /** - * Set the remoteContainerName property: 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 remoteFabricName property: The remote fabric name. - * - * @return the remoteFabricName value. - */ - public String remoteFabricName() { - return this.remoteFabricName; - } - - /** - * Set the remoteFabricName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("containerName", this.containerName); - jsonWriter.writeStringField("fabricName", this.fabricName); - jsonWriter.writeStringField("remoteContainerName", this.remoteContainerName); - jsonWriter.writeStringField("remoteFabricName", this.remoteFabricName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplica2012R2EventDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplica2012R2EventDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplica2012R2EventDetails. - */ - public static HyperVReplica2012R2EventDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplica2012R2EventDetails deserializedHyperVReplica2012R2EventDetails - = new HyperVReplica2012R2EventDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplica2012R2EventDetails.instanceType = reader.getString(); - } else if ("containerName".equals(fieldName)) { - deserializedHyperVReplica2012R2EventDetails.containerName = reader.getString(); - } else if ("fabricName".equals(fieldName)) { - deserializedHyperVReplica2012R2EventDetails.fabricName = reader.getString(); - } else if ("remoteContainerName".equals(fieldName)) { - deserializedHyperVReplica2012R2EventDetails.remoteContainerName = reader.getString(); - } else if ("remoteFabricName".equals(fieldName)) { - deserializedHyperVReplica2012R2EventDetails.remoteFabricName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplica2012R2EventDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureApplyRecoveryPointInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureApplyRecoveryPointInput.java deleted file mode 100644 index d0322a1be5dc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureApplyRecoveryPointInput.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * ApplyRecoveryPoint input specific to HyperVReplicaAzure provider. - */ -@Fluent -public final class HyperVReplicaAzureApplyRecoveryPointInput extends ApplyRecoveryPointProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplicaAzure"; - - /* - * The primary kek certificate pfx. - */ - private String primaryKekCertificatePfx; - - /* - * The secondary kek certificate pfx. - */ - private String secondaryKekCertificatePfx; - - /** - * Creates an instance of HyperVReplicaAzureApplyRecoveryPointInput class. - */ - public HyperVReplicaAzureApplyRecoveryPointInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the primaryKekCertificatePfx property: The primary kek certificate pfx. - * - * @return the primaryKekCertificatePfx value. - */ - public String primaryKekCertificatePfx() { - return this.primaryKekCertificatePfx; - } - - /** - * Set the primaryKekCertificatePfx property: 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 secondaryKekCertificatePfx property: The secondary kek certificate pfx. - * - * @return the secondaryKekCertificatePfx value. - */ - public String secondaryKekCertificatePfx() { - return this.secondaryKekCertificatePfx; - } - - /** - * Set the secondaryKekCertificatePfx property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("primaryKekCertificatePfx", this.primaryKekCertificatePfx); - jsonWriter.writeStringField("secondaryKekCertificatePfx", this.secondaryKekCertificatePfx); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzureApplyRecoveryPointInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzureApplyRecoveryPointInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzureApplyRecoveryPointInput. - */ - public static HyperVReplicaAzureApplyRecoveryPointInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzureApplyRecoveryPointInput deserializedHyperVReplicaAzureApplyRecoveryPointInput - = new HyperVReplicaAzureApplyRecoveryPointInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaAzureApplyRecoveryPointInput.instanceType = reader.getString(); - } else if ("primaryKekCertificatePfx".equals(fieldName)) { - deserializedHyperVReplicaAzureApplyRecoveryPointInput.primaryKekCertificatePfx = reader.getString(); - } else if ("secondaryKekCertificatePfx".equals(fieldName)) { - deserializedHyperVReplicaAzureApplyRecoveryPointInput.secondaryKekCertificatePfx - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzureApplyRecoveryPointInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureDiskInputDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureDiskInputDetails.java deleted file mode 100644 index a9cd9ca64457..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureDiskInputDetails.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Disk input details. - */ -@Fluent -public final class HyperVReplicaAzureDiskInputDetails implements JsonSerializable { - /* - * The DiskId. - */ - private String diskId; - - /* - * The LogStorageAccountId. - */ - private String logStorageAccountId; - - /* - * The DiskType. - */ - private DiskAccountType diskType; - - /* - * The DiskEncryptionSet ARM ID. - */ - private String diskEncryptionSetId; - - /** - * Creates an instance of HyperVReplicaAzureDiskInputDetails class. - */ - public HyperVReplicaAzureDiskInputDetails() { - } - - /** - * Get the diskId property: The DiskId. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: The DiskId. - * - * @param diskId the diskId value to set. - * @return the HyperVReplicaAzureDiskInputDetails object itself. - */ - public HyperVReplicaAzureDiskInputDetails withDiskId(String diskId) { - this.diskId = diskId; - return this; - } - - /** - * Get the logStorageAccountId property: The LogStorageAccountId. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Set the logStorageAccountId property: The LogStorageAccountId. - * - * @param logStorageAccountId the logStorageAccountId value to set. - * @return the HyperVReplicaAzureDiskInputDetails object itself. - */ - public HyperVReplicaAzureDiskInputDetails withLogStorageAccountId(String logStorageAccountId) { - this.logStorageAccountId = logStorageAccountId; - return this; - } - - /** - * Get the diskType property: The DiskType. - * - * @return the diskType value. - */ - public DiskAccountType diskType() { - return this.diskType; - } - - /** - * Set the diskType property: The DiskType. - * - * @param diskType the diskType value to set. - * @return the HyperVReplicaAzureDiskInputDetails object itself. - */ - public HyperVReplicaAzureDiskInputDetails withDiskType(DiskAccountType diskType) { - this.diskType = diskType; - return this; - } - - /** - * Get the diskEncryptionSetId property: The DiskEncryptionSet ARM ID. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Set the diskEncryptionSetId property: The DiskEncryptionSet ARM ID. - * - * @param diskEncryptionSetId the diskEncryptionSetId value to set. - * @return the HyperVReplicaAzureDiskInputDetails object itself. - */ - public HyperVReplicaAzureDiskInputDetails withDiskEncryptionSetId(String diskEncryptionSetId) { - this.diskEncryptionSetId = diskEncryptionSetId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("logStorageAccountId", this.logStorageAccountId); - jsonWriter.writeStringField("diskType", this.diskType == null ? null : this.diskType.toString()); - jsonWriter.writeStringField("diskEncryptionSetId", this.diskEncryptionSetId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzureDiskInputDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzureDiskInputDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzureDiskInputDetails. - */ - public static HyperVReplicaAzureDiskInputDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzureDiskInputDetails deserializedHyperVReplicaAzureDiskInputDetails - = new HyperVReplicaAzureDiskInputDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedHyperVReplicaAzureDiskInputDetails.diskId = reader.getString(); - } else if ("logStorageAccountId".equals(fieldName)) { - deserializedHyperVReplicaAzureDiskInputDetails.logStorageAccountId = reader.getString(); - } else if ("diskType".equals(fieldName)) { - deserializedHyperVReplicaAzureDiskInputDetails.diskType - = DiskAccountType.fromString(reader.getString()); - } else if ("diskEncryptionSetId".equals(fieldName)) { - deserializedHyperVReplicaAzureDiskInputDetails.diskEncryptionSetId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzureDiskInputDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureEnableProtectionInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureEnableProtectionInput.java deleted file mode 100644 index a53875e25aa7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureEnableProtectionInput.java +++ /dev/null @@ -1,908 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * HyperVReplicaAzure specific enable protection input. - */ -@Fluent -public final class HyperVReplicaAzureEnableProtectionInput extends EnableProtectionProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplicaAzure"; - - /* - * The Hyper-V host VM Id. - */ - private String hvHostVmId; - - /* - * The VM Name. - */ - private String vmName; - - /* - * The OS type associated with VM. - */ - private String osType; - - /* - * The OS disk VHD id associated with VM. - */ - private String vhdId; - - /* - * The storage account Id. - */ - private String targetStorageAccountId; - - /* - * The selected target Azure network Id. - */ - private String targetAzureNetworkId; - - /* - * The selected target Azure subnet Id. - */ - private String targetAzureSubnetId; - - /* - * The selected option to enable RDP\SSH on target vm after failover. String value of - * SrsDataContract.EnableRDPOnTargetOption enum. - */ - private String enableRdpOnTargetOption; - - /* - * The target azure VM Name. - */ - private String targetAzureVmName; - - /* - * The storage account to be used for logging during replication. - */ - private String logStorageAccountId; - - /* - * The list of VHD Ids of disks to be protected. - */ - private List disksToInclude; - - /* - * The Id of the target resource group (for classic deployment) in which the failover VM is to be created. - */ - private String targetAzureV1ResourceGroupId; - - /* - * The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. - */ - private String targetAzureV2ResourceGroupId; - - /* - * A value indicating whether managed disks should be used during failover. - */ - private String useManagedDisks; - - /* - * The target availability set ARM Id for resource manager deployment. - */ - private String targetAvailabilitySetId; - - /* - * The target availability zone. - */ - private String targetAvailabilityZone; - - /* - * License type. - */ - private LicenseType licenseType; - - /* - * The SQL Server license type. - */ - private SqlServerLicenseType sqlServerLicenseType; - - /* - * The target VM size. - */ - private String targetVmSize; - - /* - * The proximity placement group ARM Id. - */ - private String targetProximityPlacementGroupId; - - /* - * A value indicating whether managed disks should be used during replication. - */ - private String useManagedDisksForReplication; - - /* - * The DiskType. - */ - private DiskAccountType diskType; - - /* - * The disks to include list for managed disks. - */ - private List disksToIncludeForManagedDisks; - - /* - * The DiskEncryptionSet ARM Id. - */ - private String diskEncryptionSetId; - - /* - * The target VM tags. - */ - private Map targetVmTags; - - /* - * The tags for the seed managed disks. - */ - private Map seedManagedDiskTags; - - /* - * The tags for the target managed disks. - */ - private Map targetManagedDiskTags; - - /* - * The tags for the target NICs. - */ - private Map targetNicTags; - - /** - * Creates an instance of HyperVReplicaAzureEnableProtectionInput class. - */ - public HyperVReplicaAzureEnableProtectionInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the hvHostVmId property: The Hyper-V host VM Id. - * - * @return the hvHostVmId value. - */ - public String hvHostVmId() { - return this.hvHostVmId; - } - - /** - * Set the hvHostVmId property: 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 vmName property: The VM Name. - * - * @return the vmName value. - */ - public String vmName() { - return this.vmName; - } - - /** - * Set the vmName property: 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 osType property: The OS type associated with VM. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: 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 vhdId property: The OS disk VHD id associated with VM. - * - * @return the vhdId value. - */ - public String vhdId() { - return this.vhdId; - } - - /** - * Set the vhdId property: 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 targetStorageAccountId property: The storage account Id. - * - * @return the targetStorageAccountId value. - */ - public String targetStorageAccountId() { - return this.targetStorageAccountId; - } - - /** - * Set the targetStorageAccountId property: The storage account Id. - * - * @param targetStorageAccountId the targetStorageAccountId value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput withTargetStorageAccountId(String targetStorageAccountId) { - this.targetStorageAccountId = targetStorageAccountId; - return this; - } - - /** - * Get the targetAzureNetworkId property: The selected target Azure network Id. - * - * @return the targetAzureNetworkId value. - */ - public String targetAzureNetworkId() { - return this.targetAzureNetworkId; - } - - /** - * Set the targetAzureNetworkId property: 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 targetAzureSubnetId property: The selected target Azure subnet Id. - * - * @return the targetAzureSubnetId value. - */ - public String targetAzureSubnetId() { - return this.targetAzureSubnetId; - } - - /** - * Set the targetAzureSubnetId property: 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 enableRdpOnTargetOption property: 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 enableRdpOnTargetOption property: 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 targetAzureVmName property: The target azure VM Name. - * - * @return the targetAzureVmName value. - */ - public String targetAzureVmName() { - return this.targetAzureVmName; - } - - /** - * Set the targetAzureVmName property: 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 logStorageAccountId property: The storage account to be used for logging during replication. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Set the logStorageAccountId property: 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 disksToInclude property: The list of VHD Ids of disks to be protected. - * - * @return the disksToInclude value. - */ - public List disksToInclude() { - return this.disksToInclude; - } - - /** - * Set the disksToInclude property: 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 targetAzureV1ResourceGroupId property: 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 targetAzureV1ResourceGroupId property: 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 targetAzureV2ResourceGroupId property: 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 targetAzureV2ResourceGroupId property: 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 the useManagedDisks property: A value indicating whether managed disks should be used during failover. - * - * @return the useManagedDisks value. - */ - public String useManagedDisks() { - return this.useManagedDisks; - } - - /** - * Set the useManagedDisks property: 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; - } - - /** - * Get the targetAvailabilitySetId property: The target availability set ARM Id for resource manager deployment. - * - * @return the targetAvailabilitySetId value. - */ - public String targetAvailabilitySetId() { - return this.targetAvailabilitySetId; - } - - /** - * Set the targetAvailabilitySetId property: The target availability set ARM Id for resource manager deployment. - * - * @param targetAvailabilitySetId the targetAvailabilitySetId value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput withTargetAvailabilitySetId(String targetAvailabilitySetId) { - this.targetAvailabilitySetId = targetAvailabilitySetId; - return this; - } - - /** - * Get the targetAvailabilityZone property: The target availability zone. - * - * @return the targetAvailabilityZone value. - */ - public String targetAvailabilityZone() { - return this.targetAvailabilityZone; - } - - /** - * Set the targetAvailabilityZone property: The target availability zone. - * - * @param targetAvailabilityZone the targetAvailabilityZone value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput withTargetAvailabilityZone(String targetAvailabilityZone) { - this.targetAvailabilityZone = targetAvailabilityZone; - return this; - } - - /** - * Get the licenseType property: License type. - * - * @return the licenseType value. - */ - public LicenseType licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: License type. - * - * @param licenseType the licenseType value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput withLicenseType(LicenseType licenseType) { - this.licenseType = licenseType; - return this; - } - - /** - * Get the sqlServerLicenseType property: The SQL Server license type. - * - * @return the sqlServerLicenseType value. - */ - public SqlServerLicenseType sqlServerLicenseType() { - return this.sqlServerLicenseType; - } - - /** - * Set the sqlServerLicenseType property: The SQL Server license type. - * - * @param sqlServerLicenseType the sqlServerLicenseType value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput withSqlServerLicenseType(SqlServerLicenseType sqlServerLicenseType) { - this.sqlServerLicenseType = sqlServerLicenseType; - return this; - } - - /** - * Get the targetVmSize property: The target VM size. - * - * @return the targetVmSize value. - */ - public String targetVmSize() { - return this.targetVmSize; - } - - /** - * Set the targetVmSize property: The target VM size. - * - * @param targetVmSize the targetVmSize value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput withTargetVmSize(String targetVmSize) { - this.targetVmSize = targetVmSize; - return this; - } - - /** - * Get the targetProximityPlacementGroupId property: The proximity placement group ARM Id. - * - * @return the targetProximityPlacementGroupId value. - */ - public String targetProximityPlacementGroupId() { - return this.targetProximityPlacementGroupId; - } - - /** - * Set the targetProximityPlacementGroupId property: The proximity placement group ARM Id. - * - * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput - withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) { - this.targetProximityPlacementGroupId = targetProximityPlacementGroupId; - return this; - } - - /** - * Get the useManagedDisksForReplication property: A value indicating whether managed disks should be used during - * replication. - * - * @return the useManagedDisksForReplication value. - */ - public String useManagedDisksForReplication() { - return this.useManagedDisksForReplication; - } - - /** - * Set the useManagedDisksForReplication property: A value indicating whether managed disks should be used during - * replication. - * - * @param useManagedDisksForReplication the useManagedDisksForReplication value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput - withUseManagedDisksForReplication(String useManagedDisksForReplication) { - this.useManagedDisksForReplication = useManagedDisksForReplication; - return this; - } - - /** - * Get the diskType property: The DiskType. - * - * @return the diskType value. - */ - public DiskAccountType diskType() { - return this.diskType; - } - - /** - * Set the diskType property: The DiskType. - * - * @param diskType the diskType value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput withDiskType(DiskAccountType diskType) { - this.diskType = diskType; - return this; - } - - /** - * Get the disksToIncludeForManagedDisks property: The disks to include list for managed disks. - * - * @return the disksToIncludeForManagedDisks value. - */ - public List disksToIncludeForManagedDisks() { - return this.disksToIncludeForManagedDisks; - } - - /** - * Set the disksToIncludeForManagedDisks property: The disks to include list for managed disks. - * - * @param disksToIncludeForManagedDisks the disksToIncludeForManagedDisks value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput - withDisksToIncludeForManagedDisks(List disksToIncludeForManagedDisks) { - this.disksToIncludeForManagedDisks = disksToIncludeForManagedDisks; - return this; - } - - /** - * Get the diskEncryptionSetId property: The DiskEncryptionSet ARM Id. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Set the diskEncryptionSetId property: The DiskEncryptionSet ARM Id. - * - * @param diskEncryptionSetId the diskEncryptionSetId value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput withDiskEncryptionSetId(String diskEncryptionSetId) { - this.diskEncryptionSetId = diskEncryptionSetId; - return this; - } - - /** - * Get the targetVmTags property: The target VM tags. - * - * @return the targetVmTags value. - */ - public Map targetVmTags() { - return this.targetVmTags; - } - - /** - * Set the targetVmTags property: The target VM tags. - * - * @param targetVmTags the targetVmTags value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput withTargetVmTags(Map targetVmTags) { - this.targetVmTags = targetVmTags; - return this; - } - - /** - * Get the seedManagedDiskTags property: The tags for the seed managed disks. - * - * @return the seedManagedDiskTags value. - */ - public Map seedManagedDiskTags() { - return this.seedManagedDiskTags; - } - - /** - * Set the seedManagedDiskTags property: The tags for the seed managed disks. - * - * @param seedManagedDiskTags the seedManagedDiskTags value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput withSeedManagedDiskTags(Map seedManagedDiskTags) { - this.seedManagedDiskTags = seedManagedDiskTags; - return this; - } - - /** - * Get the targetManagedDiskTags property: The tags for the target managed disks. - * - * @return the targetManagedDiskTags value. - */ - public Map targetManagedDiskTags() { - return this.targetManagedDiskTags; - } - - /** - * Set the targetManagedDiskTags property: The tags for the target managed disks. - * - * @param targetManagedDiskTags the targetManagedDiskTags value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput - withTargetManagedDiskTags(Map targetManagedDiskTags) { - this.targetManagedDiskTags = targetManagedDiskTags; - return this; - } - - /** - * Get the targetNicTags property: The tags for the target NICs. - * - * @return the targetNicTags value. - */ - public Map targetNicTags() { - return this.targetNicTags; - } - - /** - * Set the targetNicTags property: The tags for the target NICs. - * - * @param targetNicTags the targetNicTags value to set. - * @return the HyperVReplicaAzureEnableProtectionInput object itself. - */ - public HyperVReplicaAzureEnableProtectionInput withTargetNicTags(Map targetNicTags) { - this.targetNicTags = targetNicTags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (disksToIncludeForManagedDisks() != null) { - disksToIncludeForManagedDisks().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("hvHostVmId", this.hvHostVmId); - jsonWriter.writeStringField("vmName", this.vmName); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeStringField("vhdId", this.vhdId); - jsonWriter.writeStringField("targetStorageAccountId", this.targetStorageAccountId); - jsonWriter.writeStringField("targetAzureNetworkId", this.targetAzureNetworkId); - jsonWriter.writeStringField("targetAzureSubnetId", this.targetAzureSubnetId); - jsonWriter.writeStringField("enableRdpOnTargetOption", this.enableRdpOnTargetOption); - jsonWriter.writeStringField("targetAzureVmName", this.targetAzureVmName); - jsonWriter.writeStringField("logStorageAccountId", this.logStorageAccountId); - jsonWriter.writeArrayField("disksToInclude", this.disksToInclude, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("targetAzureV1ResourceGroupId", this.targetAzureV1ResourceGroupId); - jsonWriter.writeStringField("targetAzureV2ResourceGroupId", this.targetAzureV2ResourceGroupId); - jsonWriter.writeStringField("useManagedDisks", this.useManagedDisks); - jsonWriter.writeStringField("targetAvailabilitySetId", this.targetAvailabilitySetId); - jsonWriter.writeStringField("targetAvailabilityZone", this.targetAvailabilityZone); - jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); - jsonWriter.writeStringField("sqlServerLicenseType", - this.sqlServerLicenseType == null ? null : this.sqlServerLicenseType.toString()); - jsonWriter.writeStringField("targetVmSize", this.targetVmSize); - jsonWriter.writeStringField("targetProximityPlacementGroupId", this.targetProximityPlacementGroupId); - jsonWriter.writeStringField("useManagedDisksForReplication", this.useManagedDisksForReplication); - jsonWriter.writeStringField("diskType", this.diskType == null ? null : this.diskType.toString()); - jsonWriter.writeArrayField("disksToIncludeForManagedDisks", this.disksToIncludeForManagedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("diskEncryptionSetId", this.diskEncryptionSetId); - jsonWriter.writeMapField("targetVmTags", this.targetVmTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("seedManagedDiskTags", this.seedManagedDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetManagedDiskTags", this.targetManagedDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetNicTags", this.targetNicTags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzureEnableProtectionInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzureEnableProtectionInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzureEnableProtectionInput. - */ - public static HyperVReplicaAzureEnableProtectionInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzureEnableProtectionInput deserializedHyperVReplicaAzureEnableProtectionInput - = new HyperVReplicaAzureEnableProtectionInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.instanceType = reader.getString(); - } else if ("hvHostVmId".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.hvHostVmId = reader.getString(); - } else if ("vmName".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.vmName = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.osType = reader.getString(); - } else if ("vhdId".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.vhdId = reader.getString(); - } else if ("targetStorageAccountId".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.targetStorageAccountId = reader.getString(); - } else if ("targetAzureNetworkId".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.targetAzureNetworkId = reader.getString(); - } else if ("targetAzureSubnetId".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.targetAzureSubnetId = reader.getString(); - } else if ("enableRdpOnTargetOption".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.enableRdpOnTargetOption = reader.getString(); - } else if ("targetAzureVmName".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.targetAzureVmName = reader.getString(); - } else if ("logStorageAccountId".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.logStorageAccountId = reader.getString(); - } else if ("disksToInclude".equals(fieldName)) { - List disksToInclude = reader.readArray(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureEnableProtectionInput.disksToInclude = disksToInclude; - } else if ("targetAzureV1ResourceGroupId".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.targetAzureV1ResourceGroupId - = reader.getString(); - } else if ("targetAzureV2ResourceGroupId".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.targetAzureV2ResourceGroupId - = reader.getString(); - } else if ("useManagedDisks".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.useManagedDisks = reader.getString(); - } else if ("targetAvailabilitySetId".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.targetAvailabilitySetId = reader.getString(); - } else if ("targetAvailabilityZone".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.targetAvailabilityZone = reader.getString(); - } else if ("licenseType".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.licenseType - = LicenseType.fromString(reader.getString()); - } else if ("sqlServerLicenseType".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.sqlServerLicenseType - = SqlServerLicenseType.fromString(reader.getString()); - } else if ("targetVmSize".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.targetVmSize = reader.getString(); - } else if ("targetProximityPlacementGroupId".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.targetProximityPlacementGroupId - = reader.getString(); - } else if ("useManagedDisksForReplication".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.useManagedDisksForReplication - = reader.getString(); - } else if ("diskType".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.diskType - = DiskAccountType.fromString(reader.getString()); - } else if ("disksToIncludeForManagedDisks".equals(fieldName)) { - List disksToIncludeForManagedDisks - = reader.readArray(reader1 -> HyperVReplicaAzureDiskInputDetails.fromJson(reader1)); - deserializedHyperVReplicaAzureEnableProtectionInput.disksToIncludeForManagedDisks - = disksToIncludeForManagedDisks; - } else if ("diskEncryptionSetId".equals(fieldName)) { - deserializedHyperVReplicaAzureEnableProtectionInput.diskEncryptionSetId = reader.getString(); - } else if ("targetVmTags".equals(fieldName)) { - Map targetVmTags = reader.readMap(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureEnableProtectionInput.targetVmTags = targetVmTags; - } else if ("seedManagedDiskTags".equals(fieldName)) { - Map seedManagedDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureEnableProtectionInput.seedManagedDiskTags = seedManagedDiskTags; - } else if ("targetManagedDiskTags".equals(fieldName)) { - Map targetManagedDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureEnableProtectionInput.targetManagedDiskTags = targetManagedDiskTags; - } else if ("targetNicTags".equals(fieldName)) { - Map targetNicTags = reader.readMap(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureEnableProtectionInput.targetNicTags = targetNicTags; - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzureEnableProtectionInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureEventDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureEventDetails.java deleted file mode 100644 index b17d633a6b60..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureEventDetails.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model class for event details of a HyperVReplica E2A event. - */ -@Fluent -public final class HyperVReplicaAzureEventDetails extends EventProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "HyperVReplicaAzure"; - - /* - * The container friendly name. - */ - private String containerName; - - /* - * The fabric friendly name. - */ - private String fabricName; - - /* - * The remote container name. - */ - private String remoteContainerName; - - /** - * Creates an instance of HyperVReplicaAzureEventDetails class. - */ - public HyperVReplicaAzureEventDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the containerName property: The container friendly name. - * - * @return the containerName value. - */ - public String containerName() { - return this.containerName; - } - - /** - * Set the containerName property: 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 fabricName property: The fabric friendly name. - * - * @return the fabricName value. - */ - public String fabricName() { - return this.fabricName; - } - - /** - * Set the fabricName property: 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 remoteContainerName property: The remote container name. - * - * @return the remoteContainerName value. - */ - public String remoteContainerName() { - return this.remoteContainerName; - } - - /** - * Set the remoteContainerName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("containerName", this.containerName); - jsonWriter.writeStringField("fabricName", this.fabricName); - jsonWriter.writeStringField("remoteContainerName", this.remoteContainerName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzureEventDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzureEventDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzureEventDetails. - */ - public static HyperVReplicaAzureEventDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzureEventDetails deserializedHyperVReplicaAzureEventDetails - = new HyperVReplicaAzureEventDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaAzureEventDetails.instanceType = reader.getString(); - } else if ("containerName".equals(fieldName)) { - deserializedHyperVReplicaAzureEventDetails.containerName = reader.getString(); - } else if ("fabricName".equals(fieldName)) { - deserializedHyperVReplicaAzureEventDetails.fabricName = reader.getString(); - } else if ("remoteContainerName".equals(fieldName)) { - deserializedHyperVReplicaAzureEventDetails.remoteContainerName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzureEventDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureFailbackProviderInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureFailbackProviderInput.java deleted file mode 100644 index fe2ce18407cc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureFailbackProviderInput.java +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * HyperVReplicaAzureFailback specific planned failover input. - */ -@Fluent -public final class HyperVReplicaAzureFailbackProviderInput extends PlannedFailoverProviderSpecificFailoverInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplicaAzureFailback"; - - /* - * Data sync option. - */ - private String dataSyncOption; - - /* - * ALR options to create alternate recovery. - */ - private String recoveryVmCreationOption; - - /* - * Provider Id for alternate location. - */ - private String providerIdForAlternateRecovery; - - /** - * Creates an instance of HyperVReplicaAzureFailbackProviderInput class. - */ - public HyperVReplicaAzureFailbackProviderInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the dataSyncOption property: Data sync option. - * - * @return the dataSyncOption value. - */ - public String dataSyncOption() { - return this.dataSyncOption; - } - - /** - * Set the dataSyncOption property: 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 the recoveryVmCreationOption property: ALR options to create alternate recovery. - * - * @return the recoveryVmCreationOption value. - */ - public String recoveryVmCreationOption() { - return this.recoveryVmCreationOption; - } - - /** - * Set the recoveryVmCreationOption property: 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 the providerIdForAlternateRecovery property: Provider Id for alternate location. - * - * @return the providerIdForAlternateRecovery value. - */ - public String providerIdForAlternateRecovery() { - return this.providerIdForAlternateRecovery; - } - - /** - * Set the providerIdForAlternateRecovery property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("dataSyncOption", this.dataSyncOption); - jsonWriter.writeStringField("recoveryVmCreationOption", this.recoveryVmCreationOption); - jsonWriter.writeStringField("providerIdForAlternateRecovery", this.providerIdForAlternateRecovery); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzureFailbackProviderInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzureFailbackProviderInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzureFailbackProviderInput. - */ - public static HyperVReplicaAzureFailbackProviderInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzureFailbackProviderInput deserializedHyperVReplicaAzureFailbackProviderInput - = new HyperVReplicaAzureFailbackProviderInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaAzureFailbackProviderInput.instanceType = reader.getString(); - } else if ("dataSyncOption".equals(fieldName)) { - deserializedHyperVReplicaAzureFailbackProviderInput.dataSyncOption = reader.getString(); - } else if ("recoveryVmCreationOption".equals(fieldName)) { - deserializedHyperVReplicaAzureFailbackProviderInput.recoveryVmCreationOption = reader.getString(); - } else if ("providerIdForAlternateRecovery".equals(fieldName)) { - deserializedHyperVReplicaAzureFailbackProviderInput.providerIdForAlternateRecovery - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzureFailbackProviderInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureManagedDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureManagedDiskDetails.java deleted file mode 100644 index eb0a19bec8b2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureManagedDiskDetails.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Hyper-V Managed disk details. - */ -@Fluent -public final class HyperVReplicaAzureManagedDiskDetails - implements JsonSerializable { - /* - * The disk Id. - */ - private String diskId; - - /* - * Seed managed disk Id. - */ - private String seedManagedDiskId; - - /* - * The replica disk type. - */ - private String replicaDiskType; - - /* - * The disk encryption set ARM Id. - */ - private String diskEncryptionSetId; - - /** - * Creates an instance of HyperVReplicaAzureManagedDiskDetails class. - */ - public HyperVReplicaAzureManagedDiskDetails() { - } - - /** - * Get the diskId property: The disk Id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: The disk Id. - * - * @param diskId the diskId value to set. - * @return the HyperVReplicaAzureManagedDiskDetails object itself. - */ - public HyperVReplicaAzureManagedDiskDetails withDiskId(String diskId) { - this.diskId = diskId; - return this; - } - - /** - * Get the seedManagedDiskId property: Seed managed disk Id. - * - * @return the seedManagedDiskId value. - */ - public String seedManagedDiskId() { - return this.seedManagedDiskId; - } - - /** - * Set the seedManagedDiskId property: Seed managed disk Id. - * - * @param seedManagedDiskId the seedManagedDiskId value to set. - * @return the HyperVReplicaAzureManagedDiskDetails object itself. - */ - public HyperVReplicaAzureManagedDiskDetails withSeedManagedDiskId(String seedManagedDiskId) { - this.seedManagedDiskId = seedManagedDiskId; - return this; - } - - /** - * Get the replicaDiskType property: The replica disk type. - * - * @return the replicaDiskType value. - */ - public String replicaDiskType() { - return this.replicaDiskType; - } - - /** - * Set the replicaDiskType property: The replica disk type. - * - * @param replicaDiskType the replicaDiskType value to set. - * @return the HyperVReplicaAzureManagedDiskDetails object itself. - */ - public HyperVReplicaAzureManagedDiskDetails withReplicaDiskType(String replicaDiskType) { - this.replicaDiskType = replicaDiskType; - return this; - } - - /** - * Get the diskEncryptionSetId property: The disk encryption set ARM Id. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Set the diskEncryptionSetId property: The disk encryption set ARM Id. - * - * @param diskEncryptionSetId the diskEncryptionSetId value to set. - * @return the HyperVReplicaAzureManagedDiskDetails object itself. - */ - public HyperVReplicaAzureManagedDiskDetails withDiskEncryptionSetId(String diskEncryptionSetId) { - this.diskEncryptionSetId = diskEncryptionSetId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("seedManagedDiskId", this.seedManagedDiskId); - jsonWriter.writeStringField("replicaDiskType", this.replicaDiskType); - jsonWriter.writeStringField("diskEncryptionSetId", this.diskEncryptionSetId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzureManagedDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzureManagedDiskDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzureManagedDiskDetails. - */ - public static HyperVReplicaAzureManagedDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzureManagedDiskDetails deserializedHyperVReplicaAzureManagedDiskDetails - = new HyperVReplicaAzureManagedDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedHyperVReplicaAzureManagedDiskDetails.diskId = reader.getString(); - } else if ("seedManagedDiskId".equals(fieldName)) { - deserializedHyperVReplicaAzureManagedDiskDetails.seedManagedDiskId = reader.getString(); - } else if ("replicaDiskType".equals(fieldName)) { - deserializedHyperVReplicaAzureManagedDiskDetails.replicaDiskType = reader.getString(); - } else if ("diskEncryptionSetId".equals(fieldName)) { - deserializedHyperVReplicaAzureManagedDiskDetails.diskEncryptionSetId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzureManagedDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzurePlannedFailoverProviderInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzurePlannedFailoverProviderInput.java deleted file mode 100644 index 84833499f8fa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzurePlannedFailoverProviderInput.java +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * HyperVReplicaAzure specific planned failover input. - */ -@Fluent -public final class HyperVReplicaAzurePlannedFailoverProviderInput extends PlannedFailoverProviderSpecificFailoverInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplicaAzure"; - - /* - * Primary kek certificate pfx. - */ - private String primaryKekCertificatePfx; - - /* - * Secondary kek certificate pfx. - */ - 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. - */ - private String recoveryPointId; - - /* - * A value indicating the inplace OS Upgrade version. - */ - private String osUpgradeVersion; - - /** - * Creates an instance of HyperVReplicaAzurePlannedFailoverProviderInput class. - */ - public HyperVReplicaAzurePlannedFailoverProviderInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the primaryKekCertificatePfx property: Primary kek certificate pfx. - * - * @return the primaryKekCertificatePfx value. - */ - public String primaryKekCertificatePfx() { - return this.primaryKekCertificatePfx; - } - - /** - * Set the primaryKekCertificatePfx property: Primary kek certificate pfx. - * - * @param primaryKekCertificatePfx the primaryKekCertificatePfx value to set. - * @return the HyperVReplicaAzurePlannedFailoverProviderInput object itself. - */ - public HyperVReplicaAzurePlannedFailoverProviderInput - withPrimaryKekCertificatePfx(String primaryKekCertificatePfx) { - this.primaryKekCertificatePfx = primaryKekCertificatePfx; - return this; - } - - /** - * Get the secondaryKekCertificatePfx property: Secondary kek certificate pfx. - * - * @return the secondaryKekCertificatePfx value. - */ - public String secondaryKekCertificatePfx() { - return this.secondaryKekCertificatePfx; - } - - /** - * Set the secondaryKekCertificatePfx property: Secondary kek certificate pfx. - * - * @param secondaryKekCertificatePfx the secondaryKekCertificatePfx value to set. - * @return the HyperVReplicaAzurePlannedFailoverProviderInput object itself. - */ - public HyperVReplicaAzurePlannedFailoverProviderInput - withSecondaryKekCertificatePfx(String secondaryKekCertificatePfx) { - this.secondaryKekCertificatePfx = secondaryKekCertificatePfx; - return this; - } - - /** - * Get the recoveryPointId property: 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 recoveryPointId property: 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 HyperVReplicaAzurePlannedFailoverProviderInput object itself. - */ - public HyperVReplicaAzurePlannedFailoverProviderInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Get the osUpgradeVersion property: A value indicating the inplace OS Upgrade version. - * - * @return the osUpgradeVersion value. - */ - public String osUpgradeVersion() { - return this.osUpgradeVersion; - } - - /** - * Set the osUpgradeVersion property: A value indicating the inplace OS Upgrade version. - * - * @param osUpgradeVersion the osUpgradeVersion value to set. - * @return the HyperVReplicaAzurePlannedFailoverProviderInput object itself. - */ - public HyperVReplicaAzurePlannedFailoverProviderInput withOsUpgradeVersion(String osUpgradeVersion) { - this.osUpgradeVersion = osUpgradeVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("primaryKekCertificatePfx", this.primaryKekCertificatePfx); - jsonWriter.writeStringField("secondaryKekCertificatePfx", this.secondaryKekCertificatePfx); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - jsonWriter.writeStringField("osUpgradeVersion", this.osUpgradeVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzurePlannedFailoverProviderInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzurePlannedFailoverProviderInput if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzurePlannedFailoverProviderInput. - */ - public static HyperVReplicaAzurePlannedFailoverProviderInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzurePlannedFailoverProviderInput deserializedHyperVReplicaAzurePlannedFailoverProviderInput - = new HyperVReplicaAzurePlannedFailoverProviderInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaAzurePlannedFailoverProviderInput.instanceType = reader.getString(); - } else if ("primaryKekCertificatePfx".equals(fieldName)) { - deserializedHyperVReplicaAzurePlannedFailoverProviderInput.primaryKekCertificatePfx - = reader.getString(); - } else if ("secondaryKekCertificatePfx".equals(fieldName)) { - deserializedHyperVReplicaAzurePlannedFailoverProviderInput.secondaryKekCertificatePfx - = reader.getString(); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedHyperVReplicaAzurePlannedFailoverProviderInput.recoveryPointId = reader.getString(); - } else if ("osUpgradeVersion".equals(fieldName)) { - deserializedHyperVReplicaAzurePlannedFailoverProviderInput.osUpgradeVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzurePlannedFailoverProviderInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzurePolicyDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzurePolicyDetails.java deleted file mode 100644 index 4bef3505142f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzurePolicyDetails.java +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Hyper-V Replica Azure specific protection profile details. - */ -@Fluent -public final class HyperVReplicaAzurePolicyDetails extends PolicyProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "HyperVReplicaAzure"; - - /* - * The duration (in hours) to which point the recovery history needs to be maintained. - */ - private Integer recoveryPointHistoryDurationInHours; - - /* - * The interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. - */ - private Integer applicationConsistentSnapshotFrequencyInHours; - - /* - * The replication interval. - */ - private Integer replicationInterval; - - /* - * The scheduled start time for the initial replication. If this parameter is Null, the initial replication starts - * immediately. - */ - private String onlineReplicationStartTime; - - /* - * A value indicating whether encryption is enabled for virtual machines in this cloud. - */ - private String encryption; - - /* - * The active storage account Id. - */ - private String activeStorageAccountId; - - /** - * Creates an instance of HyperVReplicaAzurePolicyDetails class. - */ - public HyperVReplicaAzurePolicyDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointHistoryDurationInHours property: 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 recoveryPointHistoryDurationInHours property: 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 applicationConsistentSnapshotFrequencyInHours property: 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 applicationConsistentSnapshotFrequencyInHours property: 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 replicationInterval property: The replication interval. - * - * @return the replicationInterval value. - */ - public Integer replicationInterval() { - return this.replicationInterval; - } - - /** - * Set the replicationInterval property: 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 onlineReplicationStartTime property: 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 onlineReplicationStartTime property: 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 the encryption property: A value indicating whether encryption is enabled for virtual machines in this cloud. - * - * @return the encryption value. - */ - public String encryption() { - return this.encryption; - } - - /** - * Set the encryption property: 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 activeStorageAccountId property: The active storage account Id. - * - * @return the activeStorageAccountId value. - */ - public String activeStorageAccountId() { - return this.activeStorageAccountId; - } - - /** - * Set the activeStorageAccountId property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPointHistoryDurationInHours", this.recoveryPointHistoryDurationInHours); - jsonWriter.writeNumberField("applicationConsistentSnapshotFrequencyInHours", - this.applicationConsistentSnapshotFrequencyInHours); - jsonWriter.writeNumberField("replicationInterval", this.replicationInterval); - jsonWriter.writeStringField("onlineReplicationStartTime", this.onlineReplicationStartTime); - jsonWriter.writeStringField("encryption", this.encryption); - jsonWriter.writeStringField("activeStorageAccountId", this.activeStorageAccountId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzurePolicyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzurePolicyDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzurePolicyDetails. - */ - public static HyperVReplicaAzurePolicyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzurePolicyDetails deserializedHyperVReplicaAzurePolicyDetails - = new HyperVReplicaAzurePolicyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaAzurePolicyDetails.instanceType = reader.getString(); - } else if ("recoveryPointHistoryDurationInHours".equals(fieldName)) { - deserializedHyperVReplicaAzurePolicyDetails.recoveryPointHistoryDurationInHours - = reader.getNullable(JsonReader::getInt); - } else if ("applicationConsistentSnapshotFrequencyInHours".equals(fieldName)) { - deserializedHyperVReplicaAzurePolicyDetails.applicationConsistentSnapshotFrequencyInHours - = reader.getNullable(JsonReader::getInt); - } else if ("replicationInterval".equals(fieldName)) { - deserializedHyperVReplicaAzurePolicyDetails.replicationInterval - = reader.getNullable(JsonReader::getInt); - } else if ("onlineReplicationStartTime".equals(fieldName)) { - deserializedHyperVReplicaAzurePolicyDetails.onlineReplicationStartTime = reader.getString(); - } else if ("encryption".equals(fieldName)) { - deserializedHyperVReplicaAzurePolicyDetails.encryption = reader.getString(); - } else if ("activeStorageAccountId".equals(fieldName)) { - deserializedHyperVReplicaAzurePolicyDetails.activeStorageAccountId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzurePolicyDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzurePolicyInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzurePolicyInput.java deleted file mode 100644 index 1fdece6ea200..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzurePolicyInput.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Hyper-V Replica Azure specific input for creating a protection profile. - */ -@Fluent -public final class HyperVReplicaAzurePolicyInput extends PolicyProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplicaAzure"; - - /* - * The duration (in hours) to which point the recovery history needs to be maintained. - */ - private Integer recoveryPointHistoryDuration; - - /* - * The interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. - */ - private Integer applicationConsistentSnapshotFrequencyInHours; - - /* - * The replication interval. - */ - private Integer replicationInterval; - - /* - * The scheduled start time for the initial replication. If this parameter is Null, the initial replication starts - * immediately. - */ - private String onlineReplicationStartTime; - - /* - * The list of storage accounts to which the VMs in the primary cloud can replicate to. - */ - private List storageAccounts; - - /** - * Creates an instance of HyperVReplicaAzurePolicyInput class. - */ - public HyperVReplicaAzurePolicyInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointHistoryDuration property: 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 recoveryPointHistoryDuration property: 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 applicationConsistentSnapshotFrequencyInHours property: 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 applicationConsistentSnapshotFrequencyInHours property: 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 replicationInterval property: The replication interval. - * - * @return the replicationInterval value. - */ - public Integer replicationInterval() { - return this.replicationInterval; - } - - /** - * Set the replicationInterval property: 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 onlineReplicationStartTime property: 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 onlineReplicationStartTime property: 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 the storageAccounts property: 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 storageAccounts property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPointHistoryDuration", this.recoveryPointHistoryDuration); - jsonWriter.writeNumberField("applicationConsistentSnapshotFrequencyInHours", - this.applicationConsistentSnapshotFrequencyInHours); - jsonWriter.writeNumberField("replicationInterval", this.replicationInterval); - jsonWriter.writeStringField("onlineReplicationStartTime", this.onlineReplicationStartTime); - jsonWriter.writeArrayField("storageAccounts", this.storageAccounts, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzurePolicyInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzurePolicyInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzurePolicyInput. - */ - public static HyperVReplicaAzurePolicyInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzurePolicyInput deserializedHyperVReplicaAzurePolicyInput - = new HyperVReplicaAzurePolicyInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaAzurePolicyInput.instanceType = reader.getString(); - } else if ("recoveryPointHistoryDuration".equals(fieldName)) { - deserializedHyperVReplicaAzurePolicyInput.recoveryPointHistoryDuration - = reader.getNullable(JsonReader::getInt); - } else if ("applicationConsistentSnapshotFrequencyInHours".equals(fieldName)) { - deserializedHyperVReplicaAzurePolicyInput.applicationConsistentSnapshotFrequencyInHours - = reader.getNullable(JsonReader::getInt); - } else if ("replicationInterval".equals(fieldName)) { - deserializedHyperVReplicaAzurePolicyInput.replicationInterval - = reader.getNullable(JsonReader::getInt); - } else if ("onlineReplicationStartTime".equals(fieldName)) { - deserializedHyperVReplicaAzurePolicyInput.onlineReplicationStartTime = reader.getString(); - } else if ("storageAccounts".equals(fieldName)) { - List storageAccounts = reader.readArray(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzurePolicyInput.storageAccounts = storageAccounts; - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzurePolicyInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureReplicationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureReplicationDetails.java deleted file mode 100644 index 43b4915b64e4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureReplicationDetails.java +++ /dev/null @@ -1,1096 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * Hyper V Replica Azure provider specific settings. - */ -@Fluent -public final class HyperVReplicaAzureReplicationDetails extends ReplicationProviderSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "HyperVReplicaAzure"; - - /* - * Azure VM Disk details. - */ - private List azureVmDiskDetails; - - /* - * Recovery Azure given name. - */ - private String recoveryAzureVmName; - - /* - * The Recovery Azure VM size. - */ - private String recoveryAzureVMSize; - - /* - * The recovery Azure storage account. - */ - 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. - */ - private String recoveryAzureLogStorageAccountId; - - /* - * The Last replication time. - */ - private OffsetDateTime lastReplicatedTime; - - /* - * Last RPO value. - */ - private Long rpoInSeconds; - - /* - * The last RPO calculated time. - */ - private OffsetDateTime lastRpoCalculatedTime; - - /* - * The virtual machine Id. - */ - private String vmId; - - /* - * The protection state for the vm. - */ - private String vmProtectionState; - - /* - * The protection state description for the vm. - */ - private String vmProtectionStateDescription; - - /* - * Initial replication details. - */ - private InitialReplicationDetails initialReplicationDetails; - - /* - * The PE Network details. - */ - private List vmNics; - - /* - * The selected recovery azure network Id. - */ - private String selectedRecoveryAzureNetworkId; - - /* - * The selected source nic Id which will be used as the primary nic during failover. - */ - private String selectedSourceNicId; - - /* - * The encryption info. - */ - private String encryption; - - /* - * The operating system info. - */ - private OSDetails oSDetails; - - /* - * The RAM size of the VM on the primary side. - */ - private Integer sourceVmRamSizeInMB; - - /* - * The CPU count of the VM on the primary side. - */ - private Integer sourceVmCpuCount; - - /* - * The selected option to enable RDP\SSH on target vm after failover. String value of - * SrsDataContract.EnableRDPOnTargetOption enum. - */ - private String enableRdpOnTargetOption; - - /* - * The target resource group Id. - */ - private String recoveryAzureResourceGroupId; - - /* - * The recovery availability set Id. - */ - private String recoveryAvailabilitySetId; - - /* - * The target availability zone. - */ - private String targetAvailabilityZone; - - /* - * The target proximity placement group Id. - */ - private String targetProximityPlacementGroupId; - - /* - * A value indicating whether managed disks should be used during failover. - */ - private String useManagedDisks; - - /* - * License Type of the VM to be used. - */ - private String licenseType; - - /* - * The SQL Server license type. - */ - private String sqlServerLicenseType; - - /* - * The last recovery point received time. - */ - private OffsetDateTime lastRecoveryPointReceived; - - /* - * The target VM tags. - */ - private Map targetVmTags; - - /* - * The tags for the seed managed disks. - */ - private Map seedManagedDiskTags; - - /* - * The tags for the target managed disks. - */ - private Map targetManagedDiskTags; - - /* - * The tags for the target NICs. - */ - private Map targetNicTags; - - /* - * The list of protected managed disks. - */ - private List protectedManagedDisks; - - /* - * A value indicating all available inplace OS Upgrade configurations. - */ - private List allAvailableOSUpgradeConfigurations; - - /** - * Creates an instance of HyperVReplicaAzureReplicationDetails class. - */ - public HyperVReplicaAzureReplicationDetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the azureVmDiskDetails property: Azure VM Disk details. - * - * @return the azureVmDiskDetails value. - */ - public List azureVmDiskDetails() { - return this.azureVmDiskDetails; - } - - /** - * Set the azureVmDiskDetails property: 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 the recoveryAzureVmName property: Recovery Azure given name. - * - * @return the recoveryAzureVmName value. - */ - public String recoveryAzureVmName() { - return this.recoveryAzureVmName; - } - - /** - * Set the recoveryAzureVmName property: 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 recoveryAzureVMSize property: The Recovery Azure VM size. - * - * @return the recoveryAzureVMSize value. - */ - public String recoveryAzureVMSize() { - return this.recoveryAzureVMSize; - } - - /** - * Set the recoveryAzureVMSize property: 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 recoveryAzureStorageAccount property: The recovery Azure storage account. - * - * @return the recoveryAzureStorageAccount value. - */ - public String recoveryAzureStorageAccount() { - return this.recoveryAzureStorageAccount; - } - - /** - * Set the recoveryAzureStorageAccount property: 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 recoveryAzureLogStorageAccountId property: 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 recoveryAzureLogStorageAccountId property: 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 lastReplicatedTime property: The Last replication time. - * - * @return the lastReplicatedTime value. - */ - public OffsetDateTime lastReplicatedTime() { - return this.lastReplicatedTime; - } - - /** - * Set the lastReplicatedTime property: The Last replication time. - * - * @param lastReplicatedTime the lastReplicatedTime value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails withLastReplicatedTime(OffsetDateTime lastReplicatedTime) { - this.lastReplicatedTime = lastReplicatedTime; - return this; - } - - /** - * Get the rpoInSeconds property: Last RPO value. - * - * @return the rpoInSeconds value. - */ - public Long rpoInSeconds() { - return this.rpoInSeconds; - } - - /** - * Set the rpoInSeconds property: Last RPO value. - * - * @param rpoInSeconds the rpoInSeconds value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails withRpoInSeconds(Long rpoInSeconds) { - this.rpoInSeconds = rpoInSeconds; - return this; - } - - /** - * Get the lastRpoCalculatedTime property: The last RPO calculated time. - * - * @return the lastRpoCalculatedTime value. - */ - public OffsetDateTime lastRpoCalculatedTime() { - return this.lastRpoCalculatedTime; - } - - /** - * Set the lastRpoCalculatedTime property: The last RPO calculated time. - * - * @param lastRpoCalculatedTime the lastRpoCalculatedTime value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails withLastRpoCalculatedTime(OffsetDateTime lastRpoCalculatedTime) { - this.lastRpoCalculatedTime = lastRpoCalculatedTime; - return this; - } - - /** - * Get the vmId property: The virtual machine Id. - * - * @return the vmId value. - */ - public String vmId() { - return this.vmId; - } - - /** - * Set the vmId property: 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 vmProtectionState property: The protection state for the vm. - * - * @return the vmProtectionState value. - */ - public String vmProtectionState() { - return this.vmProtectionState; - } - - /** - * Set the vmProtectionState property: 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 vmProtectionStateDescription property: The protection state description for the vm. - * - * @return the vmProtectionStateDescription value. - */ - public String vmProtectionStateDescription() { - return this.vmProtectionStateDescription; - } - - /** - * Set the vmProtectionStateDescription property: 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 the initialReplicationDetails property: Initial replication details. - * - * @return the initialReplicationDetails value. - */ - public InitialReplicationDetails initialReplicationDetails() { - return this.initialReplicationDetails; - } - - /** - * Set the initialReplicationDetails property: 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 vmNics property: The PE Network details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: 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 selectedRecoveryAzureNetworkId property: The selected recovery azure network Id. - * - * @return the selectedRecoveryAzureNetworkId value. - */ - public String selectedRecoveryAzureNetworkId() { - return this.selectedRecoveryAzureNetworkId; - } - - /** - * Set the selectedRecoveryAzureNetworkId property: 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 selectedSourceNicId property: The selected source nic Id which will be used as the primary nic during - * failover. - * - * @return the selectedSourceNicId value. - */ - public String selectedSourceNicId() { - return this.selectedSourceNicId; - } - - /** - * Set the selectedSourceNicId property: The selected source nic Id which will be used as the primary nic during - * failover. - * - * @param selectedSourceNicId the selectedSourceNicId value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails withSelectedSourceNicId(String selectedSourceNicId) { - this.selectedSourceNicId = selectedSourceNicId; - return this; - } - - /** - * Get the encryption property: The encryption info. - * - * @return the encryption value. - */ - public String encryption() { - return this.encryption; - } - - /** - * Set the encryption property: 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 oSDetails property: The operating system info. - * - * @return the oSDetails value. - */ - public OSDetails oSDetails() { - return this.oSDetails; - } - - /** - * Set the oSDetails property: 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 sourceVmRamSizeInMB property: The RAM size of the VM on the primary side. - * - * @return the sourceVmRamSizeInMB value. - */ - public Integer sourceVmRamSizeInMB() { - return this.sourceVmRamSizeInMB; - } - - /** - * Set the sourceVmRamSizeInMB property: 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 sourceVmCpuCount property: The CPU count of the VM on the primary side. - * - * @return the sourceVmCpuCount value. - */ - public Integer sourceVmCpuCount() { - return this.sourceVmCpuCount; - } - - /** - * Set the sourceVmCpuCount property: 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 enableRdpOnTargetOption property: 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 enableRdpOnTargetOption property: 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 recoveryAzureResourceGroupId property: The target resource group Id. - * - * @return the recoveryAzureResourceGroupId value. - */ - public String recoveryAzureResourceGroupId() { - return this.recoveryAzureResourceGroupId; - } - - /** - * Set the recoveryAzureResourceGroupId property: 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 recoveryAvailabilitySetId property: The recovery availability set Id. - * - * @return the recoveryAvailabilitySetId value. - */ - public String recoveryAvailabilitySetId() { - return this.recoveryAvailabilitySetId; - } - - /** - * Set the recoveryAvailabilitySetId property: 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 the targetAvailabilityZone property: The target availability zone. - * - * @return the targetAvailabilityZone value. - */ - public String targetAvailabilityZone() { - return this.targetAvailabilityZone; - } - - /** - * Set the targetAvailabilityZone property: The target availability zone. - * - * @param targetAvailabilityZone the targetAvailabilityZone value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails withTargetAvailabilityZone(String targetAvailabilityZone) { - this.targetAvailabilityZone = targetAvailabilityZone; - return this; - } - - /** - * Get the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @return the targetProximityPlacementGroupId value. - */ - public String targetProximityPlacementGroupId() { - return this.targetProximityPlacementGroupId; - } - - /** - * Set the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails - withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) { - this.targetProximityPlacementGroupId = targetProximityPlacementGroupId; - return this; - } - - /** - * Get the useManagedDisks property: A value indicating whether managed disks should be used during failover. - * - * @return the useManagedDisks value. - */ - public String useManagedDisks() { - return this.useManagedDisks; - } - - /** - * Set the useManagedDisks property: 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 the licenseType property: License Type of the VM to be used. - * - * @return the licenseType value. - */ - public String licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: 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; - } - - /** - * Get the sqlServerLicenseType property: The SQL Server license type. - * - * @return the sqlServerLicenseType value. - */ - public String sqlServerLicenseType() { - return this.sqlServerLicenseType; - } - - /** - * Set the sqlServerLicenseType property: The SQL Server license type. - * - * @param sqlServerLicenseType the sqlServerLicenseType value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails withSqlServerLicenseType(String sqlServerLicenseType) { - this.sqlServerLicenseType = sqlServerLicenseType; - return this; - } - - /** - * Get the lastRecoveryPointReceived property: The last recovery point received time. - * - * @return the lastRecoveryPointReceived value. - */ - public OffsetDateTime lastRecoveryPointReceived() { - return this.lastRecoveryPointReceived; - } - - /** - * Get the targetVmTags property: The target VM tags. - * - * @return the targetVmTags value. - */ - public Map targetVmTags() { - return this.targetVmTags; - } - - /** - * Set the targetVmTags property: The target VM tags. - * - * @param targetVmTags the targetVmTags value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails withTargetVmTags(Map targetVmTags) { - this.targetVmTags = targetVmTags; - return this; - } - - /** - * Get the seedManagedDiskTags property: The tags for the seed managed disks. - * - * @return the seedManagedDiskTags value. - */ - public Map seedManagedDiskTags() { - return this.seedManagedDiskTags; - } - - /** - * Set the seedManagedDiskTags property: The tags for the seed managed disks. - * - * @param seedManagedDiskTags the seedManagedDiskTags value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails withSeedManagedDiskTags(Map seedManagedDiskTags) { - this.seedManagedDiskTags = seedManagedDiskTags; - return this; - } - - /** - * Get the targetManagedDiskTags property: The tags for the target managed disks. - * - * @return the targetManagedDiskTags value. - */ - public Map targetManagedDiskTags() { - return this.targetManagedDiskTags; - } - - /** - * Set the targetManagedDiskTags property: The tags for the target managed disks. - * - * @param targetManagedDiskTags the targetManagedDiskTags value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails withTargetManagedDiskTags(Map targetManagedDiskTags) { - this.targetManagedDiskTags = targetManagedDiskTags; - return this; - } - - /** - * Get the targetNicTags property: The tags for the target NICs. - * - * @return the targetNicTags value. - */ - public Map targetNicTags() { - return this.targetNicTags; - } - - /** - * Set the targetNicTags property: The tags for the target NICs. - * - * @param targetNicTags the targetNicTags value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails withTargetNicTags(Map targetNicTags) { - this.targetNicTags = targetNicTags; - return this; - } - - /** - * Get the protectedManagedDisks property: The list of protected managed disks. - * - * @return the protectedManagedDisks value. - */ - public List protectedManagedDisks() { - return this.protectedManagedDisks; - } - - /** - * Set the protectedManagedDisks property: The list of protected managed disks. - * - * @param protectedManagedDisks the protectedManagedDisks value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails - withProtectedManagedDisks(List protectedManagedDisks) { - this.protectedManagedDisks = protectedManagedDisks; - return this; - } - - /** - * Get the allAvailableOSUpgradeConfigurations property: A value indicating all available inplace OS Upgrade - * configurations. - * - * @return the allAvailableOSUpgradeConfigurations value. - */ - public List allAvailableOSUpgradeConfigurations() { - return this.allAvailableOSUpgradeConfigurations; - } - - /** - * Set the allAvailableOSUpgradeConfigurations property: A value indicating all available inplace OS Upgrade - * configurations. - * - * @param allAvailableOSUpgradeConfigurations the allAvailableOSUpgradeConfigurations value to set. - * @return the HyperVReplicaAzureReplicationDetails object itself. - */ - public HyperVReplicaAzureReplicationDetails - withAllAvailableOSUpgradeConfigurations(List allAvailableOSUpgradeConfigurations) { - this.allAvailableOSUpgradeConfigurations = allAvailableOSUpgradeConfigurations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (azureVmDiskDetails() != null) { - azureVmDiskDetails().forEach(e -> e.validate()); - } - if (initialReplicationDetails() != null) { - initialReplicationDetails().validate(); - } - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - if (oSDetails() != null) { - oSDetails().validate(); - } - if (protectedManagedDisks() != null) { - protectedManagedDisks().forEach(e -> e.validate()); - } - if (allAvailableOSUpgradeConfigurations() != null) { - allAvailableOSUpgradeConfigurations().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("azureVmDiskDetails", this.azureVmDiskDetails, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("recoveryAzureVmName", this.recoveryAzureVmName); - jsonWriter.writeStringField("recoveryAzureVMSize", this.recoveryAzureVMSize); - jsonWriter.writeStringField("recoveryAzureStorageAccount", this.recoveryAzureStorageAccount); - jsonWriter.writeStringField("recoveryAzureLogStorageAccountId", this.recoveryAzureLogStorageAccountId); - jsonWriter.writeStringField("lastReplicatedTime", - this.lastReplicatedTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastReplicatedTime)); - jsonWriter.writeNumberField("rpoInSeconds", this.rpoInSeconds); - jsonWriter.writeStringField("lastRpoCalculatedTime", - this.lastRpoCalculatedTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastRpoCalculatedTime)); - jsonWriter.writeStringField("vmId", this.vmId); - jsonWriter.writeStringField("vmProtectionState", this.vmProtectionState); - jsonWriter.writeStringField("vmProtectionStateDescription", this.vmProtectionStateDescription); - jsonWriter.writeJsonField("initialReplicationDetails", this.initialReplicationDetails); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("selectedRecoveryAzureNetworkId", this.selectedRecoveryAzureNetworkId); - jsonWriter.writeStringField("selectedSourceNicId", this.selectedSourceNicId); - jsonWriter.writeStringField("encryption", this.encryption); - jsonWriter.writeJsonField("oSDetails", this.oSDetails); - jsonWriter.writeNumberField("sourceVmRamSizeInMB", this.sourceVmRamSizeInMB); - jsonWriter.writeNumberField("sourceVmCpuCount", this.sourceVmCpuCount); - jsonWriter.writeStringField("enableRdpOnTargetOption", this.enableRdpOnTargetOption); - jsonWriter.writeStringField("recoveryAzureResourceGroupId", this.recoveryAzureResourceGroupId); - jsonWriter.writeStringField("recoveryAvailabilitySetId", this.recoveryAvailabilitySetId); - jsonWriter.writeStringField("targetAvailabilityZone", this.targetAvailabilityZone); - jsonWriter.writeStringField("targetProximityPlacementGroupId", this.targetProximityPlacementGroupId); - jsonWriter.writeStringField("useManagedDisks", this.useManagedDisks); - jsonWriter.writeStringField("licenseType", this.licenseType); - jsonWriter.writeStringField("sqlServerLicenseType", this.sqlServerLicenseType); - jsonWriter.writeMapField("targetVmTags", this.targetVmTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("seedManagedDiskTags", this.seedManagedDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetManagedDiskTags", this.targetManagedDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetNicTags", this.targetNicTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("protectedManagedDisks", this.protectedManagedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("allAvailableOSUpgradeConfigurations", this.allAvailableOSUpgradeConfigurations, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzureReplicationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzureReplicationDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzureReplicationDetails. - */ - public static HyperVReplicaAzureReplicationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzureReplicationDetails deserializedHyperVReplicaAzureReplicationDetails - = new HyperVReplicaAzureReplicationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.instanceType = reader.getString(); - } else if ("azureVmDiskDetails".equals(fieldName)) { - List azureVmDiskDetails - = reader.readArray(reader1 -> AzureVmDiskDetails.fromJson(reader1)); - deserializedHyperVReplicaAzureReplicationDetails.azureVmDiskDetails = azureVmDiskDetails; - } else if ("recoveryAzureVmName".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.recoveryAzureVmName = reader.getString(); - } else if ("recoveryAzureVMSize".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.recoveryAzureVMSize = reader.getString(); - } else if ("recoveryAzureStorageAccount".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.recoveryAzureStorageAccount = reader.getString(); - } else if ("recoveryAzureLogStorageAccountId".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.recoveryAzureLogStorageAccountId - = reader.getString(); - } else if ("lastReplicatedTime".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.lastReplicatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("rpoInSeconds".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.rpoInSeconds - = reader.getNullable(JsonReader::getLong); - } else if ("lastRpoCalculatedTime".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.lastRpoCalculatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("vmId".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.vmId = reader.getString(); - } else if ("vmProtectionState".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.vmProtectionState = reader.getString(); - } else if ("vmProtectionStateDescription".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.vmProtectionStateDescription = reader.getString(); - } else if ("initialReplicationDetails".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.initialReplicationDetails - = InitialReplicationDetails.fromJson(reader); - } else if ("vmNics".equals(fieldName)) { - List vmNics = reader.readArray(reader1 -> VMNicDetails.fromJson(reader1)); - deserializedHyperVReplicaAzureReplicationDetails.vmNics = vmNics; - } else if ("selectedRecoveryAzureNetworkId".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.selectedRecoveryAzureNetworkId - = reader.getString(); - } else if ("selectedSourceNicId".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.selectedSourceNicId = reader.getString(); - } else if ("encryption".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.encryption = reader.getString(); - } else if ("oSDetails".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.oSDetails = OSDetails.fromJson(reader); - } else if ("sourceVmRamSizeInMB".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.sourceVmRamSizeInMB - = reader.getNullable(JsonReader::getInt); - } else if ("sourceVmCpuCount".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.sourceVmCpuCount - = reader.getNullable(JsonReader::getInt); - } else if ("enableRdpOnTargetOption".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.enableRdpOnTargetOption = reader.getString(); - } else if ("recoveryAzureResourceGroupId".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.recoveryAzureResourceGroupId = reader.getString(); - } else if ("recoveryAvailabilitySetId".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.recoveryAvailabilitySetId = reader.getString(); - } else if ("targetAvailabilityZone".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.targetAvailabilityZone = reader.getString(); - } else if ("targetProximityPlacementGroupId".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.targetProximityPlacementGroupId - = reader.getString(); - } else if ("useManagedDisks".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.useManagedDisks = reader.getString(); - } else if ("licenseType".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.licenseType = reader.getString(); - } else if ("sqlServerLicenseType".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.sqlServerLicenseType = reader.getString(); - } else if ("lastRecoveryPointReceived".equals(fieldName)) { - deserializedHyperVReplicaAzureReplicationDetails.lastRecoveryPointReceived = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("targetVmTags".equals(fieldName)) { - Map targetVmTags = reader.readMap(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureReplicationDetails.targetVmTags = targetVmTags; - } else if ("seedManagedDiskTags".equals(fieldName)) { - Map seedManagedDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureReplicationDetails.seedManagedDiskTags = seedManagedDiskTags; - } else if ("targetManagedDiskTags".equals(fieldName)) { - Map targetManagedDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureReplicationDetails.targetManagedDiskTags = targetManagedDiskTags; - } else if ("targetNicTags".equals(fieldName)) { - Map targetNicTags = reader.readMap(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureReplicationDetails.targetNicTags = targetNicTags; - } else if ("protectedManagedDisks".equals(fieldName)) { - List protectedManagedDisks - = reader.readArray(reader1 -> HyperVReplicaAzureManagedDiskDetails.fromJson(reader1)); - deserializedHyperVReplicaAzureReplicationDetails.protectedManagedDisks = protectedManagedDisks; - } else if ("allAvailableOSUpgradeConfigurations".equals(fieldName)) { - List allAvailableOSUpgradeConfigurations - = reader.readArray(reader1 -> OSUpgradeSupportedVersions.fromJson(reader1)); - deserializedHyperVReplicaAzureReplicationDetails.allAvailableOSUpgradeConfigurations - = allAvailableOSUpgradeConfigurations; - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzureReplicationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureReprotectInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureReprotectInput.java deleted file mode 100644 index b85745523032..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureReprotectInput.java +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Azure specific reprotect input. - */ -@Fluent -public final class HyperVReplicaAzureReprotectInput extends ReverseReplicationProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplicaAzure"; - - /* - * The Hyper-V host Vm Id. - */ - private String hvHostVmId; - - /* - * The Vm Name. - */ - private String vmName; - - /* - * The OS type associated with vm. - */ - private String osType; - - /* - * The OS disk VHD id associated with vm. - */ - private String vHDId; - - /* - * The storage account name. - */ - private String storageAccountId; - - /* - * The storage account to be used for logging during replication. - */ - private String logStorageAccountId; - - /** - * Creates an instance of HyperVReplicaAzureReprotectInput class. - */ - public HyperVReplicaAzureReprotectInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the hvHostVmId property: The Hyper-V host Vm Id. - * - * @return the hvHostVmId value. - */ - public String hvHostVmId() { - return this.hvHostVmId; - } - - /** - * Set the hvHostVmId property: 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 vmName property: The Vm Name. - * - * @return the vmName value. - */ - public String vmName() { - return this.vmName; - } - - /** - * Set the vmName property: 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 osType property: The OS type associated with vm. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: 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 vHDId property: The OS disk VHD id associated with vm. - * - * @return the vHDId value. - */ - public String vHDId() { - return this.vHDId; - } - - /** - * Set the vHDId property: 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 storageAccountId property: The storage account name. - * - * @return the storageAccountId value. - */ - public String storageAccountId() { - return this.storageAccountId; - } - - /** - * Set the storageAccountId property: 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 logStorageAccountId property: The storage account to be used for logging during replication. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Set the logStorageAccountId property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("hvHostVmId", this.hvHostVmId); - jsonWriter.writeStringField("vmName", this.vmName); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeStringField("vHDId", this.vHDId); - jsonWriter.writeStringField("storageAccountId", this.storageAccountId); - jsonWriter.writeStringField("logStorageAccountId", this.logStorageAccountId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzureReprotectInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzureReprotectInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzureReprotectInput. - */ - public static HyperVReplicaAzureReprotectInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzureReprotectInput deserializedHyperVReplicaAzureReprotectInput - = new HyperVReplicaAzureReprotectInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaAzureReprotectInput.instanceType = reader.getString(); - } else if ("hvHostVmId".equals(fieldName)) { - deserializedHyperVReplicaAzureReprotectInput.hvHostVmId = reader.getString(); - } else if ("vmName".equals(fieldName)) { - deserializedHyperVReplicaAzureReprotectInput.vmName = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedHyperVReplicaAzureReprotectInput.osType = reader.getString(); - } else if ("vHDId".equals(fieldName)) { - deserializedHyperVReplicaAzureReprotectInput.vHDId = reader.getString(); - } else if ("storageAccountId".equals(fieldName)) { - deserializedHyperVReplicaAzureReprotectInput.storageAccountId = reader.getString(); - } else if ("logStorageAccountId".equals(fieldName)) { - deserializedHyperVReplicaAzureReprotectInput.logStorageAccountId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzureReprotectInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureRpRecoveryPointType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureRpRecoveryPointType.java deleted file mode 100644 index 67269fda7558..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureRpRecoveryPointType.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The recovery point type. - */ -public final class HyperVReplicaAzureRpRecoveryPointType - extends ExpandableStringEnum { - /** - * Static value Latest for HyperVReplicaAzureRpRecoveryPointType. - */ - public static final HyperVReplicaAzureRpRecoveryPointType LATEST = fromString("Latest"); - - /** - * Static value LatestApplicationConsistent for HyperVReplicaAzureRpRecoveryPointType. - */ - public static final HyperVReplicaAzureRpRecoveryPointType LATEST_APPLICATION_CONSISTENT - = fromString("LatestApplicationConsistent"); - - /** - * Static value LatestProcessed for HyperVReplicaAzureRpRecoveryPointType. - */ - public static final HyperVReplicaAzureRpRecoveryPointType LATEST_PROCESSED = fromString("LatestProcessed"); - - /** - * Creates a new instance of HyperVReplicaAzureRpRecoveryPointType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public HyperVReplicaAzureRpRecoveryPointType() { - } - - /** - * Creates or finds a HyperVReplicaAzureRpRecoveryPointType from its string representation. - * - * @param name a name to look for. - * @return the corresponding HyperVReplicaAzureRpRecoveryPointType. - */ - public static HyperVReplicaAzureRpRecoveryPointType fromString(String name) { - return fromString(name, HyperVReplicaAzureRpRecoveryPointType.class); - } - - /** - * Gets known HyperVReplicaAzureRpRecoveryPointType values. - * - * @return known HyperVReplicaAzureRpRecoveryPointType values. - */ - public static Collection values() { - return values(HyperVReplicaAzureRpRecoveryPointType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureTestFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureTestFailoverInput.java deleted file mode 100644 index 4fd80b209dec..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureTestFailoverInput.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * HvrA provider specific input for test failover. - */ -@Fluent -public final class HyperVReplicaAzureTestFailoverInput extends TestFailoverProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplicaAzure"; - - /* - * Primary kek certificate pfx. - */ - private String primaryKekCertificatePfx; - - /* - * Secondary kek certificate pfx. - */ - private String secondaryKekCertificatePfx; - - /* - * The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery - * point, null should be passed. - */ - private String recoveryPointId; - - /* - * A value indicating the inplace OS Upgrade version. - */ - private String osUpgradeVersion; - - /** - * Creates an instance of HyperVReplicaAzureTestFailoverInput class. - */ - public HyperVReplicaAzureTestFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the primaryKekCertificatePfx property: Primary kek certificate pfx. - * - * @return the primaryKekCertificatePfx value. - */ - public String primaryKekCertificatePfx() { - return this.primaryKekCertificatePfx; - } - - /** - * Set the primaryKekCertificatePfx property: Primary kek certificate pfx. - * - * @param primaryKekCertificatePfx the primaryKekCertificatePfx value to set. - * @return the HyperVReplicaAzureTestFailoverInput object itself. - */ - public HyperVReplicaAzureTestFailoverInput withPrimaryKekCertificatePfx(String primaryKekCertificatePfx) { - this.primaryKekCertificatePfx = primaryKekCertificatePfx; - return this; - } - - /** - * Get the secondaryKekCertificatePfx property: Secondary kek certificate pfx. - * - * @return the secondaryKekCertificatePfx value. - */ - public String secondaryKekCertificatePfx() { - return this.secondaryKekCertificatePfx; - } - - /** - * Set the secondaryKekCertificatePfx property: Secondary kek certificate pfx. - * - * @param secondaryKekCertificatePfx the secondaryKekCertificatePfx value to set. - * @return the HyperVReplicaAzureTestFailoverInput object itself. - */ - public HyperVReplicaAzureTestFailoverInput withSecondaryKekCertificatePfx(String secondaryKekCertificatePfx) { - this.secondaryKekCertificatePfx = secondaryKekCertificatePfx; - return this; - } - - /** - * Get the recoveryPointId property: The recovery point id to be passed to test 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 recoveryPointId property: The recovery point id to be passed to test 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 HyperVReplicaAzureTestFailoverInput object itself. - */ - public HyperVReplicaAzureTestFailoverInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Get the osUpgradeVersion property: A value indicating the inplace OS Upgrade version. - * - * @return the osUpgradeVersion value. - */ - public String osUpgradeVersion() { - return this.osUpgradeVersion; - } - - /** - * Set the osUpgradeVersion property: A value indicating the inplace OS Upgrade version. - * - * @param osUpgradeVersion the osUpgradeVersion value to set. - * @return the HyperVReplicaAzureTestFailoverInput object itself. - */ - public HyperVReplicaAzureTestFailoverInput withOsUpgradeVersion(String osUpgradeVersion) { - this.osUpgradeVersion = osUpgradeVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("primaryKekCertificatePfx", this.primaryKekCertificatePfx); - jsonWriter.writeStringField("secondaryKekCertificatePfx", this.secondaryKekCertificatePfx); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - jsonWriter.writeStringField("osUpgradeVersion", this.osUpgradeVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzureTestFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzureTestFailoverInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzureTestFailoverInput. - */ - public static HyperVReplicaAzureTestFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzureTestFailoverInput deserializedHyperVReplicaAzureTestFailoverInput - = new HyperVReplicaAzureTestFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaAzureTestFailoverInput.instanceType = reader.getString(); - } else if ("primaryKekCertificatePfx".equals(fieldName)) { - deserializedHyperVReplicaAzureTestFailoverInput.primaryKekCertificatePfx = reader.getString(); - } else if ("secondaryKekCertificatePfx".equals(fieldName)) { - deserializedHyperVReplicaAzureTestFailoverInput.secondaryKekCertificatePfx = reader.getString(); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedHyperVReplicaAzureTestFailoverInput.recoveryPointId = reader.getString(); - } else if ("osUpgradeVersion".equals(fieldName)) { - deserializedHyperVReplicaAzureTestFailoverInput.osUpgradeVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzureTestFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureUnplannedFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureUnplannedFailoverInput.java deleted file mode 100644 index 2701d6c88c09..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureUnplannedFailoverInput.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * HvrA provider specific input for unplanned failover. - */ -@Fluent -public final class HyperVReplicaAzureUnplannedFailoverInput extends UnplannedFailoverProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplicaAzure"; - - /* - * Primary kek certificate pfx. - */ - private String primaryKekCertificatePfx; - - /* - * Secondary kek certificate pfx. - */ - 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. - */ - private String recoveryPointId; - - /** - * Creates an instance of HyperVReplicaAzureUnplannedFailoverInput class. - */ - public HyperVReplicaAzureUnplannedFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the primaryKekCertificatePfx property: Primary kek certificate pfx. - * - * @return the primaryKekCertificatePfx value. - */ - public String primaryKekCertificatePfx() { - return this.primaryKekCertificatePfx; - } - - /** - * Set the primaryKekCertificatePfx property: Primary kek certificate pfx. - * - * @param primaryKekCertificatePfx the primaryKekCertificatePfx value to set. - * @return the HyperVReplicaAzureUnplannedFailoverInput object itself. - */ - public HyperVReplicaAzureUnplannedFailoverInput withPrimaryKekCertificatePfx(String primaryKekCertificatePfx) { - this.primaryKekCertificatePfx = primaryKekCertificatePfx; - return this; - } - - /** - * Get the secondaryKekCertificatePfx property: Secondary kek certificate pfx. - * - * @return the secondaryKekCertificatePfx value. - */ - public String secondaryKekCertificatePfx() { - return this.secondaryKekCertificatePfx; - } - - /** - * Set the secondaryKekCertificatePfx property: Secondary kek certificate pfx. - * - * @param secondaryKekCertificatePfx the secondaryKekCertificatePfx value to set. - * @return the HyperVReplicaAzureUnplannedFailoverInput object itself. - */ - public HyperVReplicaAzureUnplannedFailoverInput withSecondaryKekCertificatePfx(String secondaryKekCertificatePfx) { - this.secondaryKekCertificatePfx = secondaryKekCertificatePfx; - return this; - } - - /** - * Get the recoveryPointId property: 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 recoveryPointId property: 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 HyperVReplicaAzureUnplannedFailoverInput object itself. - */ - public HyperVReplicaAzureUnplannedFailoverInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("primaryKekCertificatePfx", this.primaryKekCertificatePfx); - jsonWriter.writeStringField("secondaryKekCertificatePfx", this.secondaryKekCertificatePfx); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzureUnplannedFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzureUnplannedFailoverInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzureUnplannedFailoverInput. - */ - public static HyperVReplicaAzureUnplannedFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzureUnplannedFailoverInput deserializedHyperVReplicaAzureUnplannedFailoverInput - = new HyperVReplicaAzureUnplannedFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaAzureUnplannedFailoverInput.instanceType = reader.getString(); - } else if ("primaryKekCertificatePfx".equals(fieldName)) { - deserializedHyperVReplicaAzureUnplannedFailoverInput.primaryKekCertificatePfx = reader.getString(); - } else if ("secondaryKekCertificatePfx".equals(fieldName)) { - deserializedHyperVReplicaAzureUnplannedFailoverInput.secondaryKekCertificatePfx - = reader.getString(); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedHyperVReplicaAzureUnplannedFailoverInput.recoveryPointId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzureUnplannedFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.java deleted file mode 100644 index 2241e7c8107f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.java +++ /dev/null @@ -1,424 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * HyperV replica Azure input to update replication protected item. - */ -@Fluent -public final class HyperVReplicaAzureUpdateReplicationProtectedItemInput - extends UpdateReplicationProtectedItemProviderInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplicaAzure"; - - /* - * The recovery Azure resource group Id for classic deployment. - */ - private String recoveryAzureV1ResourceGroupId; - - /* - * The recovery Azure resource group Id for resource manager deployment. - */ - private String recoveryAzureV2ResourceGroupId; - - /* - * A value indicating whether managed disks should be used during failover. - */ - private String useManagedDisks; - - /* - * The dictionary of disk resource Id to disk encryption set ARM Id. - */ - private Map diskIdToDiskEncryptionMap; - - /* - * The target proximity placement group Id. - */ - private String targetProximityPlacementGroupId; - - /* - * The target availability zone. - */ - private String targetAvailabilityZone; - - /* - * The target VM tags. - */ - private Map targetVmTags; - - /* - * The tags for the target managed disks. - */ - private Map targetManagedDiskTags; - - /* - * The tags for the target NICs. - */ - private Map targetNicTags; - - /* - * The SQL Server license type. - */ - private SqlServerLicenseType sqlServerLicenseType; - - /* - * The list of disk update properties. - */ - private List vmDisks; - - /** - * Creates an instance of HyperVReplicaAzureUpdateReplicationProtectedItemInput class. - */ - public HyperVReplicaAzureUpdateReplicationProtectedItemInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryAzureV1ResourceGroupId property: The recovery Azure resource group Id for classic deployment. - * - * @return the recoveryAzureV1ResourceGroupId value. - */ - public String recoveryAzureV1ResourceGroupId() { - return this.recoveryAzureV1ResourceGroupId; - } - - /** - * Set the recoveryAzureV1ResourceGroupId property: 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 recoveryAzureV2ResourceGroupId property: The recovery Azure resource group Id for resource manager - * deployment. - * - * @return the recoveryAzureV2ResourceGroupId value. - */ - public String recoveryAzureV2ResourceGroupId() { - return this.recoveryAzureV2ResourceGroupId; - } - - /** - * Set the recoveryAzureV2ResourceGroupId property: 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 the useManagedDisks property: A value indicating whether managed disks should be used during failover. - * - * @return the useManagedDisks value. - */ - public String useManagedDisks() { - return this.useManagedDisks; - } - - /** - * Set the useManagedDisks property: 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; - } - - /** - * Get the diskIdToDiskEncryptionMap property: The dictionary of disk resource Id to disk encryption set ARM Id. - * - * @return the diskIdToDiskEncryptionMap value. - */ - public Map diskIdToDiskEncryptionMap() { - return this.diskIdToDiskEncryptionMap; - } - - /** - * Set the diskIdToDiskEncryptionMap property: The dictionary of disk resource Id to disk encryption set ARM Id. - * - * @param diskIdToDiskEncryptionMap the diskIdToDiskEncryptionMap value to set. - * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself. - */ - public HyperVReplicaAzureUpdateReplicationProtectedItemInput - withDiskIdToDiskEncryptionMap(Map diskIdToDiskEncryptionMap) { - this.diskIdToDiskEncryptionMap = diskIdToDiskEncryptionMap; - return this; - } - - /** - * Get the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @return the targetProximityPlacementGroupId value. - */ - public String targetProximityPlacementGroupId() { - return this.targetProximityPlacementGroupId; - } - - /** - * Set the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set. - * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself. - */ - public HyperVReplicaAzureUpdateReplicationProtectedItemInput - withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) { - this.targetProximityPlacementGroupId = targetProximityPlacementGroupId; - return this; - } - - /** - * Get the targetAvailabilityZone property: The target availability zone. - * - * @return the targetAvailabilityZone value. - */ - public String targetAvailabilityZone() { - return this.targetAvailabilityZone; - } - - /** - * Set the targetAvailabilityZone property: The target availability zone. - * - * @param targetAvailabilityZone the targetAvailabilityZone value to set. - * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself. - */ - public HyperVReplicaAzureUpdateReplicationProtectedItemInput - withTargetAvailabilityZone(String targetAvailabilityZone) { - this.targetAvailabilityZone = targetAvailabilityZone; - return this; - } - - /** - * Get the targetVmTags property: The target VM tags. - * - * @return the targetVmTags value. - */ - public Map targetVmTags() { - return this.targetVmTags; - } - - /** - * Set the targetVmTags property: The target VM tags. - * - * @param targetVmTags the targetVmTags value to set. - * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself. - */ - public HyperVReplicaAzureUpdateReplicationProtectedItemInput withTargetVmTags(Map targetVmTags) { - this.targetVmTags = targetVmTags; - return this; - } - - /** - * Get the targetManagedDiskTags property: The tags for the target managed disks. - * - * @return the targetManagedDiskTags value. - */ - public Map targetManagedDiskTags() { - return this.targetManagedDiskTags; - } - - /** - * Set the targetManagedDiskTags property: The tags for the target managed disks. - * - * @param targetManagedDiskTags the targetManagedDiskTags value to set. - * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself. - */ - public HyperVReplicaAzureUpdateReplicationProtectedItemInput - withTargetManagedDiskTags(Map targetManagedDiskTags) { - this.targetManagedDiskTags = targetManagedDiskTags; - return this; - } - - /** - * Get the targetNicTags property: The tags for the target NICs. - * - * @return the targetNicTags value. - */ - public Map targetNicTags() { - return this.targetNicTags; - } - - /** - * Set the targetNicTags property: The tags for the target NICs. - * - * @param targetNicTags the targetNicTags value to set. - * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself. - */ - public HyperVReplicaAzureUpdateReplicationProtectedItemInput withTargetNicTags(Map targetNicTags) { - this.targetNicTags = targetNicTags; - return this; - } - - /** - * Get the sqlServerLicenseType property: The SQL Server license type. - * - * @return the sqlServerLicenseType value. - */ - public SqlServerLicenseType sqlServerLicenseType() { - return this.sqlServerLicenseType; - } - - /** - * Set the sqlServerLicenseType property: The SQL Server license type. - * - * @param sqlServerLicenseType the sqlServerLicenseType value to set. - * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself. - */ - public HyperVReplicaAzureUpdateReplicationProtectedItemInput - withSqlServerLicenseType(SqlServerLicenseType sqlServerLicenseType) { - this.sqlServerLicenseType = sqlServerLicenseType; - return this; - } - - /** - * Get the vmDisks property: The list of disk update properties. - * - * @return the vmDisks value. - */ - public List vmDisks() { - return this.vmDisks; - } - - /** - * Set the vmDisks property: The list of disk update properties. - * - * @param vmDisks the vmDisks value to set. - * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself. - */ - public HyperVReplicaAzureUpdateReplicationProtectedItemInput withVmDisks(List vmDisks) { - this.vmDisks = vmDisks; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmDisks() != null) { - vmDisks().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryAzureV1ResourceGroupId", this.recoveryAzureV1ResourceGroupId); - jsonWriter.writeStringField("recoveryAzureV2ResourceGroupId", this.recoveryAzureV2ResourceGroupId); - jsonWriter.writeStringField("useManagedDisks", this.useManagedDisks); - jsonWriter.writeMapField("diskIdToDiskEncryptionMap", this.diskIdToDiskEncryptionMap, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("targetProximityPlacementGroupId", this.targetProximityPlacementGroupId); - jsonWriter.writeStringField("targetAvailabilityZone", this.targetAvailabilityZone); - jsonWriter.writeMapField("targetVmTags", this.targetVmTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetManagedDiskTags", this.targetManagedDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetNicTags", this.targetNicTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("sqlServerLicenseType", - this.sqlServerLicenseType == null ? null : this.sqlServerLicenseType.toString()); - jsonWriter.writeArrayField("vmDisks", this.vmDisks, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaAzureUpdateReplicationProtectedItemInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaAzureUpdateReplicationProtectedItemInput if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaAzureUpdateReplicationProtectedItemInput. - */ - public static HyperVReplicaAzureUpdateReplicationProtectedItemInput fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaAzureUpdateReplicationProtectedItemInput deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput - = new HyperVReplicaAzureUpdateReplicationProtectedItemInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput.instanceType = reader.getString(); - } else if ("recoveryAzureV1ResourceGroupId".equals(fieldName)) { - deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput.recoveryAzureV1ResourceGroupId - = reader.getString(); - } else if ("recoveryAzureV2ResourceGroupId".equals(fieldName)) { - deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput.recoveryAzureV2ResourceGroupId - = reader.getString(); - } else if ("useManagedDisks".equals(fieldName)) { - deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput.useManagedDisks - = reader.getString(); - } else if ("diskIdToDiskEncryptionMap".equals(fieldName)) { - Map diskIdToDiskEncryptionMap = reader.readMap(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput.diskIdToDiskEncryptionMap - = diskIdToDiskEncryptionMap; - } else if ("targetProximityPlacementGroupId".equals(fieldName)) { - deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput.targetProximityPlacementGroupId - = reader.getString(); - } else if ("targetAvailabilityZone".equals(fieldName)) { - deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput.targetAvailabilityZone - = reader.getString(); - } else if ("targetVmTags".equals(fieldName)) { - Map targetVmTags = reader.readMap(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput.targetVmTags = targetVmTags; - } else if ("targetManagedDiskTags".equals(fieldName)) { - Map targetManagedDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput.targetManagedDiskTags - = targetManagedDiskTags; - } else if ("targetNicTags".equals(fieldName)) { - Map targetNicTags = reader.readMap(reader1 -> reader1.getString()); - deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput.targetNicTags = targetNicTags; - } else if ("sqlServerLicenseType".equals(fieldName)) { - deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput.sqlServerLicenseType - = SqlServerLicenseType.fromString(reader.getString()); - } else if ("vmDisks".equals(fieldName)) { - List vmDisks = reader.readArray(reader1 -> UpdateDiskInput.fromJson(reader1)); - deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput.vmDisks = vmDisks; - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaAzureUpdateReplicationProtectedItemInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBaseEventDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBaseEventDetails.java deleted file mode 100644 index f183feff9bc3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBaseEventDetails.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Abstract model class for event details of a HyperVReplica E2E event. - */ -@Fluent -public final class HyperVReplicaBaseEventDetails extends EventProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "HyperVReplicaBaseEventDetails"; - - /* - * The container friendly name. - */ - private String containerName; - - /* - * The fabric friendly name. - */ - private String fabricName; - - /* - * The remote container name. - */ - private String remoteContainerName; - - /* - * The remote fabric name. - */ - private String remoteFabricName; - - /** - * Creates an instance of HyperVReplicaBaseEventDetails class. - */ - public HyperVReplicaBaseEventDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the containerName property: The container friendly name. - * - * @return the containerName value. - */ - public String containerName() { - return this.containerName; - } - - /** - * Set the containerName property: 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 fabricName property: The fabric friendly name. - * - * @return the fabricName value. - */ - public String fabricName() { - return this.fabricName; - } - - /** - * Set the fabricName property: 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 remoteContainerName property: The remote container name. - * - * @return the remoteContainerName value. - */ - public String remoteContainerName() { - return this.remoteContainerName; - } - - /** - * Set the remoteContainerName property: 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 remoteFabricName property: The remote fabric name. - * - * @return the remoteFabricName value. - */ - public String remoteFabricName() { - return this.remoteFabricName; - } - - /** - * Set the remoteFabricName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("containerName", this.containerName); - jsonWriter.writeStringField("fabricName", this.fabricName); - jsonWriter.writeStringField("remoteContainerName", this.remoteContainerName); - jsonWriter.writeStringField("remoteFabricName", this.remoteFabricName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaBaseEventDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaBaseEventDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaBaseEventDetails. - */ - public static HyperVReplicaBaseEventDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaBaseEventDetails deserializedHyperVReplicaBaseEventDetails - = new HyperVReplicaBaseEventDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaBaseEventDetails.instanceType = reader.getString(); - } else if ("containerName".equals(fieldName)) { - deserializedHyperVReplicaBaseEventDetails.containerName = reader.getString(); - } else if ("fabricName".equals(fieldName)) { - deserializedHyperVReplicaBaseEventDetails.fabricName = reader.getString(); - } else if ("remoteContainerName".equals(fieldName)) { - deserializedHyperVReplicaBaseEventDetails.remoteContainerName = reader.getString(); - } else if ("remoteFabricName".equals(fieldName)) { - deserializedHyperVReplicaBaseEventDetails.remoteFabricName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaBaseEventDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBasePolicyDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBasePolicyDetails.java deleted file mode 100644 index cf7947869670..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBasePolicyDetails.java +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for HyperVReplica policy details. - */ -@Fluent -public final class HyperVReplicaBasePolicyDetails extends PolicyProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "HyperVReplicaBasePolicyDetails"; - - /* - * A value indicating the number of recovery points. - */ - private Integer recoveryPoints; - - /* - * A value indicating the application consistent frequency. - */ - private Integer applicationConsistentSnapshotFrequencyInHours; - - /* - * A value indicating whether compression has to be enabled. - */ - private String compression; - - /* - * A value indicating whether IR is online. - */ - private String initialReplicationMethod; - - /* - * A value indicating the online IR start time. - */ - private String onlineReplicationStartTime; - - /* - * A value indicating the offline IR import path. - */ - private String offlineReplicationImportPath; - - /* - * A value indicating the offline IR export path. - */ - private String offlineReplicationExportPath; - - /* - * A value indicating the recovery HTTPS port. - */ - private Integer replicationPort; - - /* - * A value indicating the authentication type. - */ - private Integer allowedAuthenticationType; - - /* - * A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud. - */ - private String replicaDeletionOption; - - /** - * Creates an instance of HyperVReplicaBasePolicyDetails class. - */ - public HyperVReplicaBasePolicyDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPoints property: A value indicating the number of recovery points. - * - * @return the recoveryPoints value. - */ - public Integer recoveryPoints() { - return this.recoveryPoints; - } - - /** - * Set the recoveryPoints property: 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 the applicationConsistentSnapshotFrequencyInHours property: A value indicating the application consistent - * frequency. - * - * @return the applicationConsistentSnapshotFrequencyInHours value. - */ - public Integer applicationConsistentSnapshotFrequencyInHours() { - return this.applicationConsistentSnapshotFrequencyInHours; - } - - /** - * Set the applicationConsistentSnapshotFrequencyInHours property: 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 the compression property: A value indicating whether compression has to be enabled. - * - * @return the compression value. - */ - public String compression() { - return this.compression; - } - - /** - * Set the compression property: 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 the initialReplicationMethod property: A value indicating whether IR is online. - * - * @return the initialReplicationMethod value. - */ - public String initialReplicationMethod() { - return this.initialReplicationMethod; - } - - /** - * Set the initialReplicationMethod property: 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 the onlineReplicationStartTime property: A value indicating the online IR start time. - * - * @return the onlineReplicationStartTime value. - */ - public String onlineReplicationStartTime() { - return this.onlineReplicationStartTime; - } - - /** - * Set the onlineReplicationStartTime property: 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 the offlineReplicationImportPath property: A value indicating the offline IR import path. - * - * @return the offlineReplicationImportPath value. - */ - public String offlineReplicationImportPath() { - return this.offlineReplicationImportPath; - } - - /** - * Set the offlineReplicationImportPath property: 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 the offlineReplicationExportPath property: A value indicating the offline IR export path. - * - * @return the offlineReplicationExportPath value. - */ - public String offlineReplicationExportPath() { - return this.offlineReplicationExportPath; - } - - /** - * Set the offlineReplicationExportPath property: 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 the replicationPort property: A value indicating the recovery HTTPS port. - * - * @return the replicationPort value. - */ - public Integer replicationPort() { - return this.replicationPort; - } - - /** - * Set the replicationPort property: 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 the allowedAuthenticationType property: A value indicating the authentication type. - * - * @return the allowedAuthenticationType value. - */ - public Integer allowedAuthenticationType() { - return this.allowedAuthenticationType; - } - - /** - * Set the allowedAuthenticationType property: 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 the replicaDeletionOption property: 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 the replicaDeletionOption property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPoints", this.recoveryPoints); - jsonWriter.writeNumberField("applicationConsistentSnapshotFrequencyInHours", - this.applicationConsistentSnapshotFrequencyInHours); - jsonWriter.writeStringField("compression", this.compression); - jsonWriter.writeStringField("initialReplicationMethod", this.initialReplicationMethod); - jsonWriter.writeStringField("onlineReplicationStartTime", this.onlineReplicationStartTime); - jsonWriter.writeStringField("offlineReplicationImportPath", this.offlineReplicationImportPath); - jsonWriter.writeStringField("offlineReplicationExportPath", this.offlineReplicationExportPath); - jsonWriter.writeNumberField("replicationPort", this.replicationPort); - jsonWriter.writeNumberField("allowedAuthenticationType", this.allowedAuthenticationType); - jsonWriter.writeStringField("replicaDeletionOption", this.replicaDeletionOption); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaBasePolicyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaBasePolicyDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaBasePolicyDetails. - */ - public static HyperVReplicaBasePolicyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaBasePolicyDetails deserializedHyperVReplicaBasePolicyDetails - = new HyperVReplicaBasePolicyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaBasePolicyDetails.instanceType = reader.getString(); - } else if ("recoveryPoints".equals(fieldName)) { - deserializedHyperVReplicaBasePolicyDetails.recoveryPoints = reader.getNullable(JsonReader::getInt); - } else if ("applicationConsistentSnapshotFrequencyInHours".equals(fieldName)) { - deserializedHyperVReplicaBasePolicyDetails.applicationConsistentSnapshotFrequencyInHours - = reader.getNullable(JsonReader::getInt); - } else if ("compression".equals(fieldName)) { - deserializedHyperVReplicaBasePolicyDetails.compression = reader.getString(); - } else if ("initialReplicationMethod".equals(fieldName)) { - deserializedHyperVReplicaBasePolicyDetails.initialReplicationMethod = reader.getString(); - } else if ("onlineReplicationStartTime".equals(fieldName)) { - deserializedHyperVReplicaBasePolicyDetails.onlineReplicationStartTime = reader.getString(); - } else if ("offlineReplicationImportPath".equals(fieldName)) { - deserializedHyperVReplicaBasePolicyDetails.offlineReplicationImportPath = reader.getString(); - } else if ("offlineReplicationExportPath".equals(fieldName)) { - deserializedHyperVReplicaBasePolicyDetails.offlineReplicationExportPath = reader.getString(); - } else if ("replicationPort".equals(fieldName)) { - deserializedHyperVReplicaBasePolicyDetails.replicationPort = reader.getNullable(JsonReader::getInt); - } else if ("allowedAuthenticationType".equals(fieldName)) { - deserializedHyperVReplicaBasePolicyDetails.allowedAuthenticationType - = reader.getNullable(JsonReader::getInt); - } else if ("replicaDeletionOption".equals(fieldName)) { - deserializedHyperVReplicaBasePolicyDetails.replicaDeletionOption = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaBasePolicyDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBaseReplicationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBaseReplicationDetails.java deleted file mode 100644 index 890634deccda..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBaseReplicationDetails.java +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * Hyper V replica provider specific settings base class. - */ -@Fluent -public final class HyperVReplicaBaseReplicationDetails extends ReplicationProviderSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "HyperVReplicaBaseReplicationDetails"; - - /* - * The Last replication time. - */ - private OffsetDateTime lastReplicatedTime; - - /* - * The PE Network details. - */ - private List vmNics; - - /* - * The virtual machine Id. - */ - private String vmId; - - /* - * The protection state for the vm. - */ - private String vmProtectionState; - - /* - * The protection state description for the vm. - */ - private String vmProtectionStateDescription; - - /* - * Initial replication details. - */ - private InitialReplicationDetails initialReplicationDetails; - - /* - * VM disk details. - */ - private List vMDiskDetails; - - /** - * Creates an instance of HyperVReplicaBaseReplicationDetails class. - */ - public HyperVReplicaBaseReplicationDetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the lastReplicatedTime property: The Last replication time. - * - * @return the lastReplicatedTime value. - */ - public OffsetDateTime lastReplicatedTime() { - return this.lastReplicatedTime; - } - - /** - * Set the lastReplicatedTime property: The Last replication time. - * - * @param lastReplicatedTime the lastReplicatedTime value to set. - * @return the HyperVReplicaBaseReplicationDetails object itself. - */ - public HyperVReplicaBaseReplicationDetails withLastReplicatedTime(OffsetDateTime lastReplicatedTime) { - this.lastReplicatedTime = lastReplicatedTime; - return this; - } - - /** - * Get the vmNics property: The PE Network details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: 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 vmId property: The virtual machine Id. - * - * @return the vmId value. - */ - public String vmId() { - return this.vmId; - } - - /** - * Set the vmId property: 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 vmProtectionState property: The protection state for the vm. - * - * @return the vmProtectionState value. - */ - public String vmProtectionState() { - return this.vmProtectionState; - } - - /** - * Set the vmProtectionState property: 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 vmProtectionStateDescription property: The protection state description for the vm. - * - * @return the vmProtectionStateDescription value. - */ - public String vmProtectionStateDescription() { - return this.vmProtectionStateDescription; - } - - /** - * Set the vmProtectionStateDescription property: 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 the initialReplicationDetails property: Initial replication details. - * - * @return the initialReplicationDetails value. - */ - public InitialReplicationDetails initialReplicationDetails() { - return this.initialReplicationDetails; - } - - /** - * Set the initialReplicationDetails property: 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 the vMDiskDetails property: VM disk details. - * - * @return the vMDiskDetails value. - */ - public List vMDiskDetails() { - return this.vMDiskDetails; - } - - /** - * Set the vMDiskDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - if (initialReplicationDetails() != null) { - initialReplicationDetails().validate(); - } - if (vMDiskDetails() != null) { - vMDiskDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("lastReplicatedTime", - this.lastReplicatedTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastReplicatedTime)); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("vmId", this.vmId); - jsonWriter.writeStringField("vmProtectionState", this.vmProtectionState); - jsonWriter.writeStringField("vmProtectionStateDescription", this.vmProtectionStateDescription); - jsonWriter.writeJsonField("initialReplicationDetails", this.initialReplicationDetails); - jsonWriter.writeArrayField("vMDiskDetails", this.vMDiskDetails, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaBaseReplicationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaBaseReplicationDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaBaseReplicationDetails. - */ - public static HyperVReplicaBaseReplicationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaBaseReplicationDetails deserializedHyperVReplicaBaseReplicationDetails - = new HyperVReplicaBaseReplicationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaBaseReplicationDetails.instanceType = reader.getString(); - } else if ("lastReplicatedTime".equals(fieldName)) { - deserializedHyperVReplicaBaseReplicationDetails.lastReplicatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("vmNics".equals(fieldName)) { - List vmNics = reader.readArray(reader1 -> VMNicDetails.fromJson(reader1)); - deserializedHyperVReplicaBaseReplicationDetails.vmNics = vmNics; - } else if ("vmId".equals(fieldName)) { - deserializedHyperVReplicaBaseReplicationDetails.vmId = reader.getString(); - } else if ("vmProtectionState".equals(fieldName)) { - deserializedHyperVReplicaBaseReplicationDetails.vmProtectionState = reader.getString(); - } else if ("vmProtectionStateDescription".equals(fieldName)) { - deserializedHyperVReplicaBaseReplicationDetails.vmProtectionStateDescription = reader.getString(); - } else if ("initialReplicationDetails".equals(fieldName)) { - deserializedHyperVReplicaBaseReplicationDetails.initialReplicationDetails - = InitialReplicationDetails.fromJson(reader); - } else if ("vMDiskDetails".equals(fieldName)) { - List vMDiskDetails = reader.readArray(reader1 -> DiskDetails.fromJson(reader1)); - deserializedHyperVReplicaBaseReplicationDetails.vMDiskDetails = vMDiskDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaBaseReplicationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBluePolicyDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBluePolicyDetails.java deleted file mode 100644 index e15b10721bae..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBluePolicyDetails.java +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Hyper-V Replica Blue specific protection profile details. - */ -@Fluent -public final class HyperVReplicaBluePolicyDetails extends PolicyProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "HyperVReplica2012R2"; - - /* - * A value indicating the replication interval. - */ - private Integer replicationFrequencyInSeconds; - - /* - * A value indicating the number of recovery points. - */ - private Integer recoveryPoints; - - /* - * A value indicating the application consistent frequency. - */ - private Integer applicationConsistentSnapshotFrequencyInHours; - - /* - * A value indicating whether compression has to be enabled. - */ - private String compression; - - /* - * A value indicating whether IR is online. - */ - private String initialReplicationMethod; - - /* - * A value indicating the online IR start time. - */ - private String onlineReplicationStartTime; - - /* - * A value indicating the offline IR import path. - */ - private String offlineReplicationImportPath; - - /* - * A value indicating the offline IR export path. - */ - private String offlineReplicationExportPath; - - /* - * A value indicating the recovery HTTPS port. - */ - private Integer replicationPort; - - /* - * A value indicating the authentication type. - */ - private Integer allowedAuthenticationType; - - /* - * A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud - */ - private String replicaDeletionOption; - - /** - * Creates an instance of HyperVReplicaBluePolicyDetails class. - */ - public HyperVReplicaBluePolicyDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the replicationFrequencyInSeconds property: A value indicating the replication interval. - * - * @return the replicationFrequencyInSeconds value. - */ - public Integer replicationFrequencyInSeconds() { - return this.replicationFrequencyInSeconds; - } - - /** - * Set the replicationFrequencyInSeconds property: 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 the recoveryPoints property: A value indicating the number of recovery points. - * - * @return the recoveryPoints value. - */ - public Integer recoveryPoints() { - return this.recoveryPoints; - } - - /** - * Set the recoveryPoints property: 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 the applicationConsistentSnapshotFrequencyInHours property: A value indicating the application consistent - * frequency. - * - * @return the applicationConsistentSnapshotFrequencyInHours value. - */ - public Integer applicationConsistentSnapshotFrequencyInHours() { - return this.applicationConsistentSnapshotFrequencyInHours; - } - - /** - * Set the applicationConsistentSnapshotFrequencyInHours property: 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 the compression property: A value indicating whether compression has to be enabled. - * - * @return the compression value. - */ - public String compression() { - return this.compression; - } - - /** - * Set the compression property: 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 the initialReplicationMethod property: A value indicating whether IR is online. - * - * @return the initialReplicationMethod value. - */ - public String initialReplicationMethod() { - return this.initialReplicationMethod; - } - - /** - * Set the initialReplicationMethod property: 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 the onlineReplicationStartTime property: A value indicating the online IR start time. - * - * @return the onlineReplicationStartTime value. - */ - public String onlineReplicationStartTime() { - return this.onlineReplicationStartTime; - } - - /** - * Set the onlineReplicationStartTime property: 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 the offlineReplicationImportPath property: A value indicating the offline IR import path. - * - * @return the offlineReplicationImportPath value. - */ - public String offlineReplicationImportPath() { - return this.offlineReplicationImportPath; - } - - /** - * Set the offlineReplicationImportPath property: 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 the offlineReplicationExportPath property: A value indicating the offline IR export path. - * - * @return the offlineReplicationExportPath value. - */ - public String offlineReplicationExportPath() { - return this.offlineReplicationExportPath; - } - - /** - * Set the offlineReplicationExportPath property: 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 the replicationPort property: A value indicating the recovery HTTPS port. - * - * @return the replicationPort value. - */ - public Integer replicationPort() { - return this.replicationPort; - } - - /** - * Set the replicationPort property: 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 the allowedAuthenticationType property: A value indicating the authentication type. - * - * @return the allowedAuthenticationType value. - */ - public Integer allowedAuthenticationType() { - return this.allowedAuthenticationType; - } - - /** - * Set the allowedAuthenticationType property: 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 the replicaDeletionOption property: 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 the replicaDeletionOption property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("replicationFrequencyInSeconds", this.replicationFrequencyInSeconds); - jsonWriter.writeNumberField("recoveryPoints", this.recoveryPoints); - jsonWriter.writeNumberField("applicationConsistentSnapshotFrequencyInHours", - this.applicationConsistentSnapshotFrequencyInHours); - jsonWriter.writeStringField("compression", this.compression); - jsonWriter.writeStringField("initialReplicationMethod", this.initialReplicationMethod); - jsonWriter.writeStringField("onlineReplicationStartTime", this.onlineReplicationStartTime); - jsonWriter.writeStringField("offlineReplicationImportPath", this.offlineReplicationImportPath); - jsonWriter.writeStringField("offlineReplicationExportPath", this.offlineReplicationExportPath); - jsonWriter.writeNumberField("replicationPort", this.replicationPort); - jsonWriter.writeNumberField("allowedAuthenticationType", this.allowedAuthenticationType); - jsonWriter.writeStringField("replicaDeletionOption", this.replicaDeletionOption); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaBluePolicyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaBluePolicyDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaBluePolicyDetails. - */ - public static HyperVReplicaBluePolicyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaBluePolicyDetails deserializedHyperVReplicaBluePolicyDetails - = new HyperVReplicaBluePolicyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyDetails.instanceType = reader.getString(); - } else if ("replicationFrequencyInSeconds".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyDetails.replicationFrequencyInSeconds - = reader.getNullable(JsonReader::getInt); - } else if ("recoveryPoints".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyDetails.recoveryPoints = reader.getNullable(JsonReader::getInt); - } else if ("applicationConsistentSnapshotFrequencyInHours".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyDetails.applicationConsistentSnapshotFrequencyInHours - = reader.getNullable(JsonReader::getInt); - } else if ("compression".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyDetails.compression = reader.getString(); - } else if ("initialReplicationMethod".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyDetails.initialReplicationMethod = reader.getString(); - } else if ("onlineReplicationStartTime".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyDetails.onlineReplicationStartTime = reader.getString(); - } else if ("offlineReplicationImportPath".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyDetails.offlineReplicationImportPath = reader.getString(); - } else if ("offlineReplicationExportPath".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyDetails.offlineReplicationExportPath = reader.getString(); - } else if ("replicationPort".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyDetails.replicationPort = reader.getNullable(JsonReader::getInt); - } else if ("allowedAuthenticationType".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyDetails.allowedAuthenticationType - = reader.getNullable(JsonReader::getInt); - } else if ("replicaDeletionOption".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyDetails.replicaDeletionOption = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaBluePolicyDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBluePolicyInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBluePolicyInput.java deleted file mode 100644 index a1f489d9e121..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBluePolicyInput.java +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * HyperV Replica Blue policy input. - */ -@Fluent -public final class HyperVReplicaBluePolicyInput extends HyperVReplicaPolicyInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplica2012R2"; - - /* - * A value indicating the replication interval. - */ - private Integer replicationFrequencyInSeconds; - - /** - * Creates an instance of HyperVReplicaBluePolicyInput class. - */ - public HyperVReplicaBluePolicyInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the replicationFrequencyInSeconds property: A value indicating the replication interval. - * - * @return the replicationFrequencyInSeconds value. - */ - public Integer replicationFrequencyInSeconds() { - return this.replicationFrequencyInSeconds; - } - - /** - * Set the replicationFrequencyInSeconds property: 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; - } - - /** - * {@inheritDoc} - */ - @Override - public HyperVReplicaBluePolicyInput withRecoveryPoints(Integer recoveryPoints) { - super.withRecoveryPoints(recoveryPoints); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HyperVReplicaBluePolicyInput - withApplicationConsistentSnapshotFrequencyInHours(Integer applicationConsistentSnapshotFrequencyInHours) { - super.withApplicationConsistentSnapshotFrequencyInHours(applicationConsistentSnapshotFrequencyInHours); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HyperVReplicaBluePolicyInput withCompression(String compression) { - super.withCompression(compression); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HyperVReplicaBluePolicyInput withInitialReplicationMethod(String initialReplicationMethod) { - super.withInitialReplicationMethod(initialReplicationMethod); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HyperVReplicaBluePolicyInput withOnlineReplicationStartTime(String onlineReplicationStartTime) { - super.withOnlineReplicationStartTime(onlineReplicationStartTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HyperVReplicaBluePolicyInput withOfflineReplicationImportPath(String offlineReplicationImportPath) { - super.withOfflineReplicationImportPath(offlineReplicationImportPath); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HyperVReplicaBluePolicyInput withOfflineReplicationExportPath(String offlineReplicationExportPath) { - super.withOfflineReplicationExportPath(offlineReplicationExportPath); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HyperVReplicaBluePolicyInput withReplicationPort(Integer replicationPort) { - super.withReplicationPort(replicationPort); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HyperVReplicaBluePolicyInput withAllowedAuthenticationType(Integer allowedAuthenticationType) { - super.withAllowedAuthenticationType(allowedAuthenticationType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HyperVReplicaBluePolicyInput withReplicaDeletion(String replicaDeletion) { - super.withReplicaDeletion(replicaDeletion); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("recoveryPoints", recoveryPoints()); - jsonWriter.writeNumberField("applicationConsistentSnapshotFrequencyInHours", - applicationConsistentSnapshotFrequencyInHours()); - jsonWriter.writeStringField("compression", compression()); - jsonWriter.writeStringField("initialReplicationMethod", initialReplicationMethod()); - jsonWriter.writeStringField("onlineReplicationStartTime", onlineReplicationStartTime()); - jsonWriter.writeStringField("offlineReplicationImportPath", offlineReplicationImportPath()); - jsonWriter.writeStringField("offlineReplicationExportPath", offlineReplicationExportPath()); - jsonWriter.writeNumberField("replicationPort", replicationPort()); - jsonWriter.writeNumberField("allowedAuthenticationType", allowedAuthenticationType()); - jsonWriter.writeStringField("replicaDeletion", replicaDeletion()); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("replicationFrequencyInSeconds", this.replicationFrequencyInSeconds); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaBluePolicyInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaBluePolicyInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaBluePolicyInput. - */ - public static HyperVReplicaBluePolicyInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaBluePolicyInput deserializedHyperVReplicaBluePolicyInput = new HyperVReplicaBluePolicyInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryPoints".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyInput.withRecoveryPoints(reader.getNullable(JsonReader::getInt)); - } else if ("applicationConsistentSnapshotFrequencyInHours".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyInput - .withApplicationConsistentSnapshotFrequencyInHours(reader.getNullable(JsonReader::getInt)); - } else if ("compression".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyInput.withCompression(reader.getString()); - } else if ("initialReplicationMethod".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyInput.withInitialReplicationMethod(reader.getString()); - } else if ("onlineReplicationStartTime".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyInput.withOnlineReplicationStartTime(reader.getString()); - } else if ("offlineReplicationImportPath".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyInput.withOfflineReplicationImportPath(reader.getString()); - } else if ("offlineReplicationExportPath".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyInput.withOfflineReplicationExportPath(reader.getString()); - } else if ("replicationPort".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyInput - .withReplicationPort(reader.getNullable(JsonReader::getInt)); - } else if ("allowedAuthenticationType".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyInput - .withAllowedAuthenticationType(reader.getNullable(JsonReader::getInt)); - } else if ("replicaDeletion".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyInput.withReplicaDeletion(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyInput.instanceType = reader.getString(); - } else if ("replicationFrequencyInSeconds".equals(fieldName)) { - deserializedHyperVReplicaBluePolicyInput.replicationFrequencyInSeconds - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaBluePolicyInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBlueReplicationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBlueReplicationDetails.java deleted file mode 100644 index 42c6ddc2c2fc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaBlueReplicationDetails.java +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * HyperV replica 2012 R2 (Blue) replication details. - */ -@Fluent -public final class HyperVReplicaBlueReplicationDetails extends ReplicationProviderSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "HyperVReplica2012R2"; - - /* - * The Last replication time. - */ - private OffsetDateTime lastReplicatedTime; - - /* - * The PE Network details. - */ - private List vmNics; - - /* - * The virtual machine Id. - */ - private String vmId; - - /* - * The protection state for the vm. - */ - private String vmProtectionState; - - /* - * The protection state description for the vm. - */ - private String vmProtectionStateDescription; - - /* - * Initial replication details. - */ - private InitialReplicationDetails initialReplicationDetails; - - /* - * VM disk details. - */ - private List vMDiskDetails; - - /** - * Creates an instance of HyperVReplicaBlueReplicationDetails class. - */ - public HyperVReplicaBlueReplicationDetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the lastReplicatedTime property: The Last replication time. - * - * @return the lastReplicatedTime value. - */ - public OffsetDateTime lastReplicatedTime() { - return this.lastReplicatedTime; - } - - /** - * Set the lastReplicatedTime property: The Last replication time. - * - * @param lastReplicatedTime the lastReplicatedTime value to set. - * @return the HyperVReplicaBlueReplicationDetails object itself. - */ - public HyperVReplicaBlueReplicationDetails withLastReplicatedTime(OffsetDateTime lastReplicatedTime) { - this.lastReplicatedTime = lastReplicatedTime; - return this; - } - - /** - * Get the vmNics property: The PE Network details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: 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 vmId property: The virtual machine Id. - * - * @return the vmId value. - */ - public String vmId() { - return this.vmId; - } - - /** - * Set the vmId property: 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 vmProtectionState property: The protection state for the vm. - * - * @return the vmProtectionState value. - */ - public String vmProtectionState() { - return this.vmProtectionState; - } - - /** - * Set the vmProtectionState property: 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 vmProtectionStateDescription property: The protection state description for the vm. - * - * @return the vmProtectionStateDescription value. - */ - public String vmProtectionStateDescription() { - return this.vmProtectionStateDescription; - } - - /** - * Set the vmProtectionStateDescription property: 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 the initialReplicationDetails property: Initial replication details. - * - * @return the initialReplicationDetails value. - */ - public InitialReplicationDetails initialReplicationDetails() { - return this.initialReplicationDetails; - } - - /** - * Set the initialReplicationDetails property: 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 the vMDiskDetails property: VM disk details. - * - * @return the vMDiskDetails value. - */ - public List vMDiskDetails() { - return this.vMDiskDetails; - } - - /** - * Set the vMDiskDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - if (initialReplicationDetails() != null) { - initialReplicationDetails().validate(); - } - if (vMDiskDetails() != null) { - vMDiskDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("lastReplicatedTime", - this.lastReplicatedTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastReplicatedTime)); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("vmId", this.vmId); - jsonWriter.writeStringField("vmProtectionState", this.vmProtectionState); - jsonWriter.writeStringField("vmProtectionStateDescription", this.vmProtectionStateDescription); - jsonWriter.writeJsonField("initialReplicationDetails", this.initialReplicationDetails); - jsonWriter.writeArrayField("vMDiskDetails", this.vMDiskDetails, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaBlueReplicationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaBlueReplicationDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaBlueReplicationDetails. - */ - public static HyperVReplicaBlueReplicationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaBlueReplicationDetails deserializedHyperVReplicaBlueReplicationDetails - = new HyperVReplicaBlueReplicationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaBlueReplicationDetails.instanceType = reader.getString(); - } else if ("lastReplicatedTime".equals(fieldName)) { - deserializedHyperVReplicaBlueReplicationDetails.lastReplicatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("vmNics".equals(fieldName)) { - List vmNics = reader.readArray(reader1 -> VMNicDetails.fromJson(reader1)); - deserializedHyperVReplicaBlueReplicationDetails.vmNics = vmNics; - } else if ("vmId".equals(fieldName)) { - deserializedHyperVReplicaBlueReplicationDetails.vmId = reader.getString(); - } else if ("vmProtectionState".equals(fieldName)) { - deserializedHyperVReplicaBlueReplicationDetails.vmProtectionState = reader.getString(); - } else if ("vmProtectionStateDescription".equals(fieldName)) { - deserializedHyperVReplicaBlueReplicationDetails.vmProtectionStateDescription = reader.getString(); - } else if ("initialReplicationDetails".equals(fieldName)) { - deserializedHyperVReplicaBlueReplicationDetails.initialReplicationDetails - = InitialReplicationDetails.fromJson(reader); - } else if ("vMDiskDetails".equals(fieldName)) { - List vMDiskDetails = reader.readArray(reader1 -> DiskDetails.fromJson(reader1)); - deserializedHyperVReplicaBlueReplicationDetails.vMDiskDetails = vMDiskDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaBlueReplicationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaPolicyDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaPolicyDetails.java deleted file mode 100644 index 4d83d3911f94..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaPolicyDetails.java +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Hyper-V Replica Blue specific protection profile details. - */ -@Fluent -public final class HyperVReplicaPolicyDetails extends PolicyProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "HyperVReplica2012"; - - /* - * A value indicating the number of recovery points. - */ - private Integer recoveryPoints; - - /* - * A value indicating the application consistent frequency. - */ - private Integer applicationConsistentSnapshotFrequencyInHours; - - /* - * A value indicating whether compression has to be enabled. - */ - private String compression; - - /* - * A value indicating whether IR is online. - */ - private String initialReplicationMethod; - - /* - * A value indicating the online IR start time. - */ - private String onlineReplicationStartTime; - - /* - * A value indicating the offline IR import path. - */ - private String offlineReplicationImportPath; - - /* - * A value indicating the offline IR export path. - */ - private String offlineReplicationExportPath; - - /* - * A value indicating the recovery HTTPS port. - */ - private Integer replicationPort; - - /* - * A value indicating the authentication type. - */ - private Integer allowedAuthenticationType; - - /* - * A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud - */ - private String replicaDeletionOption; - - /** - * Creates an instance of HyperVReplicaPolicyDetails class. - */ - public HyperVReplicaPolicyDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPoints property: A value indicating the number of recovery points. - * - * @return the recoveryPoints value. - */ - public Integer recoveryPoints() { - return this.recoveryPoints; - } - - /** - * Set the recoveryPoints property: 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 the applicationConsistentSnapshotFrequencyInHours property: A value indicating the application consistent - * frequency. - * - * @return the applicationConsistentSnapshotFrequencyInHours value. - */ - public Integer applicationConsistentSnapshotFrequencyInHours() { - return this.applicationConsistentSnapshotFrequencyInHours; - } - - /** - * Set the applicationConsistentSnapshotFrequencyInHours property: 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 the compression property: A value indicating whether compression has to be enabled. - * - * @return the compression value. - */ - public String compression() { - return this.compression; - } - - /** - * Set the compression property: 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 the initialReplicationMethod property: A value indicating whether IR is online. - * - * @return the initialReplicationMethod value. - */ - public String initialReplicationMethod() { - return this.initialReplicationMethod; - } - - /** - * Set the initialReplicationMethod property: 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 the onlineReplicationStartTime property: A value indicating the online IR start time. - * - * @return the onlineReplicationStartTime value. - */ - public String onlineReplicationStartTime() { - return this.onlineReplicationStartTime; - } - - /** - * Set the onlineReplicationStartTime property: 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 the offlineReplicationImportPath property: A value indicating the offline IR import path. - * - * @return the offlineReplicationImportPath value. - */ - public String offlineReplicationImportPath() { - return this.offlineReplicationImportPath; - } - - /** - * Set the offlineReplicationImportPath property: 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 the offlineReplicationExportPath property: A value indicating the offline IR export path. - * - * @return the offlineReplicationExportPath value. - */ - public String offlineReplicationExportPath() { - return this.offlineReplicationExportPath; - } - - /** - * Set the offlineReplicationExportPath property: 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 the replicationPort property: A value indicating the recovery HTTPS port. - * - * @return the replicationPort value. - */ - public Integer replicationPort() { - return this.replicationPort; - } - - /** - * Set the replicationPort property: 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 the allowedAuthenticationType property: A value indicating the authentication type. - * - * @return the allowedAuthenticationType value. - */ - public Integer allowedAuthenticationType() { - return this.allowedAuthenticationType; - } - - /** - * Set the allowedAuthenticationType property: 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 the replicaDeletionOption property: 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 the replicaDeletionOption property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPoints", this.recoveryPoints); - jsonWriter.writeNumberField("applicationConsistentSnapshotFrequencyInHours", - this.applicationConsistentSnapshotFrequencyInHours); - jsonWriter.writeStringField("compression", this.compression); - jsonWriter.writeStringField("initialReplicationMethod", this.initialReplicationMethod); - jsonWriter.writeStringField("onlineReplicationStartTime", this.onlineReplicationStartTime); - jsonWriter.writeStringField("offlineReplicationImportPath", this.offlineReplicationImportPath); - jsonWriter.writeStringField("offlineReplicationExportPath", this.offlineReplicationExportPath); - jsonWriter.writeNumberField("replicationPort", this.replicationPort); - jsonWriter.writeNumberField("allowedAuthenticationType", this.allowedAuthenticationType); - jsonWriter.writeStringField("replicaDeletionOption", this.replicaDeletionOption); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaPolicyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaPolicyDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaPolicyDetails. - */ - public static HyperVReplicaPolicyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaPolicyDetails deserializedHyperVReplicaPolicyDetails = new HyperVReplicaPolicyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaPolicyDetails.instanceType = reader.getString(); - } else if ("recoveryPoints".equals(fieldName)) { - deserializedHyperVReplicaPolicyDetails.recoveryPoints = reader.getNullable(JsonReader::getInt); - } else if ("applicationConsistentSnapshotFrequencyInHours".equals(fieldName)) { - deserializedHyperVReplicaPolicyDetails.applicationConsistentSnapshotFrequencyInHours - = reader.getNullable(JsonReader::getInt); - } else if ("compression".equals(fieldName)) { - deserializedHyperVReplicaPolicyDetails.compression = reader.getString(); - } else if ("initialReplicationMethod".equals(fieldName)) { - deserializedHyperVReplicaPolicyDetails.initialReplicationMethod = reader.getString(); - } else if ("onlineReplicationStartTime".equals(fieldName)) { - deserializedHyperVReplicaPolicyDetails.onlineReplicationStartTime = reader.getString(); - } else if ("offlineReplicationImportPath".equals(fieldName)) { - deserializedHyperVReplicaPolicyDetails.offlineReplicationImportPath = reader.getString(); - } else if ("offlineReplicationExportPath".equals(fieldName)) { - deserializedHyperVReplicaPolicyDetails.offlineReplicationExportPath = reader.getString(); - } else if ("replicationPort".equals(fieldName)) { - deserializedHyperVReplicaPolicyDetails.replicationPort = reader.getNullable(JsonReader::getInt); - } else if ("allowedAuthenticationType".equals(fieldName)) { - deserializedHyperVReplicaPolicyDetails.allowedAuthenticationType - = reader.getNullable(JsonReader::getInt); - } else if ("replicaDeletionOption".equals(fieldName)) { - deserializedHyperVReplicaPolicyDetails.replicaDeletionOption = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaPolicyDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaPolicyInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaPolicyInput.java deleted file mode 100644 index ff309883331e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaPolicyInput.java +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Hyper-V Replica specific policy Input. - */ -@Fluent -public class HyperVReplicaPolicyInput extends PolicyProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplica2012"; - - /* - * A value indicating the number of recovery points. - */ - private Integer recoveryPoints; - - /* - * A value indicating the application consistent frequency. - */ - private Integer applicationConsistentSnapshotFrequencyInHours; - - /* - * A value indicating whether compression has to be enabled. - */ - private String compression; - - /* - * A value indicating whether IR is online. - */ - private String initialReplicationMethod; - - /* - * A value indicating the online IR start time. - */ - private String onlineReplicationStartTime; - - /* - * A value indicating the offline IR import path. - */ - private String offlineReplicationImportPath; - - /* - * A value indicating the offline IR export path. - */ - private String offlineReplicationExportPath; - - /* - * A value indicating the recovery HTTPS port. - */ - private Integer replicationPort; - - /* - * A value indicating the authentication type. - */ - private Integer allowedAuthenticationType; - - /* - * A value indicating whether the VM has to be auto deleted. - */ - private String replicaDeletion; - - /** - * Creates an instance of HyperVReplicaPolicyInput class. - */ - public HyperVReplicaPolicyInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPoints property: A value indicating the number of recovery points. - * - * @return the recoveryPoints value. - */ - public Integer recoveryPoints() { - return this.recoveryPoints; - } - - /** - * Set the recoveryPoints property: 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 the applicationConsistentSnapshotFrequencyInHours property: A value indicating the application consistent - * frequency. - * - * @return the applicationConsistentSnapshotFrequencyInHours value. - */ - public Integer applicationConsistentSnapshotFrequencyInHours() { - return this.applicationConsistentSnapshotFrequencyInHours; - } - - /** - * Set the applicationConsistentSnapshotFrequencyInHours property: 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 the compression property: A value indicating whether compression has to be enabled. - * - * @return the compression value. - */ - public String compression() { - return this.compression; - } - - /** - * Set the compression property: 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 the initialReplicationMethod property: A value indicating whether IR is online. - * - * @return the initialReplicationMethod value. - */ - public String initialReplicationMethod() { - return this.initialReplicationMethod; - } - - /** - * Set the initialReplicationMethod property: 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 the onlineReplicationStartTime property: A value indicating the online IR start time. - * - * @return the onlineReplicationStartTime value. - */ - public String onlineReplicationStartTime() { - return this.onlineReplicationStartTime; - } - - /** - * Set the onlineReplicationStartTime property: 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 the offlineReplicationImportPath property: A value indicating the offline IR import path. - * - * @return the offlineReplicationImportPath value. - */ - public String offlineReplicationImportPath() { - return this.offlineReplicationImportPath; - } - - /** - * Set the offlineReplicationImportPath property: 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 the offlineReplicationExportPath property: A value indicating the offline IR export path. - * - * @return the offlineReplicationExportPath value. - */ - public String offlineReplicationExportPath() { - return this.offlineReplicationExportPath; - } - - /** - * Set the offlineReplicationExportPath property: 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 the replicationPort property: A value indicating the recovery HTTPS port. - * - * @return the replicationPort value. - */ - public Integer replicationPort() { - return this.replicationPort; - } - - /** - * Set the replicationPort property: 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 the allowedAuthenticationType property: A value indicating the authentication type. - * - * @return the allowedAuthenticationType value. - */ - public Integer allowedAuthenticationType() { - return this.allowedAuthenticationType; - } - - /** - * Set the allowedAuthenticationType property: 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 the replicaDeletion property: A value indicating whether the VM has to be auto deleted. - * - * @return the replicaDeletion value. - */ - public String replicaDeletion() { - return this.replicaDeletion; - } - - /** - * Set the replicaDeletion property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPoints", this.recoveryPoints); - jsonWriter.writeNumberField("applicationConsistentSnapshotFrequencyInHours", - this.applicationConsistentSnapshotFrequencyInHours); - jsonWriter.writeStringField("compression", this.compression); - jsonWriter.writeStringField("initialReplicationMethod", this.initialReplicationMethod); - jsonWriter.writeStringField("onlineReplicationStartTime", this.onlineReplicationStartTime); - jsonWriter.writeStringField("offlineReplicationImportPath", this.offlineReplicationImportPath); - jsonWriter.writeStringField("offlineReplicationExportPath", this.offlineReplicationExportPath); - jsonWriter.writeNumberField("replicationPort", this.replicationPort); - jsonWriter.writeNumberField("allowedAuthenticationType", this.allowedAuthenticationType); - jsonWriter.writeStringField("replicaDeletion", this.replicaDeletion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaPolicyInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaPolicyInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaPolicyInput. - */ - public static HyperVReplicaPolicyInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("HyperVReplica2012R2".equals(discriminatorValue)) { - return HyperVReplicaBluePolicyInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static HyperVReplicaPolicyInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaPolicyInput deserializedHyperVReplicaPolicyInput = new HyperVReplicaPolicyInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaPolicyInput.instanceType = reader.getString(); - } else if ("recoveryPoints".equals(fieldName)) { - deserializedHyperVReplicaPolicyInput.recoveryPoints = reader.getNullable(JsonReader::getInt); - } else if ("applicationConsistentSnapshotFrequencyInHours".equals(fieldName)) { - deserializedHyperVReplicaPolicyInput.applicationConsistentSnapshotFrequencyInHours - = reader.getNullable(JsonReader::getInt); - } else if ("compression".equals(fieldName)) { - deserializedHyperVReplicaPolicyInput.compression = reader.getString(); - } else if ("initialReplicationMethod".equals(fieldName)) { - deserializedHyperVReplicaPolicyInput.initialReplicationMethod = reader.getString(); - } else if ("onlineReplicationStartTime".equals(fieldName)) { - deserializedHyperVReplicaPolicyInput.onlineReplicationStartTime = reader.getString(); - } else if ("offlineReplicationImportPath".equals(fieldName)) { - deserializedHyperVReplicaPolicyInput.offlineReplicationImportPath = reader.getString(); - } else if ("offlineReplicationExportPath".equals(fieldName)) { - deserializedHyperVReplicaPolicyInput.offlineReplicationExportPath = reader.getString(); - } else if ("replicationPort".equals(fieldName)) { - deserializedHyperVReplicaPolicyInput.replicationPort = reader.getNullable(JsonReader::getInt); - } else if ("allowedAuthenticationType".equals(fieldName)) { - deserializedHyperVReplicaPolicyInput.allowedAuthenticationType - = reader.getNullable(JsonReader::getInt); - } else if ("replicaDeletion".equals(fieldName)) { - deserializedHyperVReplicaPolicyInput.replicaDeletion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaPolicyInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaReplicationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaReplicationDetails.java deleted file mode 100644 index f29c4c92a188..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaReplicationDetails.java +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * HyperV replica 2012 replication details. - */ -@Fluent -public final class HyperVReplicaReplicationDetails extends ReplicationProviderSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "HyperVReplica2012"; - - /* - * The Last replication time. - */ - private OffsetDateTime lastReplicatedTime; - - /* - * The PE Network details. - */ - private List vmNics; - - /* - * The virtual machine Id. - */ - private String vmId; - - /* - * The protection state for the vm. - */ - private String vmProtectionState; - - /* - * The protection state description for the vm. - */ - private String vmProtectionStateDescription; - - /* - * Initial replication details. - */ - private InitialReplicationDetails initialReplicationDetails; - - /* - * VM disk details. - */ - private List vMDiskDetails; - - /** - * Creates an instance of HyperVReplicaReplicationDetails class. - */ - public HyperVReplicaReplicationDetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the lastReplicatedTime property: The Last replication time. - * - * @return the lastReplicatedTime value. - */ - public OffsetDateTime lastReplicatedTime() { - return this.lastReplicatedTime; - } - - /** - * Set the lastReplicatedTime property: The Last replication time. - * - * @param lastReplicatedTime the lastReplicatedTime value to set. - * @return the HyperVReplicaReplicationDetails object itself. - */ - public HyperVReplicaReplicationDetails withLastReplicatedTime(OffsetDateTime lastReplicatedTime) { - this.lastReplicatedTime = lastReplicatedTime; - return this; - } - - /** - * Get the vmNics property: The PE Network details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: 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 vmId property: The virtual machine Id. - * - * @return the vmId value. - */ - public String vmId() { - return this.vmId; - } - - /** - * Set the vmId property: 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 vmProtectionState property: The protection state for the vm. - * - * @return the vmProtectionState value. - */ - public String vmProtectionState() { - return this.vmProtectionState; - } - - /** - * Set the vmProtectionState property: 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 vmProtectionStateDescription property: The protection state description for the vm. - * - * @return the vmProtectionStateDescription value. - */ - public String vmProtectionStateDescription() { - return this.vmProtectionStateDescription; - } - - /** - * Set the vmProtectionStateDescription property: 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 the initialReplicationDetails property: Initial replication details. - * - * @return the initialReplicationDetails value. - */ - public InitialReplicationDetails initialReplicationDetails() { - return this.initialReplicationDetails; - } - - /** - * Set the initialReplicationDetails property: 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 the vMDiskDetails property: VM disk details. - * - * @return the vMDiskDetails value. - */ - public List vMDiskDetails() { - return this.vMDiskDetails; - } - - /** - * Set the vMDiskDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - if (initialReplicationDetails() != null) { - initialReplicationDetails().validate(); - } - if (vMDiskDetails() != null) { - vMDiskDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("lastReplicatedTime", - this.lastReplicatedTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastReplicatedTime)); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("vmId", this.vmId); - jsonWriter.writeStringField("vmProtectionState", this.vmProtectionState); - jsonWriter.writeStringField("vmProtectionStateDescription", this.vmProtectionStateDescription); - jsonWriter.writeJsonField("initialReplicationDetails", this.initialReplicationDetails); - jsonWriter.writeArrayField("vMDiskDetails", this.vMDiskDetails, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVReplicaReplicationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVReplicaReplicationDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVReplicaReplicationDetails. - */ - public static HyperVReplicaReplicationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVReplicaReplicationDetails deserializedHyperVReplicaReplicationDetails - = new HyperVReplicaReplicationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVReplicaReplicationDetails.instanceType = reader.getString(); - } else if ("lastReplicatedTime".equals(fieldName)) { - deserializedHyperVReplicaReplicationDetails.lastReplicatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("vmNics".equals(fieldName)) { - List vmNics = reader.readArray(reader1 -> VMNicDetails.fromJson(reader1)); - deserializedHyperVReplicaReplicationDetails.vmNics = vmNics; - } else if ("vmId".equals(fieldName)) { - deserializedHyperVReplicaReplicationDetails.vmId = reader.getString(); - } else if ("vmProtectionState".equals(fieldName)) { - deserializedHyperVReplicaReplicationDetails.vmProtectionState = reader.getString(); - } else if ("vmProtectionStateDescription".equals(fieldName)) { - deserializedHyperVReplicaReplicationDetails.vmProtectionStateDescription = reader.getString(); - } else if ("initialReplicationDetails".equals(fieldName)) { - deserializedHyperVReplicaReplicationDetails.initialReplicationDetails - = InitialReplicationDetails.fromJson(reader); - } else if ("vMDiskDetails".equals(fieldName)) { - List vMDiskDetails = reader.readArray(reader1 -> DiskDetails.fromJson(reader1)); - deserializedHyperVReplicaReplicationDetails.vMDiskDetails = vMDiskDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVReplicaReplicationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVSiteDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVSiteDetails.java deleted file mode 100644 index faadc9962f66..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVSiteDetails.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * HyperVSite fabric specific details. - */ -@Fluent -public final class HyperVSiteDetails extends FabricSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "HyperVSite"; - - /* - * The list of Hyper-V hosts associated with the fabric. - */ - private List hyperVHosts; - - /** - * Creates an instance of HyperVSiteDetails class. - */ - public HyperVSiteDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the hyperVHosts property: The list of Hyper-V hosts associated with the fabric. - * - * @return the hyperVHosts value. - */ - public List hyperVHosts() { - return this.hyperVHosts; - } - - /** - * Set the hyperVHosts property: The list of Hyper-V hosts associated with the fabric. - * - * @param hyperVHosts the hyperVHosts value to set. - * @return the HyperVSiteDetails object itself. - */ - public HyperVSiteDetails withHyperVHosts(List hyperVHosts) { - this.hyperVHosts = hyperVHosts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (hyperVHosts() != null) { - hyperVHosts().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("hyperVHosts", this.hyperVHosts, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVSiteDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVSiteDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVSiteDetails. - */ - public static HyperVSiteDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVSiteDetails deserializedHyperVSiteDetails = new HyperVSiteDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVSiteDetails.instanceType = reader.getString(); - } else if ("hyperVHosts".equals(fieldName)) { - List hyperVHosts - = reader.readArray(reader1 -> HyperVHostDetails.fromJson(reader1)); - deserializedHyperVSiteDetails.hyperVHosts = hyperVHosts; - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVSiteDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVVirtualMachineDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVVirtualMachineDetails.java deleted file mode 100644 index f2e8ff4b63d6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVVirtualMachineDetails.java +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Single Host fabric provider specific VM settings. - */ -@Fluent -public class HyperVVirtualMachineDetails extends ConfigurationSettings { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "HyperVVirtualMachine"; - - /* - * The source id of the object. - */ - private String sourceItemId; - - /* - * The id of the object in fabric. - */ - private String generation; - - /* - * The Last replication time. - */ - private OSDetails osDetails; - - /* - * The Last successful failover time. - */ - private List diskDetails; - - /* - * A value indicating whether the VM has a physical disk attached. String value of SrsDataContract.PresenceStatus - * enum. - */ - private PresenceStatus hasPhysicalDisk; - - /* - * A value indicating whether the VM has a fibre channel adapter attached. String value of - * SrsDataContract.PresenceStatus enum. - */ - private PresenceStatus hasFibreChannelAdapter; - - /* - * A value indicating whether the VM has a shared VHD attached. String value of SrsDataContract.PresenceStatus enum. - */ - private PresenceStatus hasSharedVhd; - - /* - * The Id of the hyper-v host in fabric. - */ - private String hyperVHostId; - - /** - * Creates an instance of HyperVVirtualMachineDetails class. - */ - public HyperVVirtualMachineDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the sourceItemId property: The source id of the object. - * - * @return the sourceItemId value. - */ - public String sourceItemId() { - return this.sourceItemId; - } - - /** - * Set the sourceItemId property: 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 generation property: The id of the object in fabric. - * - * @return the generation value. - */ - public String generation() { - return this.generation; - } - - /** - * Set the generation property: 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 osDetails property: The Last replication time. - * - * @return the osDetails value. - */ - public OSDetails osDetails() { - return this.osDetails; - } - - /** - * Set the osDetails property: 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 diskDetails property: The Last successful failover time. - * - * @return the diskDetails value. - */ - public List diskDetails() { - return this.diskDetails; - } - - /** - * Set the diskDetails property: 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; - } - - /** - * Get the hasPhysicalDisk property: A value indicating whether the VM has a physical disk attached. String value of - * SrsDataContract.PresenceStatus enum. - * - * @return the hasPhysicalDisk value. - */ - public PresenceStatus hasPhysicalDisk() { - return this.hasPhysicalDisk; - } - - /** - * Set the hasPhysicalDisk property: A value indicating whether the VM has a physical disk attached. String value of - * SrsDataContract.PresenceStatus enum. - * - * @param hasPhysicalDisk the hasPhysicalDisk value to set. - * @return the HyperVVirtualMachineDetails object itself. - */ - public HyperVVirtualMachineDetails withHasPhysicalDisk(PresenceStatus hasPhysicalDisk) { - this.hasPhysicalDisk = hasPhysicalDisk; - return this; - } - - /** - * Get the hasFibreChannelAdapter property: A value indicating whether the VM has a fibre channel adapter attached. - * String value of SrsDataContract.PresenceStatus enum. - * - * @return the hasFibreChannelAdapter value. - */ - public PresenceStatus hasFibreChannelAdapter() { - return this.hasFibreChannelAdapter; - } - - /** - * Set the hasFibreChannelAdapter property: A value indicating whether the VM has a fibre channel adapter attached. - * String value of SrsDataContract.PresenceStatus enum. - * - * @param hasFibreChannelAdapter the hasFibreChannelAdapter value to set. - * @return the HyperVVirtualMachineDetails object itself. - */ - public HyperVVirtualMachineDetails withHasFibreChannelAdapter(PresenceStatus hasFibreChannelAdapter) { - this.hasFibreChannelAdapter = hasFibreChannelAdapter; - return this; - } - - /** - * Get the hasSharedVhd property: A value indicating whether the VM has a shared VHD attached. String value of - * SrsDataContract.PresenceStatus enum. - * - * @return the hasSharedVhd value. - */ - public PresenceStatus hasSharedVhd() { - return this.hasSharedVhd; - } - - /** - * Set the hasSharedVhd property: A value indicating whether the VM has a shared VHD attached. String value of - * SrsDataContract.PresenceStatus enum. - * - * @param hasSharedVhd the hasSharedVhd value to set. - * @return the HyperVVirtualMachineDetails object itself. - */ - public HyperVVirtualMachineDetails withHasSharedVhd(PresenceStatus hasSharedVhd) { - this.hasSharedVhd = hasSharedVhd; - return this; - } - - /** - * Get the hyperVHostId property: The Id of the hyper-v host in fabric. - * - * @return the hyperVHostId value. - */ - public String hyperVHostId() { - return this.hyperVHostId; - } - - /** - * Set the hyperVHostId property: The Id of the hyper-v host in fabric. - * - * @param hyperVHostId the hyperVHostId value to set. - * @return the HyperVVirtualMachineDetails object itself. - */ - public HyperVVirtualMachineDetails withHyperVHostId(String hyperVHostId) { - this.hyperVHostId = hyperVHostId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (osDetails() != null) { - osDetails().validate(); - } - if (diskDetails() != null) { - diskDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("sourceItemId", this.sourceItemId); - jsonWriter.writeStringField("generation", this.generation); - jsonWriter.writeJsonField("osDetails", this.osDetails); - jsonWriter.writeArrayField("diskDetails", this.diskDetails, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("hasPhysicalDisk", - this.hasPhysicalDisk == null ? null : this.hasPhysicalDisk.toString()); - jsonWriter.writeStringField("hasFibreChannelAdapter", - this.hasFibreChannelAdapter == null ? null : this.hasFibreChannelAdapter.toString()); - jsonWriter.writeStringField("hasSharedVhd", this.hasSharedVhd == null ? null : this.hasSharedVhd.toString()); - jsonWriter.writeStringField("hyperVHostId", this.hyperVHostId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HyperVVirtualMachineDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HyperVVirtualMachineDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HyperVVirtualMachineDetails. - */ - public static HyperVVirtualMachineDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("VmmVirtualMachine".equals(discriminatorValue)) { - return VmmVirtualMachineDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static HyperVVirtualMachineDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HyperVVirtualMachineDetails deserializedHyperVVirtualMachineDetails = new HyperVVirtualMachineDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedHyperVVirtualMachineDetails.instanceType = reader.getString(); - } else if ("sourceItemId".equals(fieldName)) { - deserializedHyperVVirtualMachineDetails.sourceItemId = reader.getString(); - } else if ("generation".equals(fieldName)) { - deserializedHyperVVirtualMachineDetails.generation = reader.getString(); - } else if ("osDetails".equals(fieldName)) { - deserializedHyperVVirtualMachineDetails.osDetails = OSDetails.fromJson(reader); - } else if ("diskDetails".equals(fieldName)) { - List diskDetails = reader.readArray(reader1 -> DiskDetails.fromJson(reader1)); - deserializedHyperVVirtualMachineDetails.diskDetails = diskDetails; - } else if ("hasPhysicalDisk".equals(fieldName)) { - deserializedHyperVVirtualMachineDetails.hasPhysicalDisk - = PresenceStatus.fromString(reader.getString()); - } else if ("hasFibreChannelAdapter".equals(fieldName)) { - deserializedHyperVVirtualMachineDetails.hasFibreChannelAdapter - = PresenceStatus.fromString(reader.getString()); - } else if ("hasSharedVhd".equals(fieldName)) { - deserializedHyperVVirtualMachineDetails.hasSharedVhd - = PresenceStatus.fromString(reader.getString()); - } else if ("hyperVHostId".equals(fieldName)) { - deserializedHyperVVirtualMachineDetails.hyperVHostId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHyperVVirtualMachineDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/IdentityProviderDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/IdentityProviderDetails.java deleted file mode 100644 index f395e8e0b063..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/IdentityProviderDetails.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Identity provider details. - */ -@Fluent -public final class IdentityProviderDetails implements JsonSerializable { - /* - * The tenant Id for the service principal with which the on-premise management/data plane components would - * communicate with our Azure services. - */ - 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. - */ - 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. - */ - 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. - */ - private String audience; - - /* - * The base authority for Azure Active Directory authentication. - */ - private String aadAuthority; - - /** - * Creates an instance of IdentityProviderDetails class. - */ - public IdentityProviderDetails() { - } - - /** - * Get the tenantId property: 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 tenantId property: 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 IdentityProviderDetails object itself. - */ - public IdentityProviderDetails withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the applicationId property: 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 applicationId property: 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 IdentityProviderDetails object itself. - */ - public IdentityProviderDetails withApplicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * Get the objectId property: 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 objectId property: 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 IdentityProviderDetails object itself. - */ - public IdentityProviderDetails withObjectId(String objectId) { - this.objectId = objectId; - return this; - } - - /** - * Get the audience property: 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 audience property: 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 IdentityProviderDetails object itself. - */ - public IdentityProviderDetails withAudience(String audience) { - this.audience = audience; - return this; - } - - /** - * Get the aadAuthority property: The base authority for Azure Active Directory authentication. - * - * @return the aadAuthority value. - */ - public String aadAuthority() { - return this.aadAuthority; - } - - /** - * Set the aadAuthority property: The base authority for Azure Active Directory authentication. - * - * @param aadAuthority the aadAuthority value to set. - * @return the IdentityProviderDetails object itself. - */ - public IdentityProviderDetails withAadAuthority(String aadAuthority) { - this.aadAuthority = aadAuthority; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tenantId", this.tenantId); - jsonWriter.writeStringField("applicationId", this.applicationId); - jsonWriter.writeStringField("objectId", this.objectId); - jsonWriter.writeStringField("audience", this.audience); - jsonWriter.writeStringField("aadAuthority", this.aadAuthority); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityProviderDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityProviderDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the IdentityProviderDetails. - */ - public static IdentityProviderDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityProviderDetails deserializedIdentityProviderDetails = new IdentityProviderDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tenantId".equals(fieldName)) { - deserializedIdentityProviderDetails.tenantId = reader.getString(); - } else if ("applicationId".equals(fieldName)) { - deserializedIdentityProviderDetails.applicationId = reader.getString(); - } else if ("objectId".equals(fieldName)) { - deserializedIdentityProviderDetails.objectId = reader.getString(); - } else if ("audience".equals(fieldName)) { - deserializedIdentityProviderDetails.audience = reader.getString(); - } else if ("aadAuthority".equals(fieldName)) { - deserializedIdentityProviderDetails.aadAuthority = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityProviderDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/IdentityProviderInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/IdentityProviderInput.java deleted file mode 100644 index cb019d47564f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/IdentityProviderInput.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Identity provider input. - */ -@Fluent -public final class IdentityProviderInput implements JsonSerializable { - /* - * The tenant Id for the service principal with which the on-premise management/data plane components would - * communicate with our Azure services. - */ - 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. - */ - 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. - */ - 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. - */ - private String audience; - - /* - * The base authority for Azure Active Directory authentication. - */ - private String aadAuthority; - - /** - * Creates an instance of IdentityProviderInput class. - */ - public IdentityProviderInput() { - } - - /** - * Get the tenantId property: 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 tenantId property: 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 IdentityProviderInput object itself. - */ - public IdentityProviderInput withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the applicationId property: 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 applicationId property: 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 IdentityProviderInput object itself. - */ - public IdentityProviderInput withApplicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * Get the objectId property: 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 objectId property: 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 IdentityProviderInput object itself. - */ - public IdentityProviderInput withObjectId(String objectId) { - this.objectId = objectId; - return this; - } - - /** - * Get the audience property: 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 audience property: 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 IdentityProviderInput object itself. - */ - public IdentityProviderInput withAudience(String audience) { - this.audience = audience; - return this; - } - - /** - * Get the aadAuthority property: The base authority for Azure Active Directory authentication. - * - * @return the aadAuthority value. - */ - public String aadAuthority() { - return this.aadAuthority; - } - - /** - * Set the aadAuthority property: The base authority for Azure Active Directory authentication. - * - * @param aadAuthority the aadAuthority value to set. - * @return the IdentityProviderInput object itself. - */ - public IdentityProviderInput withAadAuthority(String aadAuthority) { - this.aadAuthority = aadAuthority; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tenantId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property tenantId in model IdentityProviderInput")); - } - if (applicationId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property applicationId in model IdentityProviderInput")); - } - if (objectId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property objectId in model IdentityProviderInput")); - } - if (audience() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property audience in model IdentityProviderInput")); - } - if (aadAuthority() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property aadAuthority in model IdentityProviderInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IdentityProviderInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tenantId", this.tenantId); - jsonWriter.writeStringField("applicationId", this.applicationId); - jsonWriter.writeStringField("objectId", this.objectId); - jsonWriter.writeStringField("audience", this.audience); - jsonWriter.writeStringField("aadAuthority", this.aadAuthority); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityProviderInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityProviderInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IdentityProviderInput. - */ - public static IdentityProviderInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityProviderInput deserializedIdentityProviderInput = new IdentityProviderInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tenantId".equals(fieldName)) { - deserializedIdentityProviderInput.tenantId = reader.getString(); - } else if ("applicationId".equals(fieldName)) { - deserializedIdentityProviderInput.applicationId = reader.getString(); - } else if ("objectId".equals(fieldName)) { - deserializedIdentityProviderInput.objectId = reader.getString(); - } else if ("audience".equals(fieldName)) { - deserializedIdentityProviderInput.audience = reader.getString(); - } else if ("aadAuthority".equals(fieldName)) { - deserializedIdentityProviderInput.aadAuthority = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityProviderInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAgentDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAgentDetails.java deleted file mode 100644 index e48383a8e20f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAgentDetails.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * The details of the InMage agent. - */ -@Fluent -public final class InMageAgentDetails implements JsonSerializable { - /* - * The agent version. - */ - private String agentVersion; - - /* - * A value indicating whether installed agent needs to be updated. - */ - private String agentUpdateStatus; - - /* - * A value indicating whether reboot is required after update is applied. - */ - private String postUpdateRebootStatus; - - /* - * Agent expiry date. - */ - private OffsetDateTime agentExpiryDate; - - /** - * Creates an instance of InMageAgentDetails class. - */ - public InMageAgentDetails() { - } - - /** - * Get the agentVersion property: The agent version. - * - * @return the agentVersion value. - */ - public String agentVersion() { - return this.agentVersion; - } - - /** - * Set the agentVersion property: 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 the agentUpdateStatus property: A value indicating whether installed agent needs to be updated. - * - * @return the agentUpdateStatus value. - */ - public String agentUpdateStatus() { - return this.agentUpdateStatus; - } - - /** - * Set the agentUpdateStatus property: 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 the postUpdateRebootStatus property: A value indicating whether reboot is required after update is applied. - * - * @return the postUpdateRebootStatus value. - */ - public String postUpdateRebootStatus() { - return this.postUpdateRebootStatus; - } - - /** - * Set the postUpdateRebootStatus property: 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; - } - - /** - * Get the agentExpiryDate property: Agent expiry date. - * - * @return the agentExpiryDate value. - */ - public OffsetDateTime agentExpiryDate() { - return this.agentExpiryDate; - } - - /** - * Set the agentExpiryDate property: Agent expiry date. - * - * @param agentExpiryDate the agentExpiryDate value to set. - * @return the InMageAgentDetails object itself. - */ - public InMageAgentDetails withAgentExpiryDate(OffsetDateTime agentExpiryDate) { - this.agentExpiryDate = agentExpiryDate; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("agentVersion", this.agentVersion); - jsonWriter.writeStringField("agentUpdateStatus", this.agentUpdateStatus); - jsonWriter.writeStringField("postUpdateRebootStatus", this.postUpdateRebootStatus); - jsonWriter.writeStringField("agentExpiryDate", - this.agentExpiryDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.agentExpiryDate)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAgentDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAgentDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAgentDetails. - */ - public static InMageAgentDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAgentDetails deserializedInMageAgentDetails = new InMageAgentDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("agentVersion".equals(fieldName)) { - deserializedInMageAgentDetails.agentVersion = reader.getString(); - } else if ("agentUpdateStatus".equals(fieldName)) { - deserializedInMageAgentDetails.agentUpdateStatus = reader.getString(); - } else if ("postUpdateRebootStatus".equals(fieldName)) { - deserializedInMageAgentDetails.postUpdateRebootStatus = reader.getString(); - } else if ("agentExpiryDate".equals(fieldName)) { - deserializedInMageAgentDetails.agentExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAgentDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ApplyRecoveryPointInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ApplyRecoveryPointInput.java deleted file mode 100644 index a6b4a6f59d97..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ApplyRecoveryPointInput.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * ApplyRecoveryPoint input specific to InMageAzureV2 provider. - */ -@Immutable -public final class InMageAzureV2ApplyRecoveryPointInput extends ApplyRecoveryPointProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageAzureV2"; - - /** - * Creates an instance of InMageAzureV2ApplyRecoveryPointInput class. - */ - public InMageAzureV2ApplyRecoveryPointInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2ApplyRecoveryPointInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2ApplyRecoveryPointInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2ApplyRecoveryPointInput. - */ - public static InMageAzureV2ApplyRecoveryPointInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2ApplyRecoveryPointInput deserializedInMageAzureV2ApplyRecoveryPointInput - = new InMageAzureV2ApplyRecoveryPointInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageAzureV2ApplyRecoveryPointInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2ApplyRecoveryPointInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2DiskInputDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2DiskInputDetails.java deleted file mode 100644 index e7e7860691f4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2DiskInputDetails.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Disk input details. - */ -@Fluent -public final class InMageAzureV2DiskInputDetails implements JsonSerializable { - /* - * The DiskId. - */ - private String diskId; - - /* - * The LogStorageAccountId. - */ - private String logStorageAccountId; - - /* - * The DiskType. - */ - private DiskAccountType diskType; - - /* - * The DiskEncryptionSet ARM ID. - */ - private String diskEncryptionSetId; - - /** - * Creates an instance of InMageAzureV2DiskInputDetails class. - */ - public InMageAzureV2DiskInputDetails() { - } - - /** - * Get the diskId property: The DiskId. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: The DiskId. - * - * @param diskId the diskId value to set. - * @return the InMageAzureV2DiskInputDetails object itself. - */ - public InMageAzureV2DiskInputDetails withDiskId(String diskId) { - this.diskId = diskId; - return this; - } - - /** - * Get the logStorageAccountId property: The LogStorageAccountId. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Set the logStorageAccountId property: The LogStorageAccountId. - * - * @param logStorageAccountId the logStorageAccountId value to set. - * @return the InMageAzureV2DiskInputDetails object itself. - */ - public InMageAzureV2DiskInputDetails withLogStorageAccountId(String logStorageAccountId) { - this.logStorageAccountId = logStorageAccountId; - return this; - } - - /** - * Get the diskType property: The DiskType. - * - * @return the diskType value. - */ - public DiskAccountType diskType() { - return this.diskType; - } - - /** - * Set the diskType property: The DiskType. - * - * @param diskType the diskType value to set. - * @return the InMageAzureV2DiskInputDetails object itself. - */ - public InMageAzureV2DiskInputDetails withDiskType(DiskAccountType diskType) { - this.diskType = diskType; - return this; - } - - /** - * Get the diskEncryptionSetId property: The DiskEncryptionSet ARM ID. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Set the diskEncryptionSetId property: The DiskEncryptionSet ARM ID. - * - * @param diskEncryptionSetId the diskEncryptionSetId value to set. - * @return the InMageAzureV2DiskInputDetails object itself. - */ - public InMageAzureV2DiskInputDetails withDiskEncryptionSetId(String diskEncryptionSetId) { - this.diskEncryptionSetId = diskEncryptionSetId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("logStorageAccountId", this.logStorageAccountId); - jsonWriter.writeStringField("diskType", this.diskType == null ? null : this.diskType.toString()); - jsonWriter.writeStringField("diskEncryptionSetId", this.diskEncryptionSetId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2DiskInputDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2DiskInputDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2DiskInputDetails. - */ - public static InMageAzureV2DiskInputDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2DiskInputDetails deserializedInMageAzureV2DiskInputDetails - = new InMageAzureV2DiskInputDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedInMageAzureV2DiskInputDetails.diskId = reader.getString(); - } else if ("logStorageAccountId".equals(fieldName)) { - deserializedInMageAzureV2DiskInputDetails.logStorageAccountId = reader.getString(); - } else if ("diskType".equals(fieldName)) { - deserializedInMageAzureV2DiskInputDetails.diskType = DiskAccountType.fromString(reader.getString()); - } else if ("diskEncryptionSetId".equals(fieldName)) { - deserializedInMageAzureV2DiskInputDetails.diskEncryptionSetId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2DiskInputDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2EnableProtectionInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2EnableProtectionInput.java deleted file mode 100644 index 1115d9f5ff80..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2EnableProtectionInput.java +++ /dev/null @@ -1,838 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * VMware Azure specific enable protection input. - */ -@Fluent -public final class InMageAzureV2EnableProtectionInput extends EnableProtectionProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageAzureV2"; - - /* - * The Master target Id. - */ - private String masterTargetId; - - /* - * The Process Server Id. - */ - private String processServerId; - - /* - * The storage account Id. - */ - private String storageAccountId; - - /* - * The CS account Id. - */ - private String runAsAccountId; - - /* - * The multi VM group Id. - */ - private String multiVmGroupId; - - /* - * The multi VM group name. - */ - private String multiVmGroupName; - - /* - * The disks to include list. - */ - private List disksToInclude; - - /* - * The selected target Azure network Id. - */ - private String targetAzureNetworkId; - - /* - * The selected target Azure subnet Id. - */ - private String targetAzureSubnetId; - - /* - * The selected option to enable RDP\SSH on target VM after failover. String value of - * SrsDataContract.EnableRDPOnTargetOption enum. - */ - private String enableRdpOnTargetOption; - - /* - * The target azure VM Name. - */ - private String targetAzureVmName; - - /* - * The storage account to be used for logging during replication. - */ - private String logStorageAccountId; - - /* - * The Id of the target resource group (for classic deployment) in which the failover VM is to be created. - */ - private String targetAzureV1ResourceGroupId; - - /* - * The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. - */ - private String targetAzureV2ResourceGroupId; - - /* - * The DiskType. - */ - private DiskAccountType diskType; - - /* - * The target availability set ARM Id for resource manager deployment. - */ - private String targetAvailabilitySetId; - - /* - * The target availability zone. - */ - private String targetAvailabilityZone; - - /* - * The proximity placement group ARM Id. - */ - private String targetProximityPlacementGroupId; - - /* - * License type. - */ - private LicenseType licenseType; - - /* - * The SQL Server license type. - */ - private SqlServerLicenseType sqlServerLicenseType; - - /* - * The target VM size. - */ - private String targetVmSize; - - /* - * The DiskEncryptionSet ARM Id. - */ - private String diskEncryptionSetId; - - /* - * The target VM tags. - */ - private Map targetVmTags; - - /* - * The tags for the seed managed disks. - */ - private Map seedManagedDiskTags; - - /* - * The tags for the target managed disks. - */ - private Map targetManagedDiskTags; - - /* - * The tags for the target NICs. - */ - private Map targetNicTags; - - /** - * Creates an instance of InMageAzureV2EnableProtectionInput class. - */ - public InMageAzureV2EnableProtectionInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the masterTargetId property: The Master target Id. - * - * @return the masterTargetId value. - */ - public String masterTargetId() { - return this.masterTargetId; - } - - /** - * Set the masterTargetId property: 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 processServerId property: The Process Server Id. - * - * @return the processServerId value. - */ - public String processServerId() { - return this.processServerId; - } - - /** - * Set the processServerId property: 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 storageAccountId property: The storage account Id. - * - * @return the storageAccountId value. - */ - public String storageAccountId() { - return this.storageAccountId; - } - - /** - * Set the storageAccountId property: The storage account Id. - * - * @param storageAccountId the storageAccountId value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput withStorageAccountId(String storageAccountId) { - this.storageAccountId = storageAccountId; - return this; - } - - /** - * Get the runAsAccountId property: The CS account Id. - * - * @return the runAsAccountId value. - */ - public String runAsAccountId() { - return this.runAsAccountId; - } - - /** - * Set the runAsAccountId property: 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 multiVmGroupId property: The multi VM group Id. - * - * @return the multiVmGroupId value. - */ - public String multiVmGroupId() { - return this.multiVmGroupId; - } - - /** - * Set the multiVmGroupId property: 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 multiVmGroupName property: The multi VM group name. - * - * @return the multiVmGroupName value. - */ - public String multiVmGroupName() { - return this.multiVmGroupName; - } - - /** - * Set the multiVmGroupName property: 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 disksToInclude property: The disks to include list. - * - * @return the disksToInclude value. - */ - public List disksToInclude() { - return this.disksToInclude; - } - - /** - * Set the disksToInclude property: 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 targetAzureNetworkId property: The selected target Azure network Id. - * - * @return the targetAzureNetworkId value. - */ - public String targetAzureNetworkId() { - return this.targetAzureNetworkId; - } - - /** - * Set the targetAzureNetworkId property: 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 targetAzureSubnetId property: The selected target Azure subnet Id. - * - * @return the targetAzureSubnetId value. - */ - public String targetAzureSubnetId() { - return this.targetAzureSubnetId; - } - - /** - * Set the targetAzureSubnetId property: 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 enableRdpOnTargetOption property: 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 enableRdpOnTargetOption property: 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 targetAzureVmName property: The target azure VM Name. - * - * @return the targetAzureVmName value. - */ - public String targetAzureVmName() { - return this.targetAzureVmName; - } - - /** - * Set the targetAzureVmName property: 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 logStorageAccountId property: The storage account to be used for logging during replication. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Set the logStorageAccountId property: 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 targetAzureV1ResourceGroupId property: 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 targetAzureV1ResourceGroupId property: 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 targetAzureV2ResourceGroupId property: 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 targetAzureV2ResourceGroupId property: 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 the diskType property: The DiskType. - * - * @return the diskType value. - */ - public DiskAccountType diskType() { - return this.diskType; - } - - /** - * Set the diskType property: The DiskType. - * - * @param diskType the diskType value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput withDiskType(DiskAccountType diskType) { - this.diskType = diskType; - return this; - } - - /** - * Get the targetAvailabilitySetId property: The target availability set ARM Id for resource manager deployment. - * - * @return the targetAvailabilitySetId value. - */ - public String targetAvailabilitySetId() { - return this.targetAvailabilitySetId; - } - - /** - * Set the targetAvailabilitySetId property: The target availability set ARM Id for resource manager deployment. - * - * @param targetAvailabilitySetId the targetAvailabilitySetId value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput withTargetAvailabilitySetId(String targetAvailabilitySetId) { - this.targetAvailabilitySetId = targetAvailabilitySetId; - return this; - } - - /** - * Get the targetAvailabilityZone property: The target availability zone. - * - * @return the targetAvailabilityZone value. - */ - public String targetAvailabilityZone() { - return this.targetAvailabilityZone; - } - - /** - * Set the targetAvailabilityZone property: The target availability zone. - * - * @param targetAvailabilityZone the targetAvailabilityZone value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput withTargetAvailabilityZone(String targetAvailabilityZone) { - this.targetAvailabilityZone = targetAvailabilityZone; - return this; - } - - /** - * Get the targetProximityPlacementGroupId property: The proximity placement group ARM Id. - * - * @return the targetProximityPlacementGroupId value. - */ - public String targetProximityPlacementGroupId() { - return this.targetProximityPlacementGroupId; - } - - /** - * Set the targetProximityPlacementGroupId property: The proximity placement group ARM Id. - * - * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput - withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) { - this.targetProximityPlacementGroupId = targetProximityPlacementGroupId; - return this; - } - - /** - * Get the licenseType property: License type. - * - * @return the licenseType value. - */ - public LicenseType licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: License type. - * - * @param licenseType the licenseType value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput withLicenseType(LicenseType licenseType) { - this.licenseType = licenseType; - return this; - } - - /** - * Get the sqlServerLicenseType property: The SQL Server license type. - * - * @return the sqlServerLicenseType value. - */ - public SqlServerLicenseType sqlServerLicenseType() { - return this.sqlServerLicenseType; - } - - /** - * Set the sqlServerLicenseType property: The SQL Server license type. - * - * @param sqlServerLicenseType the sqlServerLicenseType value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput withSqlServerLicenseType(SqlServerLicenseType sqlServerLicenseType) { - this.sqlServerLicenseType = sqlServerLicenseType; - return this; - } - - /** - * Get the targetVmSize property: The target VM size. - * - * @return the targetVmSize value. - */ - public String targetVmSize() { - return this.targetVmSize; - } - - /** - * Set the targetVmSize property: The target VM size. - * - * @param targetVmSize the targetVmSize value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput withTargetVmSize(String targetVmSize) { - this.targetVmSize = targetVmSize; - return this; - } - - /** - * Get the diskEncryptionSetId property: The DiskEncryptionSet ARM Id. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Set the diskEncryptionSetId property: The DiskEncryptionSet ARM Id. - * - * @param diskEncryptionSetId the diskEncryptionSetId value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput withDiskEncryptionSetId(String diskEncryptionSetId) { - this.diskEncryptionSetId = diskEncryptionSetId; - return this; - } - - /** - * Get the targetVmTags property: The target VM tags. - * - * @return the targetVmTags value. - */ - public Map targetVmTags() { - return this.targetVmTags; - } - - /** - * Set the targetVmTags property: The target VM tags. - * - * @param targetVmTags the targetVmTags value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput withTargetVmTags(Map targetVmTags) { - this.targetVmTags = targetVmTags; - return this; - } - - /** - * Get the seedManagedDiskTags property: The tags for the seed managed disks. - * - * @return the seedManagedDiskTags value. - */ - public Map seedManagedDiskTags() { - return this.seedManagedDiskTags; - } - - /** - * Set the seedManagedDiskTags property: The tags for the seed managed disks. - * - * @param seedManagedDiskTags the seedManagedDiskTags value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput withSeedManagedDiskTags(Map seedManagedDiskTags) { - this.seedManagedDiskTags = seedManagedDiskTags; - return this; - } - - /** - * Get the targetManagedDiskTags property: The tags for the target managed disks. - * - * @return the targetManagedDiskTags value. - */ - public Map targetManagedDiskTags() { - return this.targetManagedDiskTags; - } - - /** - * Set the targetManagedDiskTags property: The tags for the target managed disks. - * - * @param targetManagedDiskTags the targetManagedDiskTags value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput withTargetManagedDiskTags(Map targetManagedDiskTags) { - this.targetManagedDiskTags = targetManagedDiskTags; - return this; - } - - /** - * Get the targetNicTags property: The tags for the target NICs. - * - * @return the targetNicTags value. - */ - public Map targetNicTags() { - return this.targetNicTags; - } - - /** - * Set the targetNicTags property: The tags for the target NICs. - * - * @param targetNicTags the targetNicTags value to set. - * @return the InMageAzureV2EnableProtectionInput object itself. - */ - public InMageAzureV2EnableProtectionInput withTargetNicTags(Map targetNicTags) { - this.targetNicTags = targetNicTags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (disksToInclude() != null) { - disksToInclude().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("masterTargetId", this.masterTargetId); - jsonWriter.writeStringField("processServerId", this.processServerId); - jsonWriter.writeStringField("storageAccountId", this.storageAccountId); - jsonWriter.writeStringField("runAsAccountId", this.runAsAccountId); - jsonWriter.writeStringField("multiVmGroupId", this.multiVmGroupId); - jsonWriter.writeStringField("multiVmGroupName", this.multiVmGroupName); - jsonWriter.writeArrayField("disksToInclude", this.disksToInclude, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("targetAzureNetworkId", this.targetAzureNetworkId); - jsonWriter.writeStringField("targetAzureSubnetId", this.targetAzureSubnetId); - jsonWriter.writeStringField("enableRdpOnTargetOption", this.enableRdpOnTargetOption); - jsonWriter.writeStringField("targetAzureVmName", this.targetAzureVmName); - jsonWriter.writeStringField("logStorageAccountId", this.logStorageAccountId); - jsonWriter.writeStringField("targetAzureV1ResourceGroupId", this.targetAzureV1ResourceGroupId); - jsonWriter.writeStringField("targetAzureV2ResourceGroupId", this.targetAzureV2ResourceGroupId); - jsonWriter.writeStringField("diskType", this.diskType == null ? null : this.diskType.toString()); - jsonWriter.writeStringField("targetAvailabilitySetId", this.targetAvailabilitySetId); - jsonWriter.writeStringField("targetAvailabilityZone", this.targetAvailabilityZone); - jsonWriter.writeStringField("targetProximityPlacementGroupId", this.targetProximityPlacementGroupId); - jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); - jsonWriter.writeStringField("sqlServerLicenseType", - this.sqlServerLicenseType == null ? null : this.sqlServerLicenseType.toString()); - jsonWriter.writeStringField("targetVmSize", this.targetVmSize); - jsonWriter.writeStringField("diskEncryptionSetId", this.diskEncryptionSetId); - jsonWriter.writeMapField("targetVmTags", this.targetVmTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("seedManagedDiskTags", this.seedManagedDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetManagedDiskTags", this.targetManagedDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetNicTags", this.targetNicTags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2EnableProtectionInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2EnableProtectionInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2EnableProtectionInput. - */ - public static InMageAzureV2EnableProtectionInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2EnableProtectionInput deserializedInMageAzureV2EnableProtectionInput - = new InMageAzureV2EnableProtectionInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.instanceType = reader.getString(); - } else if ("masterTargetId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.masterTargetId = reader.getString(); - } else if ("processServerId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.processServerId = reader.getString(); - } else if ("storageAccountId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.storageAccountId = reader.getString(); - } else if ("runAsAccountId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.runAsAccountId = reader.getString(); - } else if ("multiVmGroupId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.multiVmGroupId = reader.getString(); - } else if ("multiVmGroupName".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.multiVmGroupName = reader.getString(); - } else if ("disksToInclude".equals(fieldName)) { - List disksToInclude - = reader.readArray(reader1 -> InMageAzureV2DiskInputDetails.fromJson(reader1)); - deserializedInMageAzureV2EnableProtectionInput.disksToInclude = disksToInclude; - } else if ("targetAzureNetworkId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.targetAzureNetworkId = reader.getString(); - } else if ("targetAzureSubnetId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.targetAzureSubnetId = reader.getString(); - } else if ("enableRdpOnTargetOption".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.enableRdpOnTargetOption = reader.getString(); - } else if ("targetAzureVmName".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.targetAzureVmName = reader.getString(); - } else if ("logStorageAccountId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.logStorageAccountId = reader.getString(); - } else if ("targetAzureV1ResourceGroupId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.targetAzureV1ResourceGroupId = reader.getString(); - } else if ("targetAzureV2ResourceGroupId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.targetAzureV2ResourceGroupId = reader.getString(); - } else if ("diskType".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.diskType - = DiskAccountType.fromString(reader.getString()); - } else if ("targetAvailabilitySetId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.targetAvailabilitySetId = reader.getString(); - } else if ("targetAvailabilityZone".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.targetAvailabilityZone = reader.getString(); - } else if ("targetProximityPlacementGroupId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.targetProximityPlacementGroupId = reader.getString(); - } else if ("licenseType".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.licenseType - = LicenseType.fromString(reader.getString()); - } else if ("sqlServerLicenseType".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.sqlServerLicenseType - = SqlServerLicenseType.fromString(reader.getString()); - } else if ("targetVmSize".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.targetVmSize = reader.getString(); - } else if ("diskEncryptionSetId".equals(fieldName)) { - deserializedInMageAzureV2EnableProtectionInput.diskEncryptionSetId = reader.getString(); - } else if ("targetVmTags".equals(fieldName)) { - Map targetVmTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2EnableProtectionInput.targetVmTags = targetVmTags; - } else if ("seedManagedDiskTags".equals(fieldName)) { - Map seedManagedDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2EnableProtectionInput.seedManagedDiskTags = seedManagedDiskTags; - } else if ("targetManagedDiskTags".equals(fieldName)) { - Map targetManagedDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2EnableProtectionInput.targetManagedDiskTags = targetManagedDiskTags; - } else if ("targetNicTags".equals(fieldName)) { - Map targetNicTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2EnableProtectionInput.targetNicTags = targetNicTags; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2EnableProtectionInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2EventDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2EventDetails.java deleted file mode 100644 index 4cae37a8e91c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2EventDetails.java +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model class for event details of a VMwareAzureV2 event. - */ -@Fluent -public final class InMageAzureV2EventDetails extends EventProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "InMageAzureV2"; - - /* - * InMage Event type. Takes one of the values of InMageDataContract.InMageMonitoringEventType. - */ - private String eventType; - - /* - * InMage Event Category. - */ - private String category; - - /* - * InMage Event Component. - */ - private String component; - - /* - * Corrective Action string for the event. - */ - private String correctiveAction; - - /* - * InMage Event Details. - */ - private String details; - - /* - * InMage Event Summary. - */ - private String summary; - - /* - * VMware Site name. - */ - private String siteName; - - /** - * Creates an instance of InMageAzureV2EventDetails class. - */ - public InMageAzureV2EventDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the eventType property: InMage Event type. Takes one of the values of - * InMageDataContract.InMageMonitoringEventType. - * - * @return the eventType value. - */ - public String eventType() { - return this.eventType; - } - - /** - * Set the eventType property: 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 the category property: InMage Event Category. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: 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 the component property: InMage Event Component. - * - * @return the component value. - */ - public String component() { - return this.component; - } - - /** - * Set the component property: 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 the correctiveAction property: Corrective Action string for the event. - * - * @return the correctiveAction value. - */ - public String correctiveAction() { - return this.correctiveAction; - } - - /** - * Set the correctiveAction property: 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 the details property: InMage Event Details. - * - * @return the details value. - */ - public String details() { - return this.details; - } - - /** - * Set the details property: 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 the summary property: InMage Event Summary. - * - * @return the summary value. - */ - public String summary() { - return this.summary; - } - - /** - * Set the summary property: 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 the siteName property: VMware Site name. - * - * @return the siteName value. - */ - public String siteName() { - return this.siteName; - } - - /** - * Set the siteName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("eventType", this.eventType); - jsonWriter.writeStringField("category", this.category); - jsonWriter.writeStringField("component", this.component); - jsonWriter.writeStringField("correctiveAction", this.correctiveAction); - jsonWriter.writeStringField("details", this.details); - jsonWriter.writeStringField("summary", this.summary); - jsonWriter.writeStringField("siteName", this.siteName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2EventDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2EventDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2EventDetails. - */ - public static InMageAzureV2EventDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2EventDetails deserializedInMageAzureV2EventDetails = new InMageAzureV2EventDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageAzureV2EventDetails.instanceType = reader.getString(); - } else if ("eventType".equals(fieldName)) { - deserializedInMageAzureV2EventDetails.eventType = reader.getString(); - } else if ("category".equals(fieldName)) { - deserializedInMageAzureV2EventDetails.category = reader.getString(); - } else if ("component".equals(fieldName)) { - deserializedInMageAzureV2EventDetails.component = reader.getString(); - } else if ("correctiveAction".equals(fieldName)) { - deserializedInMageAzureV2EventDetails.correctiveAction = reader.getString(); - } else if ("details".equals(fieldName)) { - deserializedInMageAzureV2EventDetails.details = reader.getString(); - } else if ("summary".equals(fieldName)) { - deserializedInMageAzureV2EventDetails.summary = reader.getString(); - } else if ("siteName".equals(fieldName)) { - deserializedInMageAzureV2EventDetails.siteName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2EventDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ManagedDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ManagedDiskDetails.java deleted file mode 100644 index 7f00222afc53..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ManagedDiskDetails.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageAzureV2 Managed disk details. - */ -@Fluent -public final class InMageAzureV2ManagedDiskDetails implements JsonSerializable { - /* - * The disk id. - */ - private String diskId; - - /* - * Seed managed disk Id. - */ - private String seedManagedDiskId; - - /* - * The replica disk type. - */ - private String replicaDiskType; - - /* - * The DiskEncryptionSet ARM ID. - */ - private String diskEncryptionSetId; - - /* - * The target disk name. - */ - private String targetDiskName; - - /** - * Creates an instance of InMageAzureV2ManagedDiskDetails class. - */ - public InMageAzureV2ManagedDiskDetails() { - } - - /** - * Get the diskId property: The disk id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: The disk id. - * - * @param diskId the diskId value to set. - * @return the InMageAzureV2ManagedDiskDetails object itself. - */ - public InMageAzureV2ManagedDiskDetails withDiskId(String diskId) { - this.diskId = diskId; - return this; - } - - /** - * Get the seedManagedDiskId property: Seed managed disk Id. - * - * @return the seedManagedDiskId value. - */ - public String seedManagedDiskId() { - return this.seedManagedDiskId; - } - - /** - * Set the seedManagedDiskId property: Seed managed disk Id. - * - * @param seedManagedDiskId the seedManagedDiskId value to set. - * @return the InMageAzureV2ManagedDiskDetails object itself. - */ - public InMageAzureV2ManagedDiskDetails withSeedManagedDiskId(String seedManagedDiskId) { - this.seedManagedDiskId = seedManagedDiskId; - return this; - } - - /** - * Get the replicaDiskType property: The replica disk type. - * - * @return the replicaDiskType value. - */ - public String replicaDiskType() { - return this.replicaDiskType; - } - - /** - * Set the replicaDiskType property: The replica disk type. - * - * @param replicaDiskType the replicaDiskType value to set. - * @return the InMageAzureV2ManagedDiskDetails object itself. - */ - public InMageAzureV2ManagedDiskDetails withReplicaDiskType(String replicaDiskType) { - this.replicaDiskType = replicaDiskType; - return this; - } - - /** - * Get the diskEncryptionSetId property: The DiskEncryptionSet ARM ID. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Set the diskEncryptionSetId property: The DiskEncryptionSet ARM ID. - * - * @param diskEncryptionSetId the diskEncryptionSetId value to set. - * @return the InMageAzureV2ManagedDiskDetails object itself. - */ - public InMageAzureV2ManagedDiskDetails withDiskEncryptionSetId(String diskEncryptionSetId) { - this.diskEncryptionSetId = diskEncryptionSetId; - return this; - } - - /** - * Get the targetDiskName property: The target disk name. - * - * @return the targetDiskName value. - */ - public String targetDiskName() { - return this.targetDiskName; - } - - /** - * Set the targetDiskName property: The target disk name. - * - * @param targetDiskName the targetDiskName value to set. - * @return the InMageAzureV2ManagedDiskDetails object itself. - */ - public InMageAzureV2ManagedDiskDetails withTargetDiskName(String targetDiskName) { - this.targetDiskName = targetDiskName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("seedManagedDiskId", this.seedManagedDiskId); - jsonWriter.writeStringField("replicaDiskType", this.replicaDiskType); - jsonWriter.writeStringField("diskEncryptionSetId", this.diskEncryptionSetId); - jsonWriter.writeStringField("targetDiskName", this.targetDiskName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2ManagedDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2ManagedDiskDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2ManagedDiskDetails. - */ - public static InMageAzureV2ManagedDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2ManagedDiskDetails deserializedInMageAzureV2ManagedDiskDetails - = new InMageAzureV2ManagedDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedInMageAzureV2ManagedDiskDetails.diskId = reader.getString(); - } else if ("seedManagedDiskId".equals(fieldName)) { - deserializedInMageAzureV2ManagedDiskDetails.seedManagedDiskId = reader.getString(); - } else if ("replicaDiskType".equals(fieldName)) { - deserializedInMageAzureV2ManagedDiskDetails.replicaDiskType = reader.getString(); - } else if ("diskEncryptionSetId".equals(fieldName)) { - deserializedInMageAzureV2ManagedDiskDetails.diskEncryptionSetId = reader.getString(); - } else if ("targetDiskName".equals(fieldName)) { - deserializedInMageAzureV2ManagedDiskDetails.targetDiskName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2ManagedDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2PolicyDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2PolicyDetails.java deleted file mode 100644 index ad60fcb228c3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2PolicyDetails.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMage Azure v2 specific protection profile details. - */ -@Fluent -public final class InMageAzureV2PolicyDetails extends PolicyProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "InMageAzureV2"; - - /* - * The crash consistent snapshot frequency in minutes. - */ - private Integer crashConsistentFrequencyInMinutes; - - /* - * The recovery point threshold in minutes. - */ - private Integer recoveryPointThresholdInMinutes; - - /* - * The duration in minutes until which the recovery points need to be stored. - */ - private Integer recoveryPointHistory; - - /* - * The app consistent snapshot frequency in minutes. - */ - private Integer appConsistentFrequencyInMinutes; - - /* - * A value indicating whether multi-VM sync has to be enabled. - */ - private String multiVmSyncStatus; - - /** - * Creates an instance of InMageAzureV2PolicyDetails class. - */ - public InMageAzureV2PolicyDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency in minutes. - * - * @return the crashConsistentFrequencyInMinutes value. - */ - public Integer crashConsistentFrequencyInMinutes() { - return this.crashConsistentFrequencyInMinutes; - } - - /** - * Set the crashConsistentFrequencyInMinutes property: 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 recoveryPointThresholdInMinutes property: The recovery point threshold in minutes. - * - * @return the recoveryPointThresholdInMinutes value. - */ - public Integer recoveryPointThresholdInMinutes() { - return this.recoveryPointThresholdInMinutes; - } - - /** - * Set the recoveryPointThresholdInMinutes property: 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 recoveryPointHistory property: 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 recoveryPointHistory property: 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 appConsistentFrequencyInMinutes property: The app consistent snapshot frequency in minutes. - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: 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 the multiVmSyncStatus property: A value indicating whether multi-VM sync has to be enabled. - * - * @return the multiVmSyncStatus value. - */ - public String multiVmSyncStatus() { - return this.multiVmSyncStatus; - } - - /** - * Set the multiVmSyncStatus property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("crashConsistentFrequencyInMinutes", this.crashConsistentFrequencyInMinutes); - jsonWriter.writeNumberField("recoveryPointThresholdInMinutes", this.recoveryPointThresholdInMinutes); - jsonWriter.writeNumberField("recoveryPointHistory", this.recoveryPointHistory); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - jsonWriter.writeStringField("multiVmSyncStatus", this.multiVmSyncStatus); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2PolicyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2PolicyDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2PolicyDetails. - */ - public static InMageAzureV2PolicyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2PolicyDetails deserializedInMageAzureV2PolicyDetails = new InMageAzureV2PolicyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageAzureV2PolicyDetails.instanceType = reader.getString(); - } else if ("crashConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageAzureV2PolicyDetails.crashConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("recoveryPointThresholdInMinutes".equals(fieldName)) { - deserializedInMageAzureV2PolicyDetails.recoveryPointThresholdInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("recoveryPointHistory".equals(fieldName)) { - deserializedInMageAzureV2PolicyDetails.recoveryPointHistory - = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageAzureV2PolicyDetails.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("multiVmSyncStatus".equals(fieldName)) { - deserializedInMageAzureV2PolicyDetails.multiVmSyncStatus = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2PolicyDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2PolicyInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2PolicyInput.java deleted file mode 100644 index 15af74839c9c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2PolicyInput.java +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMWare Azure specific policy Input. - */ -@Fluent -public final class InMageAzureV2PolicyInput extends PolicyProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageAzureV2"; - - /* - * The recovery point threshold in minutes. - */ - private Integer recoveryPointThresholdInMinutes; - - /* - * The duration in minutes until which the recovery points need to be stored. - */ - private Integer recoveryPointHistory; - - /* - * The crash consistent snapshot frequency (in minutes). - */ - private Integer crashConsistentFrequencyInMinutes; - - /* - * The app consistent snapshot frequency (in minutes). - */ - private Integer appConsistentFrequencyInMinutes; - - /* - * A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. - */ - private SetMultiVmSyncStatus multiVmSyncStatus; - - /** - * Creates an instance of InMageAzureV2PolicyInput class. - */ - public InMageAzureV2PolicyInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointThresholdInMinutes property: The recovery point threshold in minutes. - * - * @return the recoveryPointThresholdInMinutes value. - */ - public Integer recoveryPointThresholdInMinutes() { - return this.recoveryPointThresholdInMinutes; - } - - /** - * Set the recoveryPointThresholdInMinutes property: 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 recoveryPointHistory property: 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 recoveryPointHistory property: 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 crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency (in minutes). - * - * @return the crashConsistentFrequencyInMinutes value. - */ - public Integer crashConsistentFrequencyInMinutes() { - return this.crashConsistentFrequencyInMinutes; - } - - /** - * Set the crashConsistentFrequencyInMinutes property: 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 appConsistentFrequencyInMinutes property: The app consistent snapshot frequency (in minutes). - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: 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 the multiVmSyncStatus property: A value indicating whether multi-VM sync has to be enabled. Value should be - * 'Enabled' or 'Disabled'. - * - * @return the multiVmSyncStatus value. - */ - public SetMultiVmSyncStatus multiVmSyncStatus() { - return this.multiVmSyncStatus; - } - - /** - * Set the multiVmSyncStatus property: A value indicating whether multi-VM sync has to be enabled. Value should be - * 'Enabled' or 'Disabled'. - * - * @param multiVmSyncStatus the multiVmSyncStatus value to set. - * @return the InMageAzureV2PolicyInput object itself. - */ - public InMageAzureV2PolicyInput withMultiVmSyncStatus(SetMultiVmSyncStatus multiVmSyncStatus) { - this.multiVmSyncStatus = multiVmSyncStatus; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (multiVmSyncStatus() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property multiVmSyncStatus in model InMageAzureV2PolicyInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageAzureV2PolicyInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("multiVmSyncStatus", - this.multiVmSyncStatus == null ? null : this.multiVmSyncStatus.toString()); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPointThresholdInMinutes", this.recoveryPointThresholdInMinutes); - jsonWriter.writeNumberField("recoveryPointHistory", this.recoveryPointHistory); - jsonWriter.writeNumberField("crashConsistentFrequencyInMinutes", this.crashConsistentFrequencyInMinutes); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2PolicyInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2PolicyInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageAzureV2PolicyInput. - */ - public static InMageAzureV2PolicyInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2PolicyInput deserializedInMageAzureV2PolicyInput = new InMageAzureV2PolicyInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("multiVmSyncStatus".equals(fieldName)) { - deserializedInMageAzureV2PolicyInput.multiVmSyncStatus - = SetMultiVmSyncStatus.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedInMageAzureV2PolicyInput.instanceType = reader.getString(); - } else if ("recoveryPointThresholdInMinutes".equals(fieldName)) { - deserializedInMageAzureV2PolicyInput.recoveryPointThresholdInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("recoveryPointHistory".equals(fieldName)) { - deserializedInMageAzureV2PolicyInput.recoveryPointHistory = reader.getNullable(JsonReader::getInt); - } else if ("crashConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageAzureV2PolicyInput.crashConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageAzureV2PolicyInput.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2PolicyInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ProtectedDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ProtectedDiskDetails.java deleted file mode 100644 index 10d6f04a8631..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ProtectedDiskDetails.java +++ /dev/null @@ -1,737 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * InMageAzureV2 protected disk details. - */ -@Fluent -public final class InMageAzureV2ProtectedDiskDetails implements JsonSerializable { - /* - * The disk id. - */ - private String diskId; - - /* - * The disk name. - */ - private String diskName; - - /* - * The protection stage. - */ - private String protectionStage; - - /* - * The health error code for the disk. - */ - private String healthErrorCode; - - /* - * The RPO in seconds. - */ - private Long rpoInSeconds; - - /* - * A value indicating whether resync is required for this disk. - */ - private String resyncRequired; - - /* - * The resync progress percentage. - */ - private Integer resyncProgressPercentage; - - /* - * The resync duration in seconds. - */ - private Long resyncDurationInSeconds; - - /* - * The disk capacity in bytes. - */ - private Long diskCapacityInBytes; - - /* - * The disk file system capacity in bytes. - */ - private Long fileSystemCapacityInBytes; - - /* - * The source data transit in MB. - */ - private Double sourceDataInMegaBytes; - - /* - * The PS data transit in MB. - */ - private Double psDataInMegaBytes; - - /* - * The target data transit in MB. - */ - private Double targetDataInMegaBytes; - - /* - * A value indicating whether disk is resized. - */ - private String diskResized; - - /* - * The last RPO calculated time. - */ - private OffsetDateTime lastRpoCalculatedTime; - - /* - * The resync processed bytes. - */ - private Long resyncProcessedBytes; - - /* - * The resync total transferred bytes. - */ - private Long resyncTotalTransferredBytes; - - /* - * The resync last 15 minutes transferred bytes. - */ - private Long resyncLast15MinutesTransferredBytes; - - /* - * The last data transfer time in UTC. - */ - private OffsetDateTime resyncLastDataTransferTimeUtc; - - /* - * The resync start time. - */ - private OffsetDateTime resyncStartTime; - - /* - * The Progress Health. - */ - private String progressHealth; - - /* - * The Progress Status. - */ - private String progressStatus; - - /* - * The seconds to take for switch provider. - */ - private Long secondsToTakeSwitchProvider; - - /** - * Creates an instance of InMageAzureV2ProtectedDiskDetails class. - */ - public InMageAzureV2ProtectedDiskDetails() { - } - - /** - * Get the diskId property: The disk id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: 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 diskName property: The disk name. - * - * @return the diskName value. - */ - public String diskName() { - return this.diskName; - } - - /** - * Set the diskName property: 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 protectionStage property: The protection stage. - * - * @return the protectionStage value. - */ - public String protectionStage() { - return this.protectionStage; - } - - /** - * Set the protectionStage property: 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 healthErrorCode property: The health error code for the disk. - * - * @return the healthErrorCode value. - */ - public String healthErrorCode() { - return this.healthErrorCode; - } - - /** - * Set the healthErrorCode property: 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 rpoInSeconds property: The RPO in seconds. - * - * @return the rpoInSeconds value. - */ - public Long rpoInSeconds() { - return this.rpoInSeconds; - } - - /** - * Set the rpoInSeconds property: 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 the resyncRequired property: A value indicating whether resync is required for this disk. - * - * @return the resyncRequired value. - */ - public String resyncRequired() { - return this.resyncRequired; - } - - /** - * Set the resyncRequired property: 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 resyncProgressPercentage property: The resync progress percentage. - * - * @return the resyncProgressPercentage value. - */ - public Integer resyncProgressPercentage() { - return this.resyncProgressPercentage; - } - - /** - * Set the resyncProgressPercentage property: 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 resyncDurationInSeconds property: The resync duration in seconds. - * - * @return the resyncDurationInSeconds value. - */ - public Long resyncDurationInSeconds() { - return this.resyncDurationInSeconds; - } - - /** - * Set the resyncDurationInSeconds property: 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 diskCapacityInBytes property: The disk capacity in bytes. - * - * @return the diskCapacityInBytes value. - */ - public Long diskCapacityInBytes() { - return this.diskCapacityInBytes; - } - - /** - * Set the diskCapacityInBytes property: 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 fileSystemCapacityInBytes property: The disk file system capacity in bytes. - * - * @return the fileSystemCapacityInBytes value. - */ - public Long fileSystemCapacityInBytes() { - return this.fileSystemCapacityInBytes; - } - - /** - * Set the fileSystemCapacityInBytes property: 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 sourceDataInMegaBytes property: The source data transit in MB. - * - * @return the sourceDataInMegaBytes value. - */ - public Double sourceDataInMegaBytes() { - return this.sourceDataInMegaBytes; - } - - /** - * Set the sourceDataInMegaBytes property: 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 psDataInMegaBytes property: The PS data transit in MB. - * - * @return the psDataInMegaBytes value. - */ - public Double psDataInMegaBytes() { - return this.psDataInMegaBytes; - } - - /** - * Set the psDataInMegaBytes property: 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 targetDataInMegaBytes property: The target data transit in MB. - * - * @return the targetDataInMegaBytes value. - */ - public Double targetDataInMegaBytes() { - return this.targetDataInMegaBytes; - } - - /** - * Set the targetDataInMegaBytes property: 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 the diskResized property: A value indicating whether disk is resized. - * - * @return the diskResized value. - */ - public String diskResized() { - return this.diskResized; - } - - /** - * Set the diskResized property: 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 lastRpoCalculatedTime property: The last RPO calculated time. - * - * @return the lastRpoCalculatedTime value. - */ - public OffsetDateTime lastRpoCalculatedTime() { - return this.lastRpoCalculatedTime; - } - - /** - * Set the lastRpoCalculatedTime property: The last RPO calculated time. - * - * @param lastRpoCalculatedTime the lastRpoCalculatedTime value to set. - * @return the InMageAzureV2ProtectedDiskDetails object itself. - */ - public InMageAzureV2ProtectedDiskDetails withLastRpoCalculatedTime(OffsetDateTime lastRpoCalculatedTime) { - this.lastRpoCalculatedTime = lastRpoCalculatedTime; - return this; - } - - /** - * Get the resyncProcessedBytes property: The resync processed bytes. - * - * @return the resyncProcessedBytes value. - */ - public Long resyncProcessedBytes() { - return this.resyncProcessedBytes; - } - - /** - * Set the resyncProcessedBytes property: The resync processed bytes. - * - * @param resyncProcessedBytes the resyncProcessedBytes value to set. - * @return the InMageAzureV2ProtectedDiskDetails object itself. - */ - public InMageAzureV2ProtectedDiskDetails withResyncProcessedBytes(Long resyncProcessedBytes) { - this.resyncProcessedBytes = resyncProcessedBytes; - return this; - } - - /** - * Get the resyncTotalTransferredBytes property: The resync total transferred bytes. - * - * @return the resyncTotalTransferredBytes value. - */ - public Long resyncTotalTransferredBytes() { - return this.resyncTotalTransferredBytes; - } - - /** - * Set the resyncTotalTransferredBytes property: The resync total transferred bytes. - * - * @param resyncTotalTransferredBytes the resyncTotalTransferredBytes value to set. - * @return the InMageAzureV2ProtectedDiskDetails object itself. - */ - public InMageAzureV2ProtectedDiskDetails withResyncTotalTransferredBytes(Long resyncTotalTransferredBytes) { - this.resyncTotalTransferredBytes = resyncTotalTransferredBytes; - return this; - } - - /** - * Get the resyncLast15MinutesTransferredBytes property: The resync last 15 minutes transferred bytes. - * - * @return the resyncLast15MinutesTransferredBytes value. - */ - public Long resyncLast15MinutesTransferredBytes() { - return this.resyncLast15MinutesTransferredBytes; - } - - /** - * Set the resyncLast15MinutesTransferredBytes property: The resync last 15 minutes transferred bytes. - * - * @param resyncLast15MinutesTransferredBytes the resyncLast15MinutesTransferredBytes value to set. - * @return the InMageAzureV2ProtectedDiskDetails object itself. - */ - public InMageAzureV2ProtectedDiskDetails - withResyncLast15MinutesTransferredBytes(Long resyncLast15MinutesTransferredBytes) { - this.resyncLast15MinutesTransferredBytes = resyncLast15MinutesTransferredBytes; - return this; - } - - /** - * Get the resyncLastDataTransferTimeUtc property: The last data transfer time in UTC. - * - * @return the resyncLastDataTransferTimeUtc value. - */ - public OffsetDateTime resyncLastDataTransferTimeUtc() { - return this.resyncLastDataTransferTimeUtc; - } - - /** - * Set the resyncLastDataTransferTimeUtc property: The last data transfer time in UTC. - * - * @param resyncLastDataTransferTimeUtc the resyncLastDataTransferTimeUtc value to set. - * @return the InMageAzureV2ProtectedDiskDetails object itself. - */ - public InMageAzureV2ProtectedDiskDetails - withResyncLastDataTransferTimeUtc(OffsetDateTime resyncLastDataTransferTimeUtc) { - this.resyncLastDataTransferTimeUtc = resyncLastDataTransferTimeUtc; - return this; - } - - /** - * Get the resyncStartTime property: The resync start time. - * - * @return the resyncStartTime value. - */ - public OffsetDateTime resyncStartTime() { - return this.resyncStartTime; - } - - /** - * Set the resyncStartTime property: The resync start time. - * - * @param resyncStartTime the resyncStartTime value to set. - * @return the InMageAzureV2ProtectedDiskDetails object itself. - */ - public InMageAzureV2ProtectedDiskDetails withResyncStartTime(OffsetDateTime resyncStartTime) { - this.resyncStartTime = resyncStartTime; - return this; - } - - /** - * Get the progressHealth property: The Progress Health. - * - * @return the progressHealth value. - */ - public String progressHealth() { - return this.progressHealth; - } - - /** - * Set the progressHealth property: The Progress Health. - * - * @param progressHealth the progressHealth value to set. - * @return the InMageAzureV2ProtectedDiskDetails object itself. - */ - public InMageAzureV2ProtectedDiskDetails withProgressHealth(String progressHealth) { - this.progressHealth = progressHealth; - return this; - } - - /** - * Get the progressStatus property: The Progress Status. - * - * @return the progressStatus value. - */ - public String progressStatus() { - return this.progressStatus; - } - - /** - * Set the progressStatus property: The Progress Status. - * - * @param progressStatus the progressStatus value to set. - * @return the InMageAzureV2ProtectedDiskDetails object itself. - */ - public InMageAzureV2ProtectedDiskDetails withProgressStatus(String progressStatus) { - this.progressStatus = progressStatus; - return this; - } - - /** - * Get the secondsToTakeSwitchProvider property: The seconds to take for switch provider. - * - * @return the secondsToTakeSwitchProvider value. - */ - public Long secondsToTakeSwitchProvider() { - return this.secondsToTakeSwitchProvider; - } - - /** - * Set the secondsToTakeSwitchProvider property: The seconds to take for switch provider. - * - * @param secondsToTakeSwitchProvider the secondsToTakeSwitchProvider value to set. - * @return the InMageAzureV2ProtectedDiskDetails object itself. - */ - public InMageAzureV2ProtectedDiskDetails withSecondsToTakeSwitchProvider(Long secondsToTakeSwitchProvider) { - this.secondsToTakeSwitchProvider = secondsToTakeSwitchProvider; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("diskName", this.diskName); - jsonWriter.writeStringField("protectionStage", this.protectionStage); - jsonWriter.writeStringField("healthErrorCode", this.healthErrorCode); - jsonWriter.writeNumberField("rpoInSeconds", this.rpoInSeconds); - jsonWriter.writeStringField("resyncRequired", this.resyncRequired); - jsonWriter.writeNumberField("resyncProgressPercentage", this.resyncProgressPercentage); - jsonWriter.writeNumberField("resyncDurationInSeconds", this.resyncDurationInSeconds); - jsonWriter.writeNumberField("diskCapacityInBytes", this.diskCapacityInBytes); - jsonWriter.writeNumberField("fileSystemCapacityInBytes", this.fileSystemCapacityInBytes); - jsonWriter.writeNumberField("sourceDataInMegaBytes", this.sourceDataInMegaBytes); - jsonWriter.writeNumberField("psDataInMegaBytes", this.psDataInMegaBytes); - jsonWriter.writeNumberField("targetDataInMegaBytes", this.targetDataInMegaBytes); - jsonWriter.writeStringField("diskResized", this.diskResized); - jsonWriter.writeStringField("lastRpoCalculatedTime", - this.lastRpoCalculatedTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastRpoCalculatedTime)); - jsonWriter.writeNumberField("resyncProcessedBytes", this.resyncProcessedBytes); - jsonWriter.writeNumberField("resyncTotalTransferredBytes", this.resyncTotalTransferredBytes); - jsonWriter.writeNumberField("resyncLast15MinutesTransferredBytes", this.resyncLast15MinutesTransferredBytes); - jsonWriter.writeStringField("resyncLastDataTransferTimeUTC", - this.resyncLastDataTransferTimeUtc == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.resyncLastDataTransferTimeUtc)); - jsonWriter.writeStringField("resyncStartTime", - this.resyncStartTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.resyncStartTime)); - jsonWriter.writeStringField("progressHealth", this.progressHealth); - jsonWriter.writeStringField("progressStatus", this.progressStatus); - jsonWriter.writeNumberField("secondsToTakeSwitchProvider", this.secondsToTakeSwitchProvider); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2ProtectedDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2ProtectedDiskDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2ProtectedDiskDetails. - */ - public static InMageAzureV2ProtectedDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2ProtectedDiskDetails deserializedInMageAzureV2ProtectedDiskDetails - = new InMageAzureV2ProtectedDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.diskId = reader.getString(); - } else if ("diskName".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.diskName = reader.getString(); - } else if ("protectionStage".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.protectionStage = reader.getString(); - } else if ("healthErrorCode".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.healthErrorCode = reader.getString(); - } else if ("rpoInSeconds".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.rpoInSeconds - = reader.getNullable(JsonReader::getLong); - } else if ("resyncRequired".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.resyncRequired = reader.getString(); - } else if ("resyncProgressPercentage".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.resyncProgressPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("resyncDurationInSeconds".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.resyncDurationInSeconds - = reader.getNullable(JsonReader::getLong); - } else if ("diskCapacityInBytes".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.diskCapacityInBytes - = reader.getNullable(JsonReader::getLong); - } else if ("fileSystemCapacityInBytes".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.fileSystemCapacityInBytes - = reader.getNullable(JsonReader::getLong); - } else if ("sourceDataInMegaBytes".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.sourceDataInMegaBytes - = reader.getNullable(JsonReader::getDouble); - } else if ("psDataInMegaBytes".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.psDataInMegaBytes - = reader.getNullable(JsonReader::getDouble); - } else if ("targetDataInMegaBytes".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.targetDataInMegaBytes - = reader.getNullable(JsonReader::getDouble); - } else if ("diskResized".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.diskResized = reader.getString(); - } else if ("lastRpoCalculatedTime".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.lastRpoCalculatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resyncProcessedBytes".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.resyncProcessedBytes - = reader.getNullable(JsonReader::getLong); - } else if ("resyncTotalTransferredBytes".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.resyncTotalTransferredBytes - = reader.getNullable(JsonReader::getLong); - } else if ("resyncLast15MinutesTransferredBytes".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.resyncLast15MinutesTransferredBytes - = reader.getNullable(JsonReader::getLong); - } else if ("resyncLastDataTransferTimeUTC".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.resyncLastDataTransferTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resyncStartTime".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.resyncStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("progressHealth".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.progressHealth = reader.getString(); - } else if ("progressStatus".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.progressStatus = reader.getString(); - } else if ("secondsToTakeSwitchProvider".equals(fieldName)) { - deserializedInMageAzureV2ProtectedDiskDetails.secondsToTakeSwitchProvider - = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2ProtectedDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2RecoveryPointDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2RecoveryPointDetails.java deleted file mode 100644 index 09de7541cd05..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2RecoveryPointDetails.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMage Azure V2 provider specific recovery point details. - */ -@Fluent -public final class InMageAzureV2RecoveryPointDetails extends ProviderSpecificRecoveryPointDetails { - /* - * Gets the provider type. - */ - private String instanceType = "InMageAzureV2"; - - /* - * A value indicating whether the recovery point is multi VM consistent. - */ - private String isMultiVmSyncPoint; - - /** - * Creates an instance of InMageAzureV2RecoveryPointDetails class. - */ - public InMageAzureV2RecoveryPointDetails() { - } - - /** - * Get the instanceType property: Gets the provider type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the isMultiVmSyncPoint property: A value indicating whether the recovery point is multi VM consistent. - * - * @return the isMultiVmSyncPoint value. - */ - public String isMultiVmSyncPoint() { - return this.isMultiVmSyncPoint; - } - - /** - * Set the isMultiVmSyncPoint property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("isMultiVmSyncPoint", this.isMultiVmSyncPoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2RecoveryPointDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2RecoveryPointDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2RecoveryPointDetails. - */ - public static InMageAzureV2RecoveryPointDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2RecoveryPointDetails deserializedInMageAzureV2RecoveryPointDetails - = new InMageAzureV2RecoveryPointDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageAzureV2RecoveryPointDetails.instanceType = reader.getString(); - } else if ("isMultiVmSyncPoint".equals(fieldName)) { - deserializedInMageAzureV2RecoveryPointDetails.isMultiVmSyncPoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2RecoveryPointDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ReplicationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ReplicationDetails.java deleted file mode 100644 index 9b1e267e3ae9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ReplicationDetails.java +++ /dev/null @@ -1,2125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * InMageAzureV2 provider specific settings. - */ -@Fluent -public final class InMageAzureV2ReplicationDetails extends ReplicationProviderSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "InMageAzureV2"; - - /* - * The infrastructure VM Id. - */ - private String infrastructureVmId; - - /* - * The vCenter infrastructure Id. - */ - private String vCenterInfrastructureId; - - /* - * The protection stage. - */ - private String protectionStage; - - /* - * The virtual machine Id. - */ - private String vmId; - - /* - * The protection state for the vm. - */ - private String vmProtectionState; - - /* - * The protection state description for the vm. - */ - private String vmProtectionStateDescription; - - /* - * The resync progress percentage. - */ - private Integer resyncProgressPercentage; - - /* - * The RPO in seconds. - */ - private Long rpoInSeconds; - - /* - * The compressed data change rate in MB. - */ - private Double compressedDataRateInMB; - - /* - * The uncompressed data change rate in MB. - */ - private Double uncompressedDataRateInMB; - - /* - * The source IP address. - */ - private String ipAddress; - - /* - * The agent version. - */ - private String agentVersion; - - /* - * Agent expiry date. - */ - private OffsetDateTime agentExpiryDate; - - /* - * A value indicating whether installed agent needs to be updated. - */ - private String isAgentUpdateRequired; - - /* - * A value indicating whether the source server requires a restart after update. - */ - private String isRebootAfterUpdateRequired; - - /* - * The last heartbeat received from the source server. - */ - private OffsetDateTime lastHeartbeat; - - /* - * The process server Id. - */ - private String processServerId; - - /* - * The process server name. - */ - private String processServerName; - - /* - * The multi vm group Id. - */ - private String multiVmGroupId; - - /* - * The multi vm group name. - */ - private String multiVmGroupName; - - /* - * A value indicating whether multi vm sync is enabled or disabled. - */ - private String multiVmSyncStatus; - - /* - * The list of protected disks. - */ - private List protectedDisks; - - /* - * A value indicating whether any disk is resized for this VM. - */ - private String diskResized; - - /* - * The master target Id. - */ - private String masterTargetId; - - /* - * The CPU count of the VM on the primary side. - */ - private Integer sourceVmCpuCount; - - /* - * The RAM size of the VM on the primary side. - */ - private Integer sourceVmRamSizeInMB; - - /* - * The type of the OS on the VM. - */ - private String osType; - - /* - * The OS disk VHD name. - */ - private String vhdName; - - /* - * The id of the disk containing the OS. - */ - private String osDiskId; - - /* - * Azure VM Disk details. - */ - private List azureVMDiskDetails; - - /* - * Recovery Azure given name. - */ - private String recoveryAzureVMName; - - /* - * The Recovery Azure VM size. - */ - private String recoveryAzureVMSize; - - /* - * The recovery Azure storage account. - */ - 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. - */ - private String recoveryAzureLogStorageAccountId; - - /* - * The PE Network details. - */ - private List vmNics; - - /* - * The selected recovery azure network Id. - */ - private String selectedRecoveryAzureNetworkId; - - /* - * The test failover virtual network. - */ - private String selectedTfoAzureNetworkId; - - /* - * The selected source nic Id which will be used as the primary nic during failover. - */ - private String selectedSourceNicId; - - /* - * A value indicating the discovery type of the machine. Value can be vCenter or physical. - */ - private String discoveryType; - - /* - * The selected option to enable RDP\SSH on target vm after failover. String value of - * SrsDataContract.EnableRDPOnTargetOption enum. - */ - private String enableRdpOnTargetOption; - - /* - * The datastores of the on-premise machine. Value can be list of strings that contain datastore names. - */ - 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. - */ - private String targetVmId; - - /* - * The target resource group Id. - */ - private String recoveryAzureResourceGroupId; - - /* - * The recovery availability set Id. - */ - private String recoveryAvailabilitySetId; - - /* - * The target availability zone. - */ - private String targetAvailabilityZone; - - /* - * The target proximity placement group Id. - */ - private String targetProximityPlacementGroupId; - - /* - * A value indicating whether managed disks should be used during failover. - */ - private String useManagedDisks; - - /* - * License Type of the VM to be used. - */ - private String licenseType; - - /* - * The SQL Server license type. - */ - private String sqlServerLicenseType; - - /* - * The validation errors of the on-premise machine Value can be list of validation errors. - */ - private List validationErrors; - - /* - * The last RPO calculated time. - */ - private OffsetDateTime lastRpoCalculatedTime; - - /* - * The last update time received from on-prem components. - */ - private OffsetDateTime lastUpdateReceivedTime; - - /* - * The replica id of the protected item. - */ - private String replicaId; - - /* - * The OS Version of the protected item. - */ - private String osVersion; - - /* - * The list of protected managed disks. - */ - private List protectedManagedDisks; - - /* - * The last recovery point received time. - */ - private OffsetDateTime lastRecoveryPointReceived; - - /* - * The firmware type of this protected item. - */ - private String firmwareType; - - /* - * The target generation for this protected item. - */ - private String azureVmGeneration; - - /* - * A value indicating whether additional IR stats are available or not. - */ - private Boolean isAdditionalStatsAvailable; - - /* - * The total transferred data in bytes. - */ - private Long totalDataTransferred; - - /* - * The progress health. - */ - private String totalProgressHealth; - - /* - * The target VM tags. - */ - private Map targetVmTags; - - /* - * The tags for the seed managed disks. - */ - private Map seedManagedDiskTags; - - /* - * The tags for the target managed disks. - */ - private Map targetManagedDiskTags; - - /* - * The tags for the target NICs. - */ - private Map targetNicTags; - - /* - * The switch provider blocking error information. - */ - private List switchProviderBlockingErrorDetails; - - /* - * The switch provider blocking error information. - */ - private InMageAzureV2SwitchProviderDetails switchProviderDetails; - - /* - * A value indicating the inplace OS Upgrade version. - */ - private List supportedOSVersions; - - /* - * A value indicating all available inplace OS Upgrade configurations. - */ - private List allAvailableOSUpgradeConfigurations; - - /* - * The name of the OS on the VM. - */ - private String osName; - - /** - * Creates an instance of InMageAzureV2ReplicationDetails class. - */ - public InMageAzureV2ReplicationDetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the infrastructureVmId property: The infrastructure VM Id. - * - * @return the infrastructureVmId value. - */ - public String infrastructureVmId() { - return this.infrastructureVmId; - } - - /** - * Set the infrastructureVmId property: 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 vCenterInfrastructureId property: The vCenter infrastructure Id. - * - * @return the vCenterInfrastructureId value. - */ - public String vCenterInfrastructureId() { - return this.vCenterInfrastructureId; - } - - /** - * Set the vCenterInfrastructureId property: 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 protectionStage property: The protection stage. - * - * @return the protectionStage value. - */ - public String protectionStage() { - return this.protectionStage; - } - - /** - * Set the protectionStage property: 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 vmId property: The virtual machine Id. - * - * @return the vmId value. - */ - public String vmId() { - return this.vmId; - } - - /** - * Set the vmId property: 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 vmProtectionState property: The protection state for the vm. - * - * @return the vmProtectionState value. - */ - public String vmProtectionState() { - return this.vmProtectionState; - } - - /** - * Set the vmProtectionState property: 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 vmProtectionStateDescription property: The protection state description for the vm. - * - * @return the vmProtectionStateDescription value. - */ - public String vmProtectionStateDescription() { - return this.vmProtectionStateDescription; - } - - /** - * Set the vmProtectionStateDescription property: 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 resyncProgressPercentage property: The resync progress percentage. - * - * @return the resyncProgressPercentage value. - */ - public Integer resyncProgressPercentage() { - return this.resyncProgressPercentage; - } - - /** - * Set the resyncProgressPercentage property: 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 rpoInSeconds property: The RPO in seconds. - * - * @return the rpoInSeconds value. - */ - public Long rpoInSeconds() { - return this.rpoInSeconds; - } - - /** - * Set the rpoInSeconds property: 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 compressedDataRateInMB property: The compressed data change rate in MB. - * - * @return the compressedDataRateInMB value. - */ - public Double compressedDataRateInMB() { - return this.compressedDataRateInMB; - } - - /** - * Set the compressedDataRateInMB property: 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 uncompressedDataRateInMB property: The uncompressed data change rate in MB. - * - * @return the uncompressedDataRateInMB value. - */ - public Double uncompressedDataRateInMB() { - return this.uncompressedDataRateInMB; - } - - /** - * Set the uncompressedDataRateInMB property: 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 ipAddress property: The source IP address. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: 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 agentVersion property: The agent version. - * - * @return the agentVersion value. - */ - public String agentVersion() { - return this.agentVersion; - } - - /** - * Set the agentVersion property: 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 the agentExpiryDate property: Agent expiry date. - * - * @return the agentExpiryDate value. - */ - public OffsetDateTime agentExpiryDate() { - return this.agentExpiryDate; - } - - /** - * Set the agentExpiryDate property: Agent expiry date. - * - * @param agentExpiryDate the agentExpiryDate value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withAgentExpiryDate(OffsetDateTime agentExpiryDate) { - this.agentExpiryDate = agentExpiryDate; - return this; - } - - /** - * Get the isAgentUpdateRequired property: A value indicating whether installed agent needs to be updated. - * - * @return the isAgentUpdateRequired value. - */ - public String isAgentUpdateRequired() { - return this.isAgentUpdateRequired; - } - - /** - * Set the isAgentUpdateRequired property: 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 the isRebootAfterUpdateRequired property: A value indicating whether the source server requires a restart - * after update. - * - * @return the isRebootAfterUpdateRequired value. - */ - public String isRebootAfterUpdateRequired() { - return this.isRebootAfterUpdateRequired; - } - - /** - * Set the isRebootAfterUpdateRequired property: 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 lastHeartbeat property: The last heartbeat received from the source server. - * - * @return the lastHeartbeat value. - */ - public OffsetDateTime lastHeartbeat() { - return this.lastHeartbeat; - } - - /** - * Set the lastHeartbeat property: The last heartbeat received from the source server. - * - * @param lastHeartbeat the lastHeartbeat value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withLastHeartbeat(OffsetDateTime lastHeartbeat) { - this.lastHeartbeat = lastHeartbeat; - return this; - } - - /** - * Get the processServerId property: The process server Id. - * - * @return the processServerId value. - */ - public String processServerId() { - return this.processServerId; - } - - /** - * Set the processServerId property: 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 processServerName property: The process server name. - * - * @return the processServerName value. - */ - public String processServerName() { - return this.processServerName; - } - - /** - * Set the processServerName property: The process server name. - * - * @param processServerName the processServerName value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withProcessServerName(String processServerName) { - this.processServerName = processServerName; - return this; - } - - /** - * Get the multiVmGroupId property: The multi vm group Id. - * - * @return the multiVmGroupId value. - */ - public String multiVmGroupId() { - return this.multiVmGroupId; - } - - /** - * Set the multiVmGroupId property: 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 multiVmGroupName property: The multi vm group name. - * - * @return the multiVmGroupName value. - */ - public String multiVmGroupName() { - return this.multiVmGroupName; - } - - /** - * Set the multiVmGroupName property: 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 the multiVmSyncStatus property: A value indicating whether multi vm sync is enabled or disabled. - * - * @return the multiVmSyncStatus value. - */ - public String multiVmSyncStatus() { - return this.multiVmSyncStatus; - } - - /** - * Set the multiVmSyncStatus property: 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 protectedDisks property: The list of protected disks. - * - * @return the protectedDisks value. - */ - public List protectedDisks() { - return this.protectedDisks; - } - - /** - * Set the protectedDisks property: 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 the diskResized property: A value indicating whether any disk is resized for this VM. - * - * @return the diskResized value. - */ - public String diskResized() { - return this.diskResized; - } - - /** - * Set the diskResized property: 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 masterTargetId property: The master target Id. - * - * @return the masterTargetId value. - */ - public String masterTargetId() { - return this.masterTargetId; - } - - /** - * Set the masterTargetId property: 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 sourceVmCpuCount property: The CPU count of the VM on the primary side. - * - * @return the sourceVmCpuCount value. - */ - public Integer sourceVmCpuCount() { - return this.sourceVmCpuCount; - } - - /** - * Set the sourceVmCpuCount property: 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 sourceVmRamSizeInMB property: The RAM size of the VM on the primary side. - * - * @return the sourceVmRamSizeInMB value. - */ - public Integer sourceVmRamSizeInMB() { - return this.sourceVmRamSizeInMB; - } - - /** - * Set the sourceVmRamSizeInMB property: 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 osType property: The type of the OS on the VM. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: 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 vhdName property: The OS disk VHD name. - * - * @return the vhdName value. - */ - public String vhdName() { - return this.vhdName; - } - - /** - * Set the vhdName property: 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 osDiskId property: The id of the disk containing the OS. - * - * @return the osDiskId value. - */ - public String osDiskId() { - return this.osDiskId; - } - - /** - * Set the osDiskId property: 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 the azureVMDiskDetails property: Azure VM Disk details. - * - * @return the azureVMDiskDetails value. - */ - public List azureVMDiskDetails() { - return this.azureVMDiskDetails; - } - - /** - * Set the azureVMDiskDetails property: 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 the recoveryAzureVMName property: Recovery Azure given name. - * - * @return the recoveryAzureVMName value. - */ - public String recoveryAzureVMName() { - return this.recoveryAzureVMName; - } - - /** - * Set the recoveryAzureVMName property: 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 recoveryAzureVMSize property: The Recovery Azure VM size. - * - * @return the recoveryAzureVMSize value. - */ - public String recoveryAzureVMSize() { - return this.recoveryAzureVMSize; - } - - /** - * Set the recoveryAzureVMSize property: 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 recoveryAzureStorageAccount property: The recovery Azure storage account. - * - * @return the recoveryAzureStorageAccount value. - */ - public String recoveryAzureStorageAccount() { - return this.recoveryAzureStorageAccount; - } - - /** - * Set the recoveryAzureStorageAccount property: 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 recoveryAzureLogStorageAccountId property: 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 recoveryAzureLogStorageAccountId property: 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 vmNics property: The PE Network details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: 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 selectedRecoveryAzureNetworkId property: The selected recovery azure network Id. - * - * @return the selectedRecoveryAzureNetworkId value. - */ - public String selectedRecoveryAzureNetworkId() { - return this.selectedRecoveryAzureNetworkId; - } - - /** - * Set the selectedRecoveryAzureNetworkId property: 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 the selectedTfoAzureNetworkId property: The test failover virtual network. - * - * @return the selectedTfoAzureNetworkId value. - */ - public String selectedTfoAzureNetworkId() { - return this.selectedTfoAzureNetworkId; - } - - /** - * Set the selectedTfoAzureNetworkId property: The test failover virtual network. - * - * @param selectedTfoAzureNetworkId the selectedTfoAzureNetworkId value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withSelectedTfoAzureNetworkId(String selectedTfoAzureNetworkId) { - this.selectedTfoAzureNetworkId = selectedTfoAzureNetworkId; - return this; - } - - /** - * Get the selectedSourceNicId property: The selected source nic Id which will be used as the primary nic during - * failover. - * - * @return the selectedSourceNicId value. - */ - public String selectedSourceNicId() { - return this.selectedSourceNicId; - } - - /** - * Set the selectedSourceNicId property: The selected source nic Id which will be used as the primary nic during - * failover. - * - * @param selectedSourceNicId the selectedSourceNicId value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withSelectedSourceNicId(String selectedSourceNicId) { - this.selectedSourceNicId = selectedSourceNicId; - return this; - } - - /** - * Get the discoveryType property: 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 the discoveryType property: 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 enableRdpOnTargetOption property: 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 enableRdpOnTargetOption property: 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 property: 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 property: 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 targetVmId property: 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 targetVmId property: 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 recoveryAzureResourceGroupId property: The target resource group Id. - * - * @return the recoveryAzureResourceGroupId value. - */ - public String recoveryAzureResourceGroupId() { - return this.recoveryAzureResourceGroupId; - } - - /** - * Set the recoveryAzureResourceGroupId property: 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 recoveryAvailabilitySetId property: The recovery availability set Id. - * - * @return the recoveryAvailabilitySetId value. - */ - public String recoveryAvailabilitySetId() { - return this.recoveryAvailabilitySetId; - } - - /** - * Set the recoveryAvailabilitySetId property: 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 the targetAvailabilityZone property: The target availability zone. - * - * @return the targetAvailabilityZone value. - */ - public String targetAvailabilityZone() { - return this.targetAvailabilityZone; - } - - /** - * Set the targetAvailabilityZone property: The target availability zone. - * - * @param targetAvailabilityZone the targetAvailabilityZone value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withTargetAvailabilityZone(String targetAvailabilityZone) { - this.targetAvailabilityZone = targetAvailabilityZone; - return this; - } - - /** - * Get the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @return the targetProximityPlacementGroupId value. - */ - public String targetProximityPlacementGroupId() { - return this.targetProximityPlacementGroupId; - } - - /** - * Set the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) { - this.targetProximityPlacementGroupId = targetProximityPlacementGroupId; - return this; - } - - /** - * Get the useManagedDisks property: A value indicating whether managed disks should be used during failover. - * - * @return the useManagedDisks value. - */ - public String useManagedDisks() { - return this.useManagedDisks; - } - - /** - * Set the useManagedDisks property: 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 the licenseType property: License Type of the VM to be used. - * - * @return the licenseType value. - */ - public String licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: 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 sqlServerLicenseType property: The SQL Server license type. - * - * @return the sqlServerLicenseType value. - */ - public String sqlServerLicenseType() { - return this.sqlServerLicenseType; - } - - /** - * Set the sqlServerLicenseType property: The SQL Server license type. - * - * @param sqlServerLicenseType the sqlServerLicenseType value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withSqlServerLicenseType(String sqlServerLicenseType) { - this.sqlServerLicenseType = sqlServerLicenseType; - return this; - } - - /** - * Get the validationErrors property: 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 validationErrors property: 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 lastRpoCalculatedTime property: The last RPO calculated time. - * - * @return the lastRpoCalculatedTime value. - */ - public OffsetDateTime lastRpoCalculatedTime() { - return this.lastRpoCalculatedTime; - } - - /** - * Set the lastRpoCalculatedTime property: The last RPO calculated time. - * - * @param lastRpoCalculatedTime the lastRpoCalculatedTime value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withLastRpoCalculatedTime(OffsetDateTime lastRpoCalculatedTime) { - this.lastRpoCalculatedTime = lastRpoCalculatedTime; - return this; - } - - /** - * Get the lastUpdateReceivedTime property: The last update time received from on-prem components. - * - * @return the lastUpdateReceivedTime value. - */ - public OffsetDateTime lastUpdateReceivedTime() { - return this.lastUpdateReceivedTime; - } - - /** - * Set the lastUpdateReceivedTime property: The last update time received from on-prem components. - * - * @param lastUpdateReceivedTime the lastUpdateReceivedTime value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withLastUpdateReceivedTime(OffsetDateTime lastUpdateReceivedTime) { - this.lastUpdateReceivedTime = lastUpdateReceivedTime; - return this; - } - - /** - * Get the replicaId property: The replica id of the protected item. - * - * @return the replicaId value. - */ - public String replicaId() { - return this.replicaId; - } - - /** - * Set the replicaId property: 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 osVersion property: The OS Version of the protected item. - * - * @return the osVersion value. - */ - public String osVersion() { - return this.osVersion; - } - - /** - * Set the osVersion property: 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; - } - - /** - * Get the protectedManagedDisks property: The list of protected managed disks. - * - * @return the protectedManagedDisks value. - */ - public List protectedManagedDisks() { - return this.protectedManagedDisks; - } - - /** - * Set the protectedManagedDisks property: The list of protected managed disks. - * - * @param protectedManagedDisks the protectedManagedDisks value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails - withProtectedManagedDisks(List protectedManagedDisks) { - this.protectedManagedDisks = protectedManagedDisks; - return this; - } - - /** - * Get the lastRecoveryPointReceived property: The last recovery point received time. - * - * @return the lastRecoveryPointReceived value. - */ - public OffsetDateTime lastRecoveryPointReceived() { - return this.lastRecoveryPointReceived; - } - - /** - * Get the firmwareType property: The firmware type of this protected item. - * - * @return the firmwareType value. - */ - public String firmwareType() { - return this.firmwareType; - } - - /** - * Set the firmwareType property: The firmware type of this protected item. - * - * @param firmwareType the firmwareType value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withFirmwareType(String firmwareType) { - this.firmwareType = firmwareType; - return this; - } - - /** - * Get the azureVmGeneration property: The target generation for this protected item. - * - * @return the azureVmGeneration value. - */ - public String azureVmGeneration() { - return this.azureVmGeneration; - } - - /** - * Set the azureVmGeneration property: The target generation for this protected item. - * - * @param azureVmGeneration the azureVmGeneration value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withAzureVmGeneration(String azureVmGeneration) { - this.azureVmGeneration = azureVmGeneration; - return this; - } - - /** - * Get the isAdditionalStatsAvailable property: A value indicating whether additional IR stats are available or not. - * - * @return the isAdditionalStatsAvailable value. - */ - public Boolean isAdditionalStatsAvailable() { - return this.isAdditionalStatsAvailable; - } - - /** - * Set the isAdditionalStatsAvailable property: A value indicating whether additional IR stats are available or not. - * - * @param isAdditionalStatsAvailable the isAdditionalStatsAvailable value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withIsAdditionalStatsAvailable(Boolean isAdditionalStatsAvailable) { - this.isAdditionalStatsAvailable = isAdditionalStatsAvailable; - return this; - } - - /** - * Get the totalDataTransferred property: The total transferred data in bytes. - * - * @return the totalDataTransferred value. - */ - public Long totalDataTransferred() { - return this.totalDataTransferred; - } - - /** - * Set the totalDataTransferred property: The total transferred data in bytes. - * - * @param totalDataTransferred the totalDataTransferred value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withTotalDataTransferred(Long totalDataTransferred) { - this.totalDataTransferred = totalDataTransferred; - return this; - } - - /** - * Get the totalProgressHealth property: The progress health. - * - * @return the totalProgressHealth value. - */ - public String totalProgressHealth() { - return this.totalProgressHealth; - } - - /** - * Set the totalProgressHealth property: The progress health. - * - * @param totalProgressHealth the totalProgressHealth value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withTotalProgressHealth(String totalProgressHealth) { - this.totalProgressHealth = totalProgressHealth; - return this; - } - - /** - * Get the targetVmTags property: The target VM tags. - * - * @return the targetVmTags value. - */ - public Map targetVmTags() { - return this.targetVmTags; - } - - /** - * Set the targetVmTags property: The target VM tags. - * - * @param targetVmTags the targetVmTags value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withTargetVmTags(Map targetVmTags) { - this.targetVmTags = targetVmTags; - return this; - } - - /** - * Get the seedManagedDiskTags property: The tags for the seed managed disks. - * - * @return the seedManagedDiskTags value. - */ - public Map seedManagedDiskTags() { - return this.seedManagedDiskTags; - } - - /** - * Set the seedManagedDiskTags property: The tags for the seed managed disks. - * - * @param seedManagedDiskTags the seedManagedDiskTags value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withSeedManagedDiskTags(Map seedManagedDiskTags) { - this.seedManagedDiskTags = seedManagedDiskTags; - return this; - } - - /** - * Get the targetManagedDiskTags property: The tags for the target managed disks. - * - * @return the targetManagedDiskTags value. - */ - public Map targetManagedDiskTags() { - return this.targetManagedDiskTags; - } - - /** - * Set the targetManagedDiskTags property: The tags for the target managed disks. - * - * @param targetManagedDiskTags the targetManagedDiskTags value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withTargetManagedDiskTags(Map targetManagedDiskTags) { - this.targetManagedDiskTags = targetManagedDiskTags; - return this; - } - - /** - * Get the targetNicTags property: The tags for the target NICs. - * - * @return the targetNicTags value. - */ - public Map targetNicTags() { - return this.targetNicTags; - } - - /** - * Set the targetNicTags property: The tags for the target NICs. - * - * @param targetNicTags the targetNicTags value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withTargetNicTags(Map targetNicTags) { - this.targetNicTags = targetNicTags; - return this; - } - - /** - * Get the switchProviderBlockingErrorDetails property: The switch provider blocking error information. - * - * @return the switchProviderBlockingErrorDetails value. - */ - public List switchProviderBlockingErrorDetails() { - return this.switchProviderBlockingErrorDetails; - } - - /** - * Set the switchProviderBlockingErrorDetails property: The switch provider blocking error information. - * - * @param switchProviderBlockingErrorDetails the switchProviderBlockingErrorDetails value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withSwitchProviderBlockingErrorDetails( - List switchProviderBlockingErrorDetails) { - this.switchProviderBlockingErrorDetails = switchProviderBlockingErrorDetails; - return this; - } - - /** - * Get the switchProviderDetails property: The switch provider blocking error information. - * - * @return the switchProviderDetails value. - */ - public InMageAzureV2SwitchProviderDetails switchProviderDetails() { - return this.switchProviderDetails; - } - - /** - * Set the switchProviderDetails property: The switch provider blocking error information. - * - * @param switchProviderDetails the switchProviderDetails value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails - withSwitchProviderDetails(InMageAzureV2SwitchProviderDetails switchProviderDetails) { - this.switchProviderDetails = switchProviderDetails; - return this; - } - - /** - * Get the supportedOSVersions property: A value indicating the inplace OS Upgrade version. - * - * @return the supportedOSVersions value. - */ - public List supportedOSVersions() { - return this.supportedOSVersions; - } - - /** - * Set the supportedOSVersions property: A value indicating the inplace OS Upgrade version. - * - * @param supportedOSVersions the supportedOSVersions value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails withSupportedOSVersions(List supportedOSVersions) { - this.supportedOSVersions = supportedOSVersions; - return this; - } - - /** - * Get the allAvailableOSUpgradeConfigurations property: A value indicating all available inplace OS Upgrade - * configurations. - * - * @return the allAvailableOSUpgradeConfigurations value. - */ - public List allAvailableOSUpgradeConfigurations() { - return this.allAvailableOSUpgradeConfigurations; - } - - /** - * Set the allAvailableOSUpgradeConfigurations property: A value indicating all available inplace OS Upgrade - * configurations. - * - * @param allAvailableOSUpgradeConfigurations the allAvailableOSUpgradeConfigurations value to set. - * @return the InMageAzureV2ReplicationDetails object itself. - */ - public InMageAzureV2ReplicationDetails - withAllAvailableOSUpgradeConfigurations(List allAvailableOSUpgradeConfigurations) { - this.allAvailableOSUpgradeConfigurations = allAvailableOSUpgradeConfigurations; - return this; - } - - /** - * Get the osName property: The name of the OS on the VM. - * - * @return the osName value. - */ - public String osName() { - return this.osName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (protectedDisks() != null) { - protectedDisks().forEach(e -> e.validate()); - } - if (azureVMDiskDetails() != null) { - azureVMDiskDetails().forEach(e -> e.validate()); - } - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - if (protectedManagedDisks() != null) { - protectedManagedDisks().forEach(e -> e.validate()); - } - if (switchProviderBlockingErrorDetails() != null) { - switchProviderBlockingErrorDetails().forEach(e -> e.validate()); - } - if (switchProviderDetails() != null) { - switchProviderDetails().validate(); - } - if (allAvailableOSUpgradeConfigurations() != null) { - allAvailableOSUpgradeConfigurations().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("infrastructureVmId", this.infrastructureVmId); - jsonWriter.writeStringField("vCenterInfrastructureId", this.vCenterInfrastructureId); - jsonWriter.writeStringField("protectionStage", this.protectionStage); - jsonWriter.writeStringField("vmId", this.vmId); - jsonWriter.writeStringField("vmProtectionState", this.vmProtectionState); - jsonWriter.writeStringField("vmProtectionStateDescription", this.vmProtectionStateDescription); - jsonWriter.writeNumberField("resyncProgressPercentage", this.resyncProgressPercentage); - jsonWriter.writeNumberField("rpoInSeconds", this.rpoInSeconds); - jsonWriter.writeNumberField("compressedDataRateInMB", this.compressedDataRateInMB); - jsonWriter.writeNumberField("uncompressedDataRateInMB", this.uncompressedDataRateInMB); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("agentVersion", this.agentVersion); - jsonWriter.writeStringField("agentExpiryDate", - this.agentExpiryDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.agentExpiryDate)); - jsonWriter.writeStringField("isAgentUpdateRequired", this.isAgentUpdateRequired); - jsonWriter.writeStringField("isRebootAfterUpdateRequired", this.isRebootAfterUpdateRequired); - jsonWriter.writeStringField("lastHeartbeat", - this.lastHeartbeat == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastHeartbeat)); - jsonWriter.writeStringField("processServerId", this.processServerId); - jsonWriter.writeStringField("processServerName", this.processServerName); - jsonWriter.writeStringField("multiVmGroupId", this.multiVmGroupId); - jsonWriter.writeStringField("multiVmGroupName", this.multiVmGroupName); - jsonWriter.writeStringField("multiVmSyncStatus", this.multiVmSyncStatus); - jsonWriter.writeArrayField("protectedDisks", this.protectedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("diskResized", this.diskResized); - jsonWriter.writeStringField("masterTargetId", this.masterTargetId); - jsonWriter.writeNumberField("sourceVmCpuCount", this.sourceVmCpuCount); - jsonWriter.writeNumberField("sourceVmRamSizeInMB", this.sourceVmRamSizeInMB); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeStringField("vhdName", this.vhdName); - jsonWriter.writeStringField("osDiskId", this.osDiskId); - jsonWriter.writeArrayField("azureVMDiskDetails", this.azureVMDiskDetails, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("recoveryAzureVMName", this.recoveryAzureVMName); - jsonWriter.writeStringField("recoveryAzureVMSize", this.recoveryAzureVMSize); - jsonWriter.writeStringField("recoveryAzureStorageAccount", this.recoveryAzureStorageAccount); - jsonWriter.writeStringField("recoveryAzureLogStorageAccountId", this.recoveryAzureLogStorageAccountId); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("selectedRecoveryAzureNetworkId", this.selectedRecoveryAzureNetworkId); - jsonWriter.writeStringField("selectedTfoAzureNetworkId", this.selectedTfoAzureNetworkId); - jsonWriter.writeStringField("selectedSourceNicId", this.selectedSourceNicId); - jsonWriter.writeStringField("discoveryType", this.discoveryType); - jsonWriter.writeStringField("enableRdpOnTargetOption", this.enableRdpOnTargetOption); - jsonWriter.writeArrayField("datastores", this.datastores, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("targetVmId", this.targetVmId); - jsonWriter.writeStringField("recoveryAzureResourceGroupId", this.recoveryAzureResourceGroupId); - jsonWriter.writeStringField("recoveryAvailabilitySetId", this.recoveryAvailabilitySetId); - jsonWriter.writeStringField("targetAvailabilityZone", this.targetAvailabilityZone); - jsonWriter.writeStringField("targetProximityPlacementGroupId", this.targetProximityPlacementGroupId); - jsonWriter.writeStringField("useManagedDisks", this.useManagedDisks); - jsonWriter.writeStringField("licenseType", this.licenseType); - jsonWriter.writeStringField("sqlServerLicenseType", this.sqlServerLicenseType); - jsonWriter.writeArrayField("validationErrors", this.validationErrors, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("lastRpoCalculatedTime", - this.lastRpoCalculatedTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastRpoCalculatedTime)); - jsonWriter.writeStringField("lastUpdateReceivedTime", - this.lastUpdateReceivedTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastUpdateReceivedTime)); - jsonWriter.writeStringField("replicaId", this.replicaId); - jsonWriter.writeStringField("osVersion", this.osVersion); - jsonWriter.writeArrayField("protectedManagedDisks", this.protectedManagedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("firmwareType", this.firmwareType); - jsonWriter.writeStringField("azureVmGeneration", this.azureVmGeneration); - jsonWriter.writeBooleanField("isAdditionalStatsAvailable", this.isAdditionalStatsAvailable); - jsonWriter.writeNumberField("totalDataTransferred", this.totalDataTransferred); - jsonWriter.writeStringField("totalProgressHealth", this.totalProgressHealth); - jsonWriter.writeMapField("targetVmTags", this.targetVmTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("seedManagedDiskTags", this.seedManagedDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetManagedDiskTags", this.targetManagedDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetNicTags", this.targetNicTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("switchProviderBlockingErrorDetails", this.switchProviderBlockingErrorDetails, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("switchProviderDetails", this.switchProviderDetails); - jsonWriter.writeArrayField("supportedOSVersions", this.supportedOSVersions, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("allAvailableOSUpgradeConfigurations", this.allAvailableOSUpgradeConfigurations, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2ReplicationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2ReplicationDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2ReplicationDetails. - */ - public static InMageAzureV2ReplicationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2ReplicationDetails deserializedInMageAzureV2ReplicationDetails - = new InMageAzureV2ReplicationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.instanceType = reader.getString(); - } else if ("infrastructureVmId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.infrastructureVmId = reader.getString(); - } else if ("vCenterInfrastructureId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.vCenterInfrastructureId = reader.getString(); - } else if ("protectionStage".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.protectionStage = reader.getString(); - } else if ("vmId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.vmId = reader.getString(); - } else if ("vmProtectionState".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.vmProtectionState = reader.getString(); - } else if ("vmProtectionStateDescription".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.vmProtectionStateDescription = reader.getString(); - } else if ("resyncProgressPercentage".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.resyncProgressPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("rpoInSeconds".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.rpoInSeconds = reader.getNullable(JsonReader::getLong); - } else if ("compressedDataRateInMB".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.compressedDataRateInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("uncompressedDataRateInMB".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.uncompressedDataRateInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("ipAddress".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.ipAddress = reader.getString(); - } else if ("agentVersion".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.agentVersion = reader.getString(); - } else if ("agentExpiryDate".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.agentExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("isAgentUpdateRequired".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.isAgentUpdateRequired = reader.getString(); - } else if ("isRebootAfterUpdateRequired".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.isRebootAfterUpdateRequired = reader.getString(); - } else if ("lastHeartbeat".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.lastHeartbeat = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("processServerId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.processServerId = reader.getString(); - } else if ("processServerName".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.processServerName = reader.getString(); - } else if ("multiVmGroupId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.multiVmGroupId = reader.getString(); - } else if ("multiVmGroupName".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.multiVmGroupName = reader.getString(); - } else if ("multiVmSyncStatus".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.multiVmSyncStatus = reader.getString(); - } else if ("protectedDisks".equals(fieldName)) { - List protectedDisks - = reader.readArray(reader1 -> InMageAzureV2ProtectedDiskDetails.fromJson(reader1)); - deserializedInMageAzureV2ReplicationDetails.protectedDisks = protectedDisks; - } else if ("diskResized".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.diskResized = reader.getString(); - } else if ("masterTargetId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.masterTargetId = reader.getString(); - } else if ("sourceVmCpuCount".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.sourceVmCpuCount - = reader.getNullable(JsonReader::getInt); - } else if ("sourceVmRamSizeInMB".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.sourceVmRamSizeInMB - = reader.getNullable(JsonReader::getInt); - } else if ("osType".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.osType = reader.getString(); - } else if ("vhdName".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.vhdName = reader.getString(); - } else if ("osDiskId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.osDiskId = reader.getString(); - } else if ("azureVMDiskDetails".equals(fieldName)) { - List azureVMDiskDetails - = reader.readArray(reader1 -> AzureVmDiskDetails.fromJson(reader1)); - deserializedInMageAzureV2ReplicationDetails.azureVMDiskDetails = azureVMDiskDetails; - } else if ("recoveryAzureVMName".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.recoveryAzureVMName = reader.getString(); - } else if ("recoveryAzureVMSize".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.recoveryAzureVMSize = reader.getString(); - } else if ("recoveryAzureStorageAccount".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.recoveryAzureStorageAccount = reader.getString(); - } else if ("recoveryAzureLogStorageAccountId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.recoveryAzureLogStorageAccountId = reader.getString(); - } else if ("vmNics".equals(fieldName)) { - List vmNics = reader.readArray(reader1 -> VMNicDetails.fromJson(reader1)); - deserializedInMageAzureV2ReplicationDetails.vmNics = vmNics; - } else if ("selectedRecoveryAzureNetworkId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.selectedRecoveryAzureNetworkId = reader.getString(); - } else if ("selectedTfoAzureNetworkId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.selectedTfoAzureNetworkId = reader.getString(); - } else if ("selectedSourceNicId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.selectedSourceNicId = reader.getString(); - } else if ("discoveryType".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.discoveryType = reader.getString(); - } else if ("enableRdpOnTargetOption".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.enableRdpOnTargetOption = reader.getString(); - } else if ("datastores".equals(fieldName)) { - List datastores = reader.readArray(reader1 -> reader1.getString()); - deserializedInMageAzureV2ReplicationDetails.datastores = datastores; - } else if ("targetVmId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.targetVmId = reader.getString(); - } else if ("recoveryAzureResourceGroupId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.recoveryAzureResourceGroupId = reader.getString(); - } else if ("recoveryAvailabilitySetId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.recoveryAvailabilitySetId = reader.getString(); - } else if ("targetAvailabilityZone".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.targetAvailabilityZone = reader.getString(); - } else if ("targetProximityPlacementGroupId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.targetProximityPlacementGroupId = reader.getString(); - } else if ("useManagedDisks".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.useManagedDisks = reader.getString(); - } else if ("licenseType".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.licenseType = reader.getString(); - } else if ("sqlServerLicenseType".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.sqlServerLicenseType = reader.getString(); - } else if ("validationErrors".equals(fieldName)) { - List validationErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedInMageAzureV2ReplicationDetails.validationErrors = validationErrors; - } else if ("lastRpoCalculatedTime".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.lastRpoCalculatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastUpdateReceivedTime".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.lastUpdateReceivedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("replicaId".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.replicaId = reader.getString(); - } else if ("osVersion".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.osVersion = reader.getString(); - } else if ("protectedManagedDisks".equals(fieldName)) { - List protectedManagedDisks - = reader.readArray(reader1 -> InMageAzureV2ManagedDiskDetails.fromJson(reader1)); - deserializedInMageAzureV2ReplicationDetails.protectedManagedDisks = protectedManagedDisks; - } else if ("lastRecoveryPointReceived".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.lastRecoveryPointReceived = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("firmwareType".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.firmwareType = reader.getString(); - } else if ("azureVmGeneration".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.azureVmGeneration = reader.getString(); - } else if ("isAdditionalStatsAvailable".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.isAdditionalStatsAvailable - = reader.getNullable(JsonReader::getBoolean); - } else if ("totalDataTransferred".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.totalDataTransferred - = reader.getNullable(JsonReader::getLong); - } else if ("totalProgressHealth".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.totalProgressHealth = reader.getString(); - } else if ("targetVmTags".equals(fieldName)) { - Map targetVmTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2ReplicationDetails.targetVmTags = targetVmTags; - } else if ("seedManagedDiskTags".equals(fieldName)) { - Map seedManagedDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2ReplicationDetails.seedManagedDiskTags = seedManagedDiskTags; - } else if ("targetManagedDiskTags".equals(fieldName)) { - Map targetManagedDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2ReplicationDetails.targetManagedDiskTags = targetManagedDiskTags; - } else if ("targetNicTags".equals(fieldName)) { - Map targetNicTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2ReplicationDetails.targetNicTags = targetNicTags; - } else if ("switchProviderBlockingErrorDetails".equals(fieldName)) { - List switchProviderBlockingErrorDetails = reader - .readArray(reader1 -> InMageAzureV2SwitchProviderBlockingErrorDetails.fromJson(reader1)); - deserializedInMageAzureV2ReplicationDetails.switchProviderBlockingErrorDetails - = switchProviderBlockingErrorDetails; - } else if ("switchProviderDetails".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.switchProviderDetails - = InMageAzureV2SwitchProviderDetails.fromJson(reader); - } else if ("supportedOSVersions".equals(fieldName)) { - List supportedOSVersions = reader.readArray(reader1 -> reader1.getString()); - deserializedInMageAzureV2ReplicationDetails.supportedOSVersions = supportedOSVersions; - } else if ("allAvailableOSUpgradeConfigurations".equals(fieldName)) { - List allAvailableOSUpgradeConfigurations - = reader.readArray(reader1 -> OSUpgradeSupportedVersions.fromJson(reader1)); - deserializedInMageAzureV2ReplicationDetails.allAvailableOSUpgradeConfigurations - = allAvailableOSUpgradeConfigurations; - } else if ("osName".equals(fieldName)) { - deserializedInMageAzureV2ReplicationDetails.osName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2ReplicationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ReprotectInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ReprotectInput.java deleted file mode 100644 index c5a6c47a1a97..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2ReprotectInput.java +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * InMageAzureV2 specific provider input. - */ -@Fluent -public final class InMageAzureV2ReprotectInput extends ReverseReplicationProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageAzureV2"; - - /* - * The Master target Id. - */ - private String masterTargetId; - - /* - * The Process Server Id. - */ - private String processServerId; - - /* - * The storage account id. - */ - private String storageAccountId; - - /* - * The CS account Id. - */ - private String runAsAccountId; - - /* - * The Policy Id. - */ - private String policyId; - - /* - * The storage account to be used for logging during replication. - */ - private String logStorageAccountId; - - /* - * The disks to include list. - */ - private List disksToInclude; - - /** - * Creates an instance of InMageAzureV2ReprotectInput class. - */ - public InMageAzureV2ReprotectInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the masterTargetId property: The Master target Id. - * - * @return the masterTargetId value. - */ - public String masterTargetId() { - return this.masterTargetId; - } - - /** - * Set the masterTargetId property: 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 processServerId property: The Process Server Id. - * - * @return the processServerId value. - */ - public String processServerId() { - return this.processServerId; - } - - /** - * Set the processServerId property: 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 storageAccountId property: The storage account id. - * - * @return the storageAccountId value. - */ - public String storageAccountId() { - return this.storageAccountId; - } - - /** - * Set the storageAccountId property: 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 runAsAccountId property: The CS account Id. - * - * @return the runAsAccountId value. - */ - public String runAsAccountId() { - return this.runAsAccountId; - } - - /** - * Set the runAsAccountId property: 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 policyId property: The Policy Id. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Set the policyId property: 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 logStorageAccountId property: The storage account to be used for logging during replication. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Set the logStorageAccountId property: 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 disksToInclude property: The disks to include list. - * - * @return the disksToInclude value. - */ - public List disksToInclude() { - return this.disksToInclude; - } - - /** - * Set the disksToInclude property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("masterTargetId", this.masterTargetId); - jsonWriter.writeStringField("processServerId", this.processServerId); - jsonWriter.writeStringField("storageAccountId", this.storageAccountId); - jsonWriter.writeStringField("runAsAccountId", this.runAsAccountId); - jsonWriter.writeStringField("policyId", this.policyId); - jsonWriter.writeStringField("logStorageAccountId", this.logStorageAccountId); - jsonWriter.writeArrayField("disksToInclude", this.disksToInclude, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2ReprotectInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2ReprotectInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2ReprotectInput. - */ - public static InMageAzureV2ReprotectInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2ReprotectInput deserializedInMageAzureV2ReprotectInput = new InMageAzureV2ReprotectInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageAzureV2ReprotectInput.instanceType = reader.getString(); - } else if ("masterTargetId".equals(fieldName)) { - deserializedInMageAzureV2ReprotectInput.masterTargetId = reader.getString(); - } else if ("processServerId".equals(fieldName)) { - deserializedInMageAzureV2ReprotectInput.processServerId = reader.getString(); - } else if ("storageAccountId".equals(fieldName)) { - deserializedInMageAzureV2ReprotectInput.storageAccountId = reader.getString(); - } else if ("runAsAccountId".equals(fieldName)) { - deserializedInMageAzureV2ReprotectInput.runAsAccountId = reader.getString(); - } else if ("policyId".equals(fieldName)) { - deserializedInMageAzureV2ReprotectInput.policyId = reader.getString(); - } else if ("logStorageAccountId".equals(fieldName)) { - deserializedInMageAzureV2ReprotectInput.logStorageAccountId = reader.getString(); - } else if ("disksToInclude".equals(fieldName)) { - List disksToInclude = reader.readArray(reader1 -> reader1.getString()); - deserializedInMageAzureV2ReprotectInput.disksToInclude = disksToInclude; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2ReprotectInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2SwitchProviderBlockingErrorDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2SwitchProviderBlockingErrorDetails.java deleted file mode 100644 index 8998fdb9a15d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2SwitchProviderBlockingErrorDetails.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * InMageAzureV2 switch provider blocking error details. - */ -@Immutable -public final class InMageAzureV2SwitchProviderBlockingErrorDetails - implements JsonSerializable { - /* - * The error code. - */ - private String errorCode; - - /* - * The error message. - */ - private String errorMessage; - - /* - * The possible causes. - */ - private String possibleCauses; - - /* - * The recommended action. - */ - private String recommendedAction; - - /* - * The error message parameters. - */ - private Map errorMessageParameters; - - /* - * The error tags. - */ - private Map errorTags; - - /** - * Creates an instance of InMageAzureV2SwitchProviderBlockingErrorDetails class. - */ - public InMageAzureV2SwitchProviderBlockingErrorDetails() { - } - - /** - * Get the errorCode property: The error code. - * - * @return the errorCode value. - */ - public String errorCode() { - return this.errorCode; - } - - /** - * Get the errorMessage property: The error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the possibleCauses property: The possible causes. - * - * @return the possibleCauses value. - */ - public String possibleCauses() { - return this.possibleCauses; - } - - /** - * Get the recommendedAction property: The recommended action. - * - * @return the recommendedAction value. - */ - public String recommendedAction() { - return this.recommendedAction; - } - - /** - * Get the errorMessageParameters property: The error message parameters. - * - * @return the errorMessageParameters value. - */ - public Map errorMessageParameters() { - return this.errorMessageParameters; - } - - /** - * Get the errorTags property: The error tags. - * - * @return the errorTags value. - */ - public Map errorTags() { - return this.errorTags; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2SwitchProviderBlockingErrorDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2SwitchProviderBlockingErrorDetails if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2SwitchProviderBlockingErrorDetails. - */ - public static InMageAzureV2SwitchProviderBlockingErrorDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2SwitchProviderBlockingErrorDetails deserializedInMageAzureV2SwitchProviderBlockingErrorDetails - = new InMageAzureV2SwitchProviderBlockingErrorDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("errorCode".equals(fieldName)) { - deserializedInMageAzureV2SwitchProviderBlockingErrorDetails.errorCode = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedInMageAzureV2SwitchProviderBlockingErrorDetails.errorMessage = reader.getString(); - } else if ("possibleCauses".equals(fieldName)) { - deserializedInMageAzureV2SwitchProviderBlockingErrorDetails.possibleCauses = reader.getString(); - } else if ("recommendedAction".equals(fieldName)) { - deserializedInMageAzureV2SwitchProviderBlockingErrorDetails.recommendedAction = reader.getString(); - } else if ("errorMessageParameters".equals(fieldName)) { - Map errorMessageParameters = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2SwitchProviderBlockingErrorDetails.errorMessageParameters - = errorMessageParameters; - } else if ("errorTags".equals(fieldName)) { - Map errorTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2SwitchProviderBlockingErrorDetails.errorTags = errorTags; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2SwitchProviderBlockingErrorDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2SwitchProviderDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2SwitchProviderDetails.java deleted file mode 100644 index 677161b059d7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2SwitchProviderDetails.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageAzureV2 switch provider details. - */ -@Immutable -public final class InMageAzureV2SwitchProviderDetails implements JsonSerializable { - /* - * The target vault Id. - */ - private String targetVaultId; - - /* - * The target resource Id. - */ - private String targetResourceId; - - /* - * The target fabric Id. - */ - private String targetFabricId; - - /* - * The target appliance Id. - */ - private String targetApplianceId; - - /** - * Creates an instance of InMageAzureV2SwitchProviderDetails class. - */ - public InMageAzureV2SwitchProviderDetails() { - } - - /** - * Get the targetVaultId property: The target vault Id. - * - * @return the targetVaultId value. - */ - public String targetVaultId() { - return this.targetVaultId; - } - - /** - * Get the targetResourceId property: The target resource Id. - * - * @return the targetResourceId value. - */ - public String targetResourceId() { - return this.targetResourceId; - } - - /** - * Get the targetFabricId property: The target fabric Id. - * - * @return the targetFabricId value. - */ - public String targetFabricId() { - return this.targetFabricId; - } - - /** - * Get the targetApplianceId property: The target appliance Id. - * - * @return the targetApplianceId value. - */ - public String targetApplianceId() { - return this.targetApplianceId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2SwitchProviderDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2SwitchProviderDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2SwitchProviderDetails. - */ - public static InMageAzureV2SwitchProviderDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2SwitchProviderDetails deserializedInMageAzureV2SwitchProviderDetails - = new InMageAzureV2SwitchProviderDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetVaultId".equals(fieldName)) { - deserializedInMageAzureV2SwitchProviderDetails.targetVaultId = reader.getString(); - } else if ("targetResourceId".equals(fieldName)) { - deserializedInMageAzureV2SwitchProviderDetails.targetResourceId = reader.getString(); - } else if ("targetFabricId".equals(fieldName)) { - deserializedInMageAzureV2SwitchProviderDetails.targetFabricId = reader.getString(); - } else if ("targetApplianceId".equals(fieldName)) { - deserializedInMageAzureV2SwitchProviderDetails.targetApplianceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2SwitchProviderDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2SwitchProviderInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2SwitchProviderInput.java deleted file mode 100644 index bf1a61ea42a4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2SwitchProviderInput.java +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific input for InMageAzureV2 switch provider. - */ -@Fluent -public final class InMageAzureV2SwitchProviderInput extends SwitchProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageAzureV2"; - - /* - * The target vault Id. - */ - private String targetVaultId; - - /* - * The target fabric Id. - */ - private String targetFabricId; - - /* - * The target appliance Id. - */ - private String targetApplianceId; - - /** - * Creates an instance of InMageAzureV2SwitchProviderInput class. - */ - public InMageAzureV2SwitchProviderInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the targetVaultId property: The target vault Id. - * - * @return the targetVaultId value. - */ - public String targetVaultId() { - return this.targetVaultId; - } - - /** - * Set the targetVaultId property: The target vault Id. - * - * @param targetVaultId the targetVaultId value to set. - * @return the InMageAzureV2SwitchProviderInput object itself. - */ - public InMageAzureV2SwitchProviderInput withTargetVaultId(String targetVaultId) { - this.targetVaultId = targetVaultId; - return this; - } - - /** - * Get the targetFabricId property: The target fabric Id. - * - * @return the targetFabricId value. - */ - public String targetFabricId() { - return this.targetFabricId; - } - - /** - * Set the targetFabricId property: The target fabric Id. - * - * @param targetFabricId the targetFabricId value to set. - * @return the InMageAzureV2SwitchProviderInput object itself. - */ - public InMageAzureV2SwitchProviderInput withTargetFabricId(String targetFabricId) { - this.targetFabricId = targetFabricId; - return this; - } - - /** - * Get the targetApplianceId property: The target appliance Id. - * - * @return the targetApplianceId value. - */ - public String targetApplianceId() { - return this.targetApplianceId; - } - - /** - * Set the targetApplianceId property: The target appliance Id. - * - * @param targetApplianceId the targetApplianceId value to set. - * @return the InMageAzureV2SwitchProviderInput object itself. - */ - public InMageAzureV2SwitchProviderInput withTargetApplianceId(String targetApplianceId) { - this.targetApplianceId = targetApplianceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (targetVaultId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetVaultId in model InMageAzureV2SwitchProviderInput")); - } - if (targetFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetFabricId in model InMageAzureV2SwitchProviderInput")); - } - if (targetApplianceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetApplianceId in model InMageAzureV2SwitchProviderInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageAzureV2SwitchProviderInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetVaultID", this.targetVaultId); - jsonWriter.writeStringField("targetFabricID", this.targetFabricId); - jsonWriter.writeStringField("targetApplianceID", this.targetApplianceId); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2SwitchProviderInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2SwitchProviderInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageAzureV2SwitchProviderInput. - */ - public static InMageAzureV2SwitchProviderInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2SwitchProviderInput deserializedInMageAzureV2SwitchProviderInput - = new InMageAzureV2SwitchProviderInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetVaultID".equals(fieldName)) { - deserializedInMageAzureV2SwitchProviderInput.targetVaultId = reader.getString(); - } else if ("targetFabricID".equals(fieldName)) { - deserializedInMageAzureV2SwitchProviderInput.targetFabricId = reader.getString(); - } else if ("targetApplianceID".equals(fieldName)) { - deserializedInMageAzureV2SwitchProviderInput.targetApplianceId = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedInMageAzureV2SwitchProviderInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2SwitchProviderInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2TestFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2TestFailoverInput.java deleted file mode 100644 index 07562c345114..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2TestFailoverInput.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageAzureV2 provider specific input for test failover. - */ -@Fluent -public final class InMageAzureV2TestFailoverInput extends TestFailoverProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageAzureV2"; - - /* - * The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery - * point, null should be passed. - */ - private String recoveryPointId; - - /* - * A value indicating the inplace OS Upgrade version. - */ - private String osUpgradeVersion; - - /** - * Creates an instance of InMageAzureV2TestFailoverInput class. - */ - public InMageAzureV2TestFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointId property: The recovery point id to be passed to test 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 recoveryPointId property: The recovery point id to be passed to test 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 InMageAzureV2TestFailoverInput object itself. - */ - public InMageAzureV2TestFailoverInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Get the osUpgradeVersion property: A value indicating the inplace OS Upgrade version. - * - * @return the osUpgradeVersion value. - */ - public String osUpgradeVersion() { - return this.osUpgradeVersion; - } - - /** - * Set the osUpgradeVersion property: A value indicating the inplace OS Upgrade version. - * - * @param osUpgradeVersion the osUpgradeVersion value to set. - * @return the InMageAzureV2TestFailoverInput object itself. - */ - public InMageAzureV2TestFailoverInput withOsUpgradeVersion(String osUpgradeVersion) { - this.osUpgradeVersion = osUpgradeVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - jsonWriter.writeStringField("osUpgradeVersion", this.osUpgradeVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2TestFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2TestFailoverInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2TestFailoverInput. - */ - public static InMageAzureV2TestFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2TestFailoverInput deserializedInMageAzureV2TestFailoverInput - = new InMageAzureV2TestFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageAzureV2TestFailoverInput.instanceType = reader.getString(); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedInMageAzureV2TestFailoverInput.recoveryPointId = reader.getString(); - } else if ("osUpgradeVersion".equals(fieldName)) { - deserializedInMageAzureV2TestFailoverInput.osUpgradeVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2TestFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2UnplannedFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2UnplannedFailoverInput.java deleted file mode 100644 index 558dbb6370ac..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2UnplannedFailoverInput.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageAzureV2 provider specific input for unplanned failover. - */ -@Fluent -public final class InMageAzureV2UnplannedFailoverInput extends UnplannedFailoverProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageAzureV2"; - - /* - * The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, - * null should be passed. - */ - private String recoveryPointId; - - /* - * A value indicating the inplace OS Upgrade version. - */ - private String osUpgradeVersion; - - /** - * Creates an instance of InMageAzureV2UnplannedFailoverInput class. - */ - public InMageAzureV2UnplannedFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointId property: 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 recoveryPointId property: 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 InMageAzureV2UnplannedFailoverInput object itself. - */ - public InMageAzureV2UnplannedFailoverInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Get the osUpgradeVersion property: A value indicating the inplace OS Upgrade version. - * - * @return the osUpgradeVersion value. - */ - public String osUpgradeVersion() { - return this.osUpgradeVersion; - } - - /** - * Set the osUpgradeVersion property: A value indicating the inplace OS Upgrade version. - * - * @param osUpgradeVersion the osUpgradeVersion value to set. - * @return the InMageAzureV2UnplannedFailoverInput object itself. - */ - public InMageAzureV2UnplannedFailoverInput withOsUpgradeVersion(String osUpgradeVersion) { - this.osUpgradeVersion = osUpgradeVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - jsonWriter.writeStringField("osUpgradeVersion", this.osUpgradeVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2UnplannedFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2UnplannedFailoverInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2UnplannedFailoverInput. - */ - public static InMageAzureV2UnplannedFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2UnplannedFailoverInput deserializedInMageAzureV2UnplannedFailoverInput - = new InMageAzureV2UnplannedFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageAzureV2UnplannedFailoverInput.instanceType = reader.getString(); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedInMageAzureV2UnplannedFailoverInput.recoveryPointId = reader.getString(); - } else if ("osUpgradeVersion".equals(fieldName)) { - deserializedInMageAzureV2UnplannedFailoverInput.osUpgradeVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2UnplannedFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2UpdateReplicationProtectedItemInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2UpdateReplicationProtectedItemInput.java deleted file mode 100644 index 67aa30cc1bff..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageAzureV2UpdateReplicationProtectedItemInput.java +++ /dev/null @@ -1,389 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * InMage Azure V2 input to update replication protected item. - */ -@Fluent -public final class InMageAzureV2UpdateReplicationProtectedItemInput - extends UpdateReplicationProtectedItemProviderInput { - /* - * The class type. - */ - private String instanceType = "InMageAzureV2"; - - /* - * The recovery Azure resource group Id for classic deployment. - */ - private String recoveryAzureV1ResourceGroupId; - - /* - * The recovery Azure resource group Id for resource manager deployment. - */ - private String recoveryAzureV2ResourceGroupId; - - /* - * A value indicating whether managed disks should be used during failover. - */ - private String useManagedDisks; - - /* - * The target proximity placement group Id. - */ - private String targetProximityPlacementGroupId; - - /* - * The target availability zone. - */ - private String targetAvailabilityZone; - - /* - * The target VM tags. - */ - private Map targetVmTags; - - /* - * The tags for the target managed disks. - */ - private Map targetManagedDiskTags; - - /* - * The tags for the target NICs. - */ - private Map targetNicTags; - - /* - * The SQL Server license type. - */ - private SqlServerLicenseType sqlServerLicenseType; - - /* - * The list of disk update properties. - */ - private List vmDisks; - - /** - * Creates an instance of InMageAzureV2UpdateReplicationProtectedItemInput class. - */ - public InMageAzureV2UpdateReplicationProtectedItemInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryAzureV1ResourceGroupId property: The recovery Azure resource group Id for classic deployment. - * - * @return the recoveryAzureV1ResourceGroupId value. - */ - public String recoveryAzureV1ResourceGroupId() { - return this.recoveryAzureV1ResourceGroupId; - } - - /** - * Set the recoveryAzureV1ResourceGroupId property: 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 recoveryAzureV2ResourceGroupId property: The recovery Azure resource group Id for resource manager - * deployment. - * - * @return the recoveryAzureV2ResourceGroupId value. - */ - public String recoveryAzureV2ResourceGroupId() { - return this.recoveryAzureV2ResourceGroupId; - } - - /** - * Set the recoveryAzureV2ResourceGroupId property: 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 the useManagedDisks property: A value indicating whether managed disks should be used during failover. - * - * @return the useManagedDisks value. - */ - public String useManagedDisks() { - return this.useManagedDisks; - } - - /** - * Set the useManagedDisks property: 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; - } - - /** - * Get the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @return the targetProximityPlacementGroupId value. - */ - public String targetProximityPlacementGroupId() { - return this.targetProximityPlacementGroupId; - } - - /** - * Set the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set. - * @return the InMageAzureV2UpdateReplicationProtectedItemInput object itself. - */ - public InMageAzureV2UpdateReplicationProtectedItemInput - withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) { - this.targetProximityPlacementGroupId = targetProximityPlacementGroupId; - return this; - } - - /** - * Get the targetAvailabilityZone property: The target availability zone. - * - * @return the targetAvailabilityZone value. - */ - public String targetAvailabilityZone() { - return this.targetAvailabilityZone; - } - - /** - * Set the targetAvailabilityZone property: The target availability zone. - * - * @param targetAvailabilityZone the targetAvailabilityZone value to set. - * @return the InMageAzureV2UpdateReplicationProtectedItemInput object itself. - */ - public InMageAzureV2UpdateReplicationProtectedItemInput withTargetAvailabilityZone(String targetAvailabilityZone) { - this.targetAvailabilityZone = targetAvailabilityZone; - return this; - } - - /** - * Get the targetVmTags property: The target VM tags. - * - * @return the targetVmTags value. - */ - public Map targetVmTags() { - return this.targetVmTags; - } - - /** - * Set the targetVmTags property: The target VM tags. - * - * @param targetVmTags the targetVmTags value to set. - * @return the InMageAzureV2UpdateReplicationProtectedItemInput object itself. - */ - public InMageAzureV2UpdateReplicationProtectedItemInput withTargetVmTags(Map targetVmTags) { - this.targetVmTags = targetVmTags; - return this; - } - - /** - * Get the targetManagedDiskTags property: The tags for the target managed disks. - * - * @return the targetManagedDiskTags value. - */ - public Map targetManagedDiskTags() { - return this.targetManagedDiskTags; - } - - /** - * Set the targetManagedDiskTags property: The tags for the target managed disks. - * - * @param targetManagedDiskTags the targetManagedDiskTags value to set. - * @return the InMageAzureV2UpdateReplicationProtectedItemInput object itself. - */ - public InMageAzureV2UpdateReplicationProtectedItemInput - withTargetManagedDiskTags(Map targetManagedDiskTags) { - this.targetManagedDiskTags = targetManagedDiskTags; - return this; - } - - /** - * Get the targetNicTags property: The tags for the target NICs. - * - * @return the targetNicTags value. - */ - public Map targetNicTags() { - return this.targetNicTags; - } - - /** - * Set the targetNicTags property: The tags for the target NICs. - * - * @param targetNicTags the targetNicTags value to set. - * @return the InMageAzureV2UpdateReplicationProtectedItemInput object itself. - */ - public InMageAzureV2UpdateReplicationProtectedItemInput withTargetNicTags(Map targetNicTags) { - this.targetNicTags = targetNicTags; - return this; - } - - /** - * Get the sqlServerLicenseType property: The SQL Server license type. - * - * @return the sqlServerLicenseType value. - */ - public SqlServerLicenseType sqlServerLicenseType() { - return this.sqlServerLicenseType; - } - - /** - * Set the sqlServerLicenseType property: The SQL Server license type. - * - * @param sqlServerLicenseType the sqlServerLicenseType value to set. - * @return the InMageAzureV2UpdateReplicationProtectedItemInput object itself. - */ - public InMageAzureV2UpdateReplicationProtectedItemInput - withSqlServerLicenseType(SqlServerLicenseType sqlServerLicenseType) { - this.sqlServerLicenseType = sqlServerLicenseType; - return this; - } - - /** - * Get the vmDisks property: The list of disk update properties. - * - * @return the vmDisks value. - */ - public List vmDisks() { - return this.vmDisks; - } - - /** - * Set the vmDisks property: The list of disk update properties. - * - * @param vmDisks the vmDisks value to set. - * @return the InMageAzureV2UpdateReplicationProtectedItemInput object itself. - */ - public InMageAzureV2UpdateReplicationProtectedItemInput withVmDisks(List vmDisks) { - this.vmDisks = vmDisks; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmDisks() != null) { - vmDisks().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryAzureV1ResourceGroupId", this.recoveryAzureV1ResourceGroupId); - jsonWriter.writeStringField("recoveryAzureV2ResourceGroupId", this.recoveryAzureV2ResourceGroupId); - jsonWriter.writeStringField("useManagedDisks", this.useManagedDisks); - jsonWriter.writeStringField("targetProximityPlacementGroupId", this.targetProximityPlacementGroupId); - jsonWriter.writeStringField("targetAvailabilityZone", this.targetAvailabilityZone); - jsonWriter.writeMapField("targetVmTags", this.targetVmTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetManagedDiskTags", this.targetManagedDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetNicTags", this.targetNicTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("sqlServerLicenseType", - this.sqlServerLicenseType == null ? null : this.sqlServerLicenseType.toString()); - jsonWriter.writeArrayField("vmDisks", this.vmDisks, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageAzureV2UpdateReplicationProtectedItemInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageAzureV2UpdateReplicationProtectedItemInput if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageAzureV2UpdateReplicationProtectedItemInput. - */ - public static InMageAzureV2UpdateReplicationProtectedItemInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageAzureV2UpdateReplicationProtectedItemInput deserializedInMageAzureV2UpdateReplicationProtectedItemInput - = new InMageAzureV2UpdateReplicationProtectedItemInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageAzureV2UpdateReplicationProtectedItemInput.instanceType = reader.getString(); - } else if ("recoveryAzureV1ResourceGroupId".equals(fieldName)) { - deserializedInMageAzureV2UpdateReplicationProtectedItemInput.recoveryAzureV1ResourceGroupId - = reader.getString(); - } else if ("recoveryAzureV2ResourceGroupId".equals(fieldName)) { - deserializedInMageAzureV2UpdateReplicationProtectedItemInput.recoveryAzureV2ResourceGroupId - = reader.getString(); - } else if ("useManagedDisks".equals(fieldName)) { - deserializedInMageAzureV2UpdateReplicationProtectedItemInput.useManagedDisks = reader.getString(); - } else if ("targetProximityPlacementGroupId".equals(fieldName)) { - deserializedInMageAzureV2UpdateReplicationProtectedItemInput.targetProximityPlacementGroupId - = reader.getString(); - } else if ("targetAvailabilityZone".equals(fieldName)) { - deserializedInMageAzureV2UpdateReplicationProtectedItemInput.targetAvailabilityZone - = reader.getString(); - } else if ("targetVmTags".equals(fieldName)) { - Map targetVmTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2UpdateReplicationProtectedItemInput.targetVmTags = targetVmTags; - } else if ("targetManagedDiskTags".equals(fieldName)) { - Map targetManagedDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2UpdateReplicationProtectedItemInput.targetManagedDiskTags - = targetManagedDiskTags; - } else if ("targetNicTags".equals(fieldName)) { - Map targetNicTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageAzureV2UpdateReplicationProtectedItemInput.targetNicTags = targetNicTags; - } else if ("sqlServerLicenseType".equals(fieldName)) { - deserializedInMageAzureV2UpdateReplicationProtectedItemInput.sqlServerLicenseType - = SqlServerLicenseType.fromString(reader.getString()); - } else if ("vmDisks".equals(fieldName)) { - List vmDisks = reader.readArray(reader1 -> UpdateDiskInput.fromJson(reader1)); - deserializedInMageAzureV2UpdateReplicationProtectedItemInput.vmDisks = vmDisks; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageAzureV2UpdateReplicationProtectedItemInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageBasePolicyDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageBasePolicyDetails.java deleted file mode 100644 index 04815c75088d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageBasePolicyDetails.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for the policies of providers using InMage replication. - */ -@Fluent -public final class InMageBasePolicyDetails extends PolicyProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "InMageBasePolicyDetails"; - - /* - * The recovery point threshold in minutes. - */ - private Integer recoveryPointThresholdInMinutes; - - /* - * The duration in minutes until which the recovery points need to be stored. - */ - private Integer recoveryPointHistory; - - /* - * The app consistent snapshot frequency in minutes. - */ - private Integer appConsistentFrequencyInMinutes; - - /* - * A value indicating whether multi-VM sync has to be enabled. - */ - private String multiVmSyncStatus; - - /** - * Creates an instance of InMageBasePolicyDetails class. - */ - public InMageBasePolicyDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointThresholdInMinutes property: The recovery point threshold in minutes. - * - * @return the recoveryPointThresholdInMinutes value. - */ - public Integer recoveryPointThresholdInMinutes() { - return this.recoveryPointThresholdInMinutes; - } - - /** - * Set the recoveryPointThresholdInMinutes property: 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 recoveryPointHistory property: 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 recoveryPointHistory property: 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 appConsistentFrequencyInMinutes property: The app consistent snapshot frequency in minutes. - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: 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 the multiVmSyncStatus property: A value indicating whether multi-VM sync has to be enabled. - * - * @return the multiVmSyncStatus value. - */ - public String multiVmSyncStatus() { - return this.multiVmSyncStatus; - } - - /** - * Set the multiVmSyncStatus property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPointThresholdInMinutes", this.recoveryPointThresholdInMinutes); - jsonWriter.writeNumberField("recoveryPointHistory", this.recoveryPointHistory); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - jsonWriter.writeStringField("multiVmSyncStatus", this.multiVmSyncStatus); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageBasePolicyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageBasePolicyDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageBasePolicyDetails. - */ - public static InMageBasePolicyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageBasePolicyDetails deserializedInMageBasePolicyDetails = new InMageBasePolicyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageBasePolicyDetails.instanceType = reader.getString(); - } else if ("recoveryPointThresholdInMinutes".equals(fieldName)) { - deserializedInMageBasePolicyDetails.recoveryPointThresholdInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("recoveryPointHistory".equals(fieldName)) { - deserializedInMageBasePolicyDetails.recoveryPointHistory = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageBasePolicyDetails.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("multiVmSyncStatus".equals(fieldName)) { - deserializedInMageBasePolicyDetails.multiVmSyncStatus = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageBasePolicyDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageDisableProtectionProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageDisableProtectionProviderSpecificInput.java deleted file mode 100644 index 4af1631869a3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageDisableProtectionProviderSpecificInput.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMage disable protection provider specific input. - */ -@Fluent -public final class InMageDisableProtectionProviderSpecificInput extends DisableProtectionProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMage"; - - /* - * A value indicating whether the replica VM should be destroyed or retained. Values from Delete and Retain. - */ - private String replicaVmDeletionStatus; - - /** - * Creates an instance of InMageDisableProtectionProviderSpecificInput class. - */ - public InMageDisableProtectionProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the replicaVmDeletionStatus property: 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 the replicaVmDeletionStatus property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("replicaVmDeletionStatus", this.replicaVmDeletionStatus); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageDisableProtectionProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageDisableProtectionProviderSpecificInput if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageDisableProtectionProviderSpecificInput. - */ - public static InMageDisableProtectionProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageDisableProtectionProviderSpecificInput deserializedInMageDisableProtectionProviderSpecificInput - = new InMageDisableProtectionProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageDisableProtectionProviderSpecificInput.instanceType = reader.getString(); - } else if ("replicaVmDeletionStatus".equals(fieldName)) { - deserializedInMageDisableProtectionProviderSpecificInput.replicaVmDeletionStatus - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageDisableProtectionProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageDiskDetails.java deleted file mode 100644 index 3df4dac54426..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageDiskDetails.java +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * VMware/Physical specific Disk Details. - */ -@Fluent -public final class InMageDiskDetails implements JsonSerializable { - /* - * The disk Id. - */ - private String diskId; - - /* - * The disk name. - */ - private String diskName; - - /* - * The disk size in MB. - */ - private String diskSizeInMB; - - /* - * Whether disk is system disk or data disk. - */ - private String diskType; - - /* - * Whether disk is dynamic disk or basic disk. - */ - private String diskConfiguration; - - /* - * Volumes of the disk. - */ - private List volumeList; - - /** - * Creates an instance of InMageDiskDetails class. - */ - public InMageDiskDetails() { - } - - /** - * Get the diskId property: The disk Id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: 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 diskName property: The disk name. - * - * @return the diskName value. - */ - public String diskName() { - return this.diskName; - } - - /** - * Set the diskName property: 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 diskSizeInMB property: The disk size in MB. - * - * @return the diskSizeInMB value. - */ - public String diskSizeInMB() { - return this.diskSizeInMB; - } - - /** - * Set the diskSizeInMB property: 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 the diskType property: Whether disk is system disk or data disk. - * - * @return the diskType value. - */ - public String diskType() { - return this.diskType; - } - - /** - * Set the diskType property: 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 the diskConfiguration property: Whether disk is dynamic disk or basic disk. - * - * @return the diskConfiguration value. - */ - public String diskConfiguration() { - return this.diskConfiguration; - } - - /** - * Set the diskConfiguration property: 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 the volumeList property: Volumes of the disk. - * - * @return the volumeList value. - */ - public List volumeList() { - return this.volumeList; - } - - /** - * Set the volumeList property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (volumeList() != null) { - volumeList().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("diskName", this.diskName); - jsonWriter.writeStringField("diskSizeInMB", this.diskSizeInMB); - jsonWriter.writeStringField("diskType", this.diskType); - jsonWriter.writeStringField("diskConfiguration", this.diskConfiguration); - jsonWriter.writeArrayField("volumeList", this.volumeList, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageDiskDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageDiskDetails. - */ - public static InMageDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageDiskDetails deserializedInMageDiskDetails = new InMageDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedInMageDiskDetails.diskId = reader.getString(); - } else if ("diskName".equals(fieldName)) { - deserializedInMageDiskDetails.diskName = reader.getString(); - } else if ("diskSizeInMB".equals(fieldName)) { - deserializedInMageDiskDetails.diskSizeInMB = reader.getString(); - } else if ("diskType".equals(fieldName)) { - deserializedInMageDiskDetails.diskType = reader.getString(); - } else if ("diskConfiguration".equals(fieldName)) { - deserializedInMageDiskDetails.diskConfiguration = reader.getString(); - } else if ("volumeList".equals(fieldName)) { - List volumeList - = reader.readArray(reader1 -> DiskVolumeDetails.fromJson(reader1)); - deserializedInMageDiskDetails.volumeList = volumeList; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageDiskExclusionInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageDiskExclusionInput.java deleted file mode 100644 index 34dce4c5969e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageDiskExclusionInput.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * DiskExclusionInput when doing enable protection of virtual machine in InMage provider. - */ -@Fluent -public final class InMageDiskExclusionInput implements JsonSerializable { - /* - * The volume label based option for disk exclusion. - */ - private List volumeOptions; - - /* - * The guest disk signature based option for disk exclusion. - */ - private List diskSignatureOptions; - - /** - * Creates an instance of InMageDiskExclusionInput class. - */ - public InMageDiskExclusionInput() { - } - - /** - * Get the volumeOptions property: The volume label based option for disk exclusion. - * - * @return the volumeOptions value. - */ - public List volumeOptions() { - return this.volumeOptions; - } - - /** - * Set the volumeOptions property: 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 diskSignatureOptions property: The guest disk signature based option for disk exclusion. - * - * @return the diskSignatureOptions value. - */ - public List diskSignatureOptions() { - return this.diskSignatureOptions; - } - - /** - * Set the diskSignatureOptions property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (volumeOptions() != null) { - volumeOptions().forEach(e -> e.validate()); - } - if (diskSignatureOptions() != null) { - diskSignatureOptions().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("volumeOptions", this.volumeOptions, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("diskSignatureOptions", this.diskSignatureOptions, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageDiskExclusionInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageDiskExclusionInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageDiskExclusionInput. - */ - public static InMageDiskExclusionInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageDiskExclusionInput deserializedInMageDiskExclusionInput = new InMageDiskExclusionInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("volumeOptions".equals(fieldName)) { - List volumeOptions - = reader.readArray(reader1 -> InMageVolumeExclusionOptions.fromJson(reader1)); - deserializedInMageDiskExclusionInput.volumeOptions = volumeOptions; - } else if ("diskSignatureOptions".equals(fieldName)) { - List diskSignatureOptions - = reader.readArray(reader1 -> InMageDiskSignatureExclusionOptions.fromJson(reader1)); - deserializedInMageDiskExclusionInput.diskSignatureOptions = diskSignatureOptions; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageDiskExclusionInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageDiskSignatureExclusionOptions.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageDiskSignatureExclusionOptions.java deleted file mode 100644 index e467b3d4e010..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageDiskSignatureExclusionOptions.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Guest disk signature based disk exclusion option when doing enable protection of virtual machine in InMage provider. - */ -@Fluent -public final class InMageDiskSignatureExclusionOptions - implements JsonSerializable { - /* - * The guest signature of disk to be excluded from replication. - */ - private String diskSignature; - - /** - * Creates an instance of InMageDiskSignatureExclusionOptions class. - */ - public InMageDiskSignatureExclusionOptions() { - } - - /** - * Get the diskSignature property: The guest signature of disk to be excluded from replication. - * - * @return the diskSignature value. - */ - public String diskSignature() { - return this.diskSignature; - } - - /** - * Set the diskSignature property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskSignature", this.diskSignature); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageDiskSignatureExclusionOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageDiskSignatureExclusionOptions if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageDiskSignatureExclusionOptions. - */ - public static InMageDiskSignatureExclusionOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageDiskSignatureExclusionOptions deserializedInMageDiskSignatureExclusionOptions - = new InMageDiskSignatureExclusionOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskSignature".equals(fieldName)) { - deserializedInMageDiskSignatureExclusionOptions.diskSignature = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageDiskSignatureExclusionOptions; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageEnableProtectionInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageEnableProtectionInput.java deleted file mode 100644 index ab1d599f532a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageEnableProtectionInput.java +++ /dev/null @@ -1,399 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * VMware Azure specific enable protection input. - */ -@Fluent -public final class InMageEnableProtectionInput extends EnableProtectionProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMage"; - - /* - * The VM Name. - */ - private String vmFriendlyName; - - /* - * The Master Target Id. - */ - private String masterTargetId; - - /* - * The Process Server Id. - */ - private String processServerId; - - /* - * The retention drive to use on the MT. - */ - private String retentionDrive; - - /* - * The CS account Id. - */ - private String runAsAccountId; - - /* - * The multi VM group Id. - */ - private String multiVmGroupId; - - /* - * The multi VM group name. - */ - private String multiVmGroupName; - - /* - * The target datastore name. - */ - private String datastoreName; - - /* - * The enable disk exclusion input. - */ - private InMageDiskExclusionInput diskExclusionInput; - - /* - * The disks to include list. - */ - private List disksToInclude; - - /** - * Creates an instance of InMageEnableProtectionInput class. - */ - public InMageEnableProtectionInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the vmFriendlyName property: The VM Name. - * - * @return the vmFriendlyName value. - */ - public String vmFriendlyName() { - return this.vmFriendlyName; - } - - /** - * Set the vmFriendlyName property: 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 masterTargetId property: The Master Target Id. - * - * @return the masterTargetId value. - */ - public String masterTargetId() { - return this.masterTargetId; - } - - /** - * Set the masterTargetId property: 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 processServerId property: The Process Server Id. - * - * @return the processServerId value. - */ - public String processServerId() { - return this.processServerId; - } - - /** - * Set the processServerId property: 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 retentionDrive property: The retention drive to use on the MT. - * - * @return the retentionDrive value. - */ - public String retentionDrive() { - return this.retentionDrive; - } - - /** - * Set the retentionDrive property: 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 runAsAccountId property: The CS account Id. - * - * @return the runAsAccountId value. - */ - public String runAsAccountId() { - return this.runAsAccountId; - } - - /** - * Set the runAsAccountId property: 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 multiVmGroupId property: The multi VM group Id. - * - * @return the multiVmGroupId value. - */ - public String multiVmGroupId() { - return this.multiVmGroupId; - } - - /** - * Set the multiVmGroupId property: 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 multiVmGroupName property: The multi VM group name. - * - * @return the multiVmGroupName value. - */ - public String multiVmGroupName() { - return this.multiVmGroupName; - } - - /** - * Set the multiVmGroupName property: 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 datastoreName property: The target datastore name. - * - * @return the datastoreName value. - */ - public String datastoreName() { - return this.datastoreName; - } - - /** - * Set the datastoreName property: 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 diskExclusionInput property: The enable disk exclusion input. - * - * @return the diskExclusionInput value. - */ - public InMageDiskExclusionInput diskExclusionInput() { - return this.diskExclusionInput; - } - - /** - * Set the diskExclusionInput property: 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 disksToInclude property: The disks to include list. - * - * @return the disksToInclude value. - */ - public List disksToInclude() { - return this.disksToInclude; - } - - /** - * Set the disksToInclude property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (masterTargetId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property masterTargetId in model InMageEnableProtectionInput")); - } - if (processServerId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property processServerId in model InMageEnableProtectionInput")); - } - if (retentionDrive() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property retentionDrive in model InMageEnableProtectionInput")); - } - if (multiVmGroupId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property multiVmGroupId in model InMageEnableProtectionInput")); - } - if (multiVmGroupName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property multiVmGroupName in model InMageEnableProtectionInput")); - } - if (diskExclusionInput() != null) { - diskExclusionInput().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageEnableProtectionInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("masterTargetId", this.masterTargetId); - jsonWriter.writeStringField("processServerId", this.processServerId); - jsonWriter.writeStringField("retentionDrive", this.retentionDrive); - jsonWriter.writeStringField("multiVmGroupId", this.multiVmGroupId); - jsonWriter.writeStringField("multiVmGroupName", this.multiVmGroupName); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("vmFriendlyName", this.vmFriendlyName); - jsonWriter.writeStringField("runAsAccountId", this.runAsAccountId); - jsonWriter.writeStringField("datastoreName", this.datastoreName); - jsonWriter.writeJsonField("diskExclusionInput", this.diskExclusionInput); - jsonWriter.writeArrayField("disksToInclude", this.disksToInclude, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageEnableProtectionInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageEnableProtectionInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageEnableProtectionInput. - */ - public static InMageEnableProtectionInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageEnableProtectionInput deserializedInMageEnableProtectionInput = new InMageEnableProtectionInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("masterTargetId".equals(fieldName)) { - deserializedInMageEnableProtectionInput.masterTargetId = reader.getString(); - } else if ("processServerId".equals(fieldName)) { - deserializedInMageEnableProtectionInput.processServerId = reader.getString(); - } else if ("retentionDrive".equals(fieldName)) { - deserializedInMageEnableProtectionInput.retentionDrive = reader.getString(); - } else if ("multiVmGroupId".equals(fieldName)) { - deserializedInMageEnableProtectionInput.multiVmGroupId = reader.getString(); - } else if ("multiVmGroupName".equals(fieldName)) { - deserializedInMageEnableProtectionInput.multiVmGroupName = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedInMageEnableProtectionInput.instanceType = reader.getString(); - } else if ("vmFriendlyName".equals(fieldName)) { - deserializedInMageEnableProtectionInput.vmFriendlyName = reader.getString(); - } else if ("runAsAccountId".equals(fieldName)) { - deserializedInMageEnableProtectionInput.runAsAccountId = reader.getString(); - } else if ("datastoreName".equals(fieldName)) { - deserializedInMageEnableProtectionInput.datastoreName = reader.getString(); - } else if ("diskExclusionInput".equals(fieldName)) { - deserializedInMageEnableProtectionInput.diskExclusionInput - = InMageDiskExclusionInput.fromJson(reader); - } else if ("disksToInclude".equals(fieldName)) { - List disksToInclude = reader.readArray(reader1 -> reader1.getString()); - deserializedInMageEnableProtectionInput.disksToInclude = disksToInclude; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageEnableProtectionInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageFabricSwitchProviderBlockingErrorDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageFabricSwitchProviderBlockingErrorDetails.java deleted file mode 100644 index 35c9f2fddf1f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageFabricSwitchProviderBlockingErrorDetails.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * InMageFabric switch provider blocking error details. - */ -@Immutable -public final class InMageFabricSwitchProviderBlockingErrorDetails - implements JsonSerializable { - /* - * The error code. - */ - private String errorCode; - - /* - * The error message. - */ - private String errorMessage; - - /* - * The possible causes. - */ - private String possibleCauses; - - /* - * The recommended action. - */ - private String recommendedAction; - - /* - * The error message parameters. - */ - private Map errorMessageParameters; - - /* - * The error tags. - */ - private Map errorTags; - - /** - * Creates an instance of InMageFabricSwitchProviderBlockingErrorDetails class. - */ - public InMageFabricSwitchProviderBlockingErrorDetails() { - } - - /** - * Get the errorCode property: The error code. - * - * @return the errorCode value. - */ - public String errorCode() { - return this.errorCode; - } - - /** - * Get the errorMessage property: The error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the possibleCauses property: The possible causes. - * - * @return the possibleCauses value. - */ - public String possibleCauses() { - return this.possibleCauses; - } - - /** - * Get the recommendedAction property: The recommended action. - * - * @return the recommendedAction value. - */ - public String recommendedAction() { - return this.recommendedAction; - } - - /** - * Get the errorMessageParameters property: The error message parameters. - * - * @return the errorMessageParameters value. - */ - public Map errorMessageParameters() { - return this.errorMessageParameters; - } - - /** - * Get the errorTags property: The error tags. - * - * @return the errorTags value. - */ - public Map errorTags() { - return this.errorTags; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageFabricSwitchProviderBlockingErrorDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageFabricSwitchProviderBlockingErrorDetails if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageFabricSwitchProviderBlockingErrorDetails. - */ - public static InMageFabricSwitchProviderBlockingErrorDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageFabricSwitchProviderBlockingErrorDetails deserializedInMageFabricSwitchProviderBlockingErrorDetails - = new InMageFabricSwitchProviderBlockingErrorDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("errorCode".equals(fieldName)) { - deserializedInMageFabricSwitchProviderBlockingErrorDetails.errorCode = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedInMageFabricSwitchProviderBlockingErrorDetails.errorMessage = reader.getString(); - } else if ("possibleCauses".equals(fieldName)) { - deserializedInMageFabricSwitchProviderBlockingErrorDetails.possibleCauses = reader.getString(); - } else if ("recommendedAction".equals(fieldName)) { - deserializedInMageFabricSwitchProviderBlockingErrorDetails.recommendedAction = reader.getString(); - } else if ("errorMessageParameters".equals(fieldName)) { - Map errorMessageParameters = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageFabricSwitchProviderBlockingErrorDetails.errorMessageParameters - = errorMessageParameters; - } else if ("errorTags".equals(fieldName)) { - Map errorTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageFabricSwitchProviderBlockingErrorDetails.errorTags = errorTags; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageFabricSwitchProviderBlockingErrorDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMagePolicyDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMagePolicyDetails.java deleted file mode 100644 index 0ae0423e92d8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMagePolicyDetails.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMage specific protection profile details. - */ -@Fluent -public final class InMagePolicyDetails extends PolicyProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "InMage"; - - /* - * The recovery point threshold in minutes. - */ - private Integer recoveryPointThresholdInMinutes; - - /* - * The duration in minutes until which the recovery points need to be stored. - */ - private Integer recoveryPointHistory; - - /* - * The app consistent snapshot frequency in minutes. - */ - private Integer appConsistentFrequencyInMinutes; - - /* - * A value indicating whether multi-VM sync has to be enabled. - */ - private String multiVmSyncStatus; - - /** - * Creates an instance of InMagePolicyDetails class. - */ - public InMagePolicyDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointThresholdInMinutes property: The recovery point threshold in minutes. - * - * @return the recoveryPointThresholdInMinutes value. - */ - public Integer recoveryPointThresholdInMinutes() { - return this.recoveryPointThresholdInMinutes; - } - - /** - * Set the recoveryPointThresholdInMinutes property: 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 recoveryPointHistory property: 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 recoveryPointHistory property: 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 appConsistentFrequencyInMinutes property: The app consistent snapshot frequency in minutes. - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: 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 the multiVmSyncStatus property: A value indicating whether multi-VM sync has to be enabled. - * - * @return the multiVmSyncStatus value. - */ - public String multiVmSyncStatus() { - return this.multiVmSyncStatus; - } - - /** - * Set the multiVmSyncStatus property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPointThresholdInMinutes", this.recoveryPointThresholdInMinutes); - jsonWriter.writeNumberField("recoveryPointHistory", this.recoveryPointHistory); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - jsonWriter.writeStringField("multiVmSyncStatus", this.multiVmSyncStatus); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMagePolicyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMagePolicyDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the InMagePolicyDetails. - */ - public static InMagePolicyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMagePolicyDetails deserializedInMagePolicyDetails = new InMagePolicyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMagePolicyDetails.instanceType = reader.getString(); - } else if ("recoveryPointThresholdInMinutes".equals(fieldName)) { - deserializedInMagePolicyDetails.recoveryPointThresholdInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("recoveryPointHistory".equals(fieldName)) { - deserializedInMagePolicyDetails.recoveryPointHistory = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMagePolicyDetails.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("multiVmSyncStatus".equals(fieldName)) { - deserializedInMagePolicyDetails.multiVmSyncStatus = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMagePolicyDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMagePolicyInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMagePolicyInput.java deleted file mode 100644 index e6234f800c94..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMagePolicyInput.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMWare Azure specific protection profile Input. - */ -@Fluent -public final class InMagePolicyInput extends PolicyProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMage"; - - /* - * The recovery point threshold in minutes. - */ - private Integer recoveryPointThresholdInMinutes; - - /* - * The duration in minutes until which the recovery points need to be stored. - */ - private Integer recoveryPointHistory; - - /* - * The app consistent snapshot frequency (in minutes). - */ - private Integer appConsistentFrequencyInMinutes; - - /* - * A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. - */ - private SetMultiVmSyncStatus multiVmSyncStatus; - - /** - * Creates an instance of InMagePolicyInput class. - */ - public InMagePolicyInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointThresholdInMinutes property: The recovery point threshold in minutes. - * - * @return the recoveryPointThresholdInMinutes value. - */ - public Integer recoveryPointThresholdInMinutes() { - return this.recoveryPointThresholdInMinutes; - } - - /** - * Set the recoveryPointThresholdInMinutes property: 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 recoveryPointHistory property: 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 recoveryPointHistory property: 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 appConsistentFrequencyInMinutes property: The app consistent snapshot frequency (in minutes). - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: 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 the multiVmSyncStatus property: A value indicating whether multi-VM sync has to be enabled. Value should be - * 'Enabled' or 'Disabled'. - * - * @return the multiVmSyncStatus value. - */ - public SetMultiVmSyncStatus multiVmSyncStatus() { - return this.multiVmSyncStatus; - } - - /** - * Set the multiVmSyncStatus property: A value indicating whether multi-VM sync has to be enabled. Value should be - * 'Enabled' or 'Disabled'. - * - * @param multiVmSyncStatus the multiVmSyncStatus value to set. - * @return the InMagePolicyInput object itself. - */ - public InMagePolicyInput withMultiVmSyncStatus(SetMultiVmSyncStatus multiVmSyncStatus) { - this.multiVmSyncStatus = multiVmSyncStatus; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (multiVmSyncStatus() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property multiVmSyncStatus in model InMagePolicyInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMagePolicyInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("multiVmSyncStatus", - this.multiVmSyncStatus == null ? null : this.multiVmSyncStatus.toString()); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPointThresholdInMinutes", this.recoveryPointThresholdInMinutes); - jsonWriter.writeNumberField("recoveryPointHistory", this.recoveryPointHistory); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMagePolicyInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMagePolicyInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMagePolicyInput. - */ - public static InMagePolicyInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMagePolicyInput deserializedInMagePolicyInput = new InMagePolicyInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("multiVmSyncStatus".equals(fieldName)) { - deserializedInMagePolicyInput.multiVmSyncStatus - = SetMultiVmSyncStatus.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedInMagePolicyInput.instanceType = reader.getString(); - } else if ("recoveryPointThresholdInMinutes".equals(fieldName)) { - deserializedInMagePolicyInput.recoveryPointThresholdInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("recoveryPointHistory".equals(fieldName)) { - deserializedInMagePolicyInput.recoveryPointHistory = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMagePolicyInput.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedInMagePolicyInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageProtectedDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageProtectedDiskDetails.java deleted file mode 100644 index 432fd42f88eb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageProtectedDiskDetails.java +++ /dev/null @@ -1,702 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * InMage protected disk details. - */ -@Fluent -public final class InMageProtectedDiskDetails implements JsonSerializable { - /* - * The disk id. - */ - private String diskId; - - /* - * The disk name. - */ - private String diskName; - - /* - * The protection stage. - */ - private String protectionStage; - - /* - * The health error code for the disk. - */ - private String healthErrorCode; - - /* - * The RPO in seconds. - */ - private Long rpoInSeconds; - - /* - * A value indicating whether resync is required for this disk. - */ - private String resyncRequired; - - /* - * The resync progress percentage. - */ - private Integer resyncProgressPercentage; - - /* - * The resync duration in seconds. - */ - private Long resyncDurationInSeconds; - - /* - * The disk capacity in bytes. - */ - private Long diskCapacityInBytes; - - /* - * The file system capacity in bytes. - */ - private Long fileSystemCapacityInBytes; - - /* - * The source data transit in MB. - */ - private Double sourceDataInMB; - - /* - * The PS data transit in MB. - */ - private Double psDataInMB; - - /* - * The target data transit in MB. - */ - private Double targetDataInMB; - - /* - * A value indicating whether disk is resized. - */ - private String diskResized; - - /* - * The last RPO calculated time. - */ - private OffsetDateTime lastRpoCalculatedTime; - - /* - * The resync processed bytes. - */ - private Long resyncProcessedBytes; - - /* - * The resync total transferred bytes. - */ - private Long resyncTotalTransferredBytes; - - /* - * The resync last 15 minutes transferred bytes. - */ - private Long resyncLast15MinutesTransferredBytes; - - /* - * The last data transfer time in UTC. - */ - private OffsetDateTime resyncLastDataTransferTimeUtc; - - /* - * The resync start time. - */ - private OffsetDateTime resyncStartTime; - - /* - * The Progress Health. - */ - private String progressHealth; - - /* - * The Progress Status. - */ - private String progressStatus; - - /** - * Creates an instance of InMageProtectedDiskDetails class. - */ - public InMageProtectedDiskDetails() { - } - - /** - * Get the diskId property: The disk id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: 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 diskName property: The disk name. - * - * @return the diskName value. - */ - public String diskName() { - return this.diskName; - } - - /** - * Set the diskName property: 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 protectionStage property: The protection stage. - * - * @return the protectionStage value. - */ - public String protectionStage() { - return this.protectionStage; - } - - /** - * Set the protectionStage property: 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 healthErrorCode property: The health error code for the disk. - * - * @return the healthErrorCode value. - */ - public String healthErrorCode() { - return this.healthErrorCode; - } - - /** - * Set the healthErrorCode property: 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 rpoInSeconds property: The RPO in seconds. - * - * @return the rpoInSeconds value. - */ - public Long rpoInSeconds() { - return this.rpoInSeconds; - } - - /** - * Set the rpoInSeconds property: 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 the resyncRequired property: A value indicating whether resync is required for this disk. - * - * @return the resyncRequired value. - */ - public String resyncRequired() { - return this.resyncRequired; - } - - /** - * Set the resyncRequired property: 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 resyncProgressPercentage property: The resync progress percentage. - * - * @return the resyncProgressPercentage value. - */ - public Integer resyncProgressPercentage() { - return this.resyncProgressPercentage; - } - - /** - * Set the resyncProgressPercentage property: 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 resyncDurationInSeconds property: The resync duration in seconds. - * - * @return the resyncDurationInSeconds value. - */ - public Long resyncDurationInSeconds() { - return this.resyncDurationInSeconds; - } - - /** - * Set the resyncDurationInSeconds property: 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 diskCapacityInBytes property: The disk capacity in bytes. - * - * @return the diskCapacityInBytes value. - */ - public Long diskCapacityInBytes() { - return this.diskCapacityInBytes; - } - - /** - * Set the diskCapacityInBytes property: 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 fileSystemCapacityInBytes property: The file system capacity in bytes. - * - * @return the fileSystemCapacityInBytes value. - */ - public Long fileSystemCapacityInBytes() { - return this.fileSystemCapacityInBytes; - } - - /** - * Set the fileSystemCapacityInBytes property: 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 sourceDataInMB property: The source data transit in MB. - * - * @return the sourceDataInMB value. - */ - public Double sourceDataInMB() { - return this.sourceDataInMB; - } - - /** - * Set the sourceDataInMB property: 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 psDataInMB property: The PS data transit in MB. - * - * @return the psDataInMB value. - */ - public Double psDataInMB() { - return this.psDataInMB; - } - - /** - * Set the psDataInMB property: 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 targetDataInMB property: The target data transit in MB. - * - * @return the targetDataInMB value. - */ - public Double targetDataInMB() { - return this.targetDataInMB; - } - - /** - * Set the targetDataInMB property: 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 the diskResized property: A value indicating whether disk is resized. - * - * @return the diskResized value. - */ - public String diskResized() { - return this.diskResized; - } - - /** - * Set the diskResized property: 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 lastRpoCalculatedTime property: The last RPO calculated time. - * - * @return the lastRpoCalculatedTime value. - */ - public OffsetDateTime lastRpoCalculatedTime() { - return this.lastRpoCalculatedTime; - } - - /** - * Set the lastRpoCalculatedTime property: The last RPO calculated time. - * - * @param lastRpoCalculatedTime the lastRpoCalculatedTime value to set. - * @return the InMageProtectedDiskDetails object itself. - */ - public InMageProtectedDiskDetails withLastRpoCalculatedTime(OffsetDateTime lastRpoCalculatedTime) { - this.lastRpoCalculatedTime = lastRpoCalculatedTime; - return this; - } - - /** - * Get the resyncProcessedBytes property: The resync processed bytes. - * - * @return the resyncProcessedBytes value. - */ - public Long resyncProcessedBytes() { - return this.resyncProcessedBytes; - } - - /** - * Set the resyncProcessedBytes property: The resync processed bytes. - * - * @param resyncProcessedBytes the resyncProcessedBytes value to set. - * @return the InMageProtectedDiskDetails object itself. - */ - public InMageProtectedDiskDetails withResyncProcessedBytes(Long resyncProcessedBytes) { - this.resyncProcessedBytes = resyncProcessedBytes; - return this; - } - - /** - * Get the resyncTotalTransferredBytes property: The resync total transferred bytes. - * - * @return the resyncTotalTransferredBytes value. - */ - public Long resyncTotalTransferredBytes() { - return this.resyncTotalTransferredBytes; - } - - /** - * Set the resyncTotalTransferredBytes property: The resync total transferred bytes. - * - * @param resyncTotalTransferredBytes the resyncTotalTransferredBytes value to set. - * @return the InMageProtectedDiskDetails object itself. - */ - public InMageProtectedDiskDetails withResyncTotalTransferredBytes(Long resyncTotalTransferredBytes) { - this.resyncTotalTransferredBytes = resyncTotalTransferredBytes; - return this; - } - - /** - * Get the resyncLast15MinutesTransferredBytes property: The resync last 15 minutes transferred bytes. - * - * @return the resyncLast15MinutesTransferredBytes value. - */ - public Long resyncLast15MinutesTransferredBytes() { - return this.resyncLast15MinutesTransferredBytes; - } - - /** - * Set the resyncLast15MinutesTransferredBytes property: The resync last 15 minutes transferred bytes. - * - * @param resyncLast15MinutesTransferredBytes the resyncLast15MinutesTransferredBytes value to set. - * @return the InMageProtectedDiskDetails object itself. - */ - public InMageProtectedDiskDetails - withResyncLast15MinutesTransferredBytes(Long resyncLast15MinutesTransferredBytes) { - this.resyncLast15MinutesTransferredBytes = resyncLast15MinutesTransferredBytes; - return this; - } - - /** - * Get the resyncLastDataTransferTimeUtc property: The last data transfer time in UTC. - * - * @return the resyncLastDataTransferTimeUtc value. - */ - public OffsetDateTime resyncLastDataTransferTimeUtc() { - return this.resyncLastDataTransferTimeUtc; - } - - /** - * Set the resyncLastDataTransferTimeUtc property: The last data transfer time in UTC. - * - * @param resyncLastDataTransferTimeUtc the resyncLastDataTransferTimeUtc value to set. - * @return the InMageProtectedDiskDetails object itself. - */ - public InMageProtectedDiskDetails withResyncLastDataTransferTimeUtc(OffsetDateTime resyncLastDataTransferTimeUtc) { - this.resyncLastDataTransferTimeUtc = resyncLastDataTransferTimeUtc; - return this; - } - - /** - * Get the resyncStartTime property: The resync start time. - * - * @return the resyncStartTime value. - */ - public OffsetDateTime resyncStartTime() { - return this.resyncStartTime; - } - - /** - * Set the resyncStartTime property: The resync start time. - * - * @param resyncStartTime the resyncStartTime value to set. - * @return the InMageProtectedDiskDetails object itself. - */ - public InMageProtectedDiskDetails withResyncStartTime(OffsetDateTime resyncStartTime) { - this.resyncStartTime = resyncStartTime; - return this; - } - - /** - * Get the progressHealth property: The Progress Health. - * - * @return the progressHealth value. - */ - public String progressHealth() { - return this.progressHealth; - } - - /** - * Set the progressHealth property: The Progress Health. - * - * @param progressHealth the progressHealth value to set. - * @return the InMageProtectedDiskDetails object itself. - */ - public InMageProtectedDiskDetails withProgressHealth(String progressHealth) { - this.progressHealth = progressHealth; - return this; - } - - /** - * Get the progressStatus property: The Progress Status. - * - * @return the progressStatus value. - */ - public String progressStatus() { - return this.progressStatus; - } - - /** - * Set the progressStatus property: The Progress Status. - * - * @param progressStatus the progressStatus value to set. - * @return the InMageProtectedDiskDetails object itself. - */ - public InMageProtectedDiskDetails withProgressStatus(String progressStatus) { - this.progressStatus = progressStatus; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("diskName", this.diskName); - jsonWriter.writeStringField("protectionStage", this.protectionStage); - jsonWriter.writeStringField("healthErrorCode", this.healthErrorCode); - jsonWriter.writeNumberField("rpoInSeconds", this.rpoInSeconds); - jsonWriter.writeStringField("resyncRequired", this.resyncRequired); - jsonWriter.writeNumberField("resyncProgressPercentage", this.resyncProgressPercentage); - jsonWriter.writeNumberField("resyncDurationInSeconds", this.resyncDurationInSeconds); - jsonWriter.writeNumberField("diskCapacityInBytes", this.diskCapacityInBytes); - jsonWriter.writeNumberField("fileSystemCapacityInBytes", this.fileSystemCapacityInBytes); - jsonWriter.writeNumberField("sourceDataInMB", this.sourceDataInMB); - jsonWriter.writeNumberField("psDataInMB", this.psDataInMB); - jsonWriter.writeNumberField("targetDataInMB", this.targetDataInMB); - jsonWriter.writeStringField("diskResized", this.diskResized); - jsonWriter.writeStringField("lastRpoCalculatedTime", - this.lastRpoCalculatedTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastRpoCalculatedTime)); - jsonWriter.writeNumberField("resyncProcessedBytes", this.resyncProcessedBytes); - jsonWriter.writeNumberField("resyncTotalTransferredBytes", this.resyncTotalTransferredBytes); - jsonWriter.writeNumberField("resyncLast15MinutesTransferredBytes", this.resyncLast15MinutesTransferredBytes); - jsonWriter.writeStringField("resyncLastDataTransferTimeUTC", - this.resyncLastDataTransferTimeUtc == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.resyncLastDataTransferTimeUtc)); - jsonWriter.writeStringField("resyncStartTime", - this.resyncStartTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.resyncStartTime)); - jsonWriter.writeStringField("progressHealth", this.progressHealth); - jsonWriter.writeStringField("progressStatus", this.progressStatus); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageProtectedDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageProtectedDiskDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageProtectedDiskDetails. - */ - public static InMageProtectedDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageProtectedDiskDetails deserializedInMageProtectedDiskDetails = new InMageProtectedDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.diskId = reader.getString(); - } else if ("diskName".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.diskName = reader.getString(); - } else if ("protectionStage".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.protectionStage = reader.getString(); - } else if ("healthErrorCode".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.healthErrorCode = reader.getString(); - } else if ("rpoInSeconds".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.rpoInSeconds = reader.getNullable(JsonReader::getLong); - } else if ("resyncRequired".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.resyncRequired = reader.getString(); - } else if ("resyncProgressPercentage".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.resyncProgressPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("resyncDurationInSeconds".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.resyncDurationInSeconds - = reader.getNullable(JsonReader::getLong); - } else if ("diskCapacityInBytes".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.diskCapacityInBytes - = reader.getNullable(JsonReader::getLong); - } else if ("fileSystemCapacityInBytes".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.fileSystemCapacityInBytes - = reader.getNullable(JsonReader::getLong); - } else if ("sourceDataInMB".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.sourceDataInMB = reader.getNullable(JsonReader::getDouble); - } else if ("psDataInMB".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.psDataInMB = reader.getNullable(JsonReader::getDouble); - } else if ("targetDataInMB".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.targetDataInMB = reader.getNullable(JsonReader::getDouble); - } else if ("diskResized".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.diskResized = reader.getString(); - } else if ("lastRpoCalculatedTime".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.lastRpoCalculatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resyncProcessedBytes".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.resyncProcessedBytes - = reader.getNullable(JsonReader::getLong); - } else if ("resyncTotalTransferredBytes".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.resyncTotalTransferredBytes - = reader.getNullable(JsonReader::getLong); - } else if ("resyncLast15MinutesTransferredBytes".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.resyncLast15MinutesTransferredBytes - = reader.getNullable(JsonReader::getLong); - } else if ("resyncLastDataTransferTimeUTC".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.resyncLastDataTransferTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resyncStartTime".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.resyncStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("progressHealth".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.progressHealth = reader.getString(); - } else if ("progressStatus".equals(fieldName)) { - deserializedInMageProtectedDiskDetails.progressStatus = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageProtectedDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmAgentUpgradeBlockingErrorDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmAgentUpgradeBlockingErrorDetails.java deleted file mode 100644 index 3abadfeefc26..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmAgentUpgradeBlockingErrorDetails.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * InMageRcm source agent upgrade blocking error details. - */ -@Immutable -public final class InMageRcmAgentUpgradeBlockingErrorDetails - implements JsonSerializable { - /* - * The error code. - */ - private String errorCode; - - /* - * The error message. - */ - private String errorMessage; - - /* - * The possible causes. - */ - private String possibleCauses; - - /* - * The recommended action. - */ - private String recommendedAction; - - /* - * The error message parameters. - */ - private Map errorMessageParameters; - - /* - * The error tags. - */ - private Map errorTags; - - /** - * Creates an instance of InMageRcmAgentUpgradeBlockingErrorDetails class. - */ - public InMageRcmAgentUpgradeBlockingErrorDetails() { - } - - /** - * Get the errorCode property: The error code. - * - * @return the errorCode value. - */ - public String errorCode() { - return this.errorCode; - } - - /** - * Get the errorMessage property: The error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the possibleCauses property: The possible causes. - * - * @return the possibleCauses value. - */ - public String possibleCauses() { - return this.possibleCauses; - } - - /** - * Get the recommendedAction property: The recommended action. - * - * @return the recommendedAction value. - */ - public String recommendedAction() { - return this.recommendedAction; - } - - /** - * Get the errorMessageParameters property: The error message parameters. - * - * @return the errorMessageParameters value. - */ - public Map errorMessageParameters() { - return this.errorMessageParameters; - } - - /** - * Get the errorTags property: The error tags. - * - * @return the errorTags value. - */ - public Map errorTags() { - return this.errorTags; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmAgentUpgradeBlockingErrorDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmAgentUpgradeBlockingErrorDetails if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmAgentUpgradeBlockingErrorDetails. - */ - public static InMageRcmAgentUpgradeBlockingErrorDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmAgentUpgradeBlockingErrorDetails deserializedInMageRcmAgentUpgradeBlockingErrorDetails - = new InMageRcmAgentUpgradeBlockingErrorDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("errorCode".equals(fieldName)) { - deserializedInMageRcmAgentUpgradeBlockingErrorDetails.errorCode = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedInMageRcmAgentUpgradeBlockingErrorDetails.errorMessage = reader.getString(); - } else if ("possibleCauses".equals(fieldName)) { - deserializedInMageRcmAgentUpgradeBlockingErrorDetails.possibleCauses = reader.getString(); - } else if ("recommendedAction".equals(fieldName)) { - deserializedInMageRcmAgentUpgradeBlockingErrorDetails.recommendedAction = reader.getString(); - } else if ("errorMessageParameters".equals(fieldName)) { - Map errorMessageParameters = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageRcmAgentUpgradeBlockingErrorDetails.errorMessageParameters - = errorMessageParameters; - } else if ("errorTags".equals(fieldName)) { - Map errorTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageRcmAgentUpgradeBlockingErrorDetails.errorTags = errorTags; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmAgentUpgradeBlockingErrorDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmApplianceDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmApplianceDetails.java deleted file mode 100644 index fb91afdc98d5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmApplianceDetails.java +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * InMageRcm appliance details. - */ -@Immutable -public final class InMageRcmApplianceDetails implements JsonSerializable { - /* - * The appliance Id. - */ - private String id; - - /* - * The appliance name. - */ - private String name; - - /* - * The fabric ARM Id. - */ - private String fabricArmId; - - /* - * The process server. - */ - private ProcessServerDetails processServer; - - /* - * The of RCM proxy. - */ - private RcmProxyDetails rcmProxy; - - /* - * The push installer. - */ - private PushInstallerDetails pushInstaller; - - /* - * The replication agent. - */ - private ReplicationAgentDetails replicationAgent; - - /* - * The reprotect agent. - */ - private ReprotectAgentDetails reprotectAgent; - - /* - * The Mars agent. - */ - private MarsAgentDetails marsAgent; - - /* - * The DRA. - */ - private DraDetails dra; - - /* - * The switch provider blocking error information. - */ - private List switchProviderBlockingErrorDetails; - - /** - * Creates an instance of InMageRcmApplianceDetails class. - */ - public InMageRcmApplianceDetails() { - } - - /** - * Get the id property: The appliance Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The appliance name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the fabricArmId property: The fabric ARM Id. - * - * @return the fabricArmId value. - */ - public String fabricArmId() { - return this.fabricArmId; - } - - /** - * Get the processServer property: The process server. - * - * @return the processServer value. - */ - public ProcessServerDetails processServer() { - return this.processServer; - } - - /** - * Get the rcmProxy property: The of RCM proxy. - * - * @return the rcmProxy value. - */ - public RcmProxyDetails rcmProxy() { - return this.rcmProxy; - } - - /** - * Get the pushInstaller property: The push installer. - * - * @return the pushInstaller value. - */ - public PushInstallerDetails pushInstaller() { - return this.pushInstaller; - } - - /** - * Get the replicationAgent property: The replication agent. - * - * @return the replicationAgent value. - */ - public ReplicationAgentDetails replicationAgent() { - return this.replicationAgent; - } - - /** - * Get the reprotectAgent property: The reprotect agent. - * - * @return the reprotectAgent value. - */ - public ReprotectAgentDetails reprotectAgent() { - return this.reprotectAgent; - } - - /** - * Get the marsAgent property: The Mars agent. - * - * @return the marsAgent value. - */ - public MarsAgentDetails marsAgent() { - return this.marsAgent; - } - - /** - * Get the dra property: The DRA. - * - * @return the dra value. - */ - public DraDetails dra() { - return this.dra; - } - - /** - * Get the switchProviderBlockingErrorDetails property: The switch provider blocking error information. - * - * @return the switchProviderBlockingErrorDetails value. - */ - public List switchProviderBlockingErrorDetails() { - return this.switchProviderBlockingErrorDetails; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (processServer() != null) { - processServer().validate(); - } - if (rcmProxy() != null) { - rcmProxy().validate(); - } - if (pushInstaller() != null) { - pushInstaller().validate(); - } - if (replicationAgent() != null) { - replicationAgent().validate(); - } - if (reprotectAgent() != null) { - reprotectAgent().validate(); - } - if (marsAgent() != null) { - marsAgent().validate(); - } - if (dra() != null) { - dra().validate(); - } - if (switchProviderBlockingErrorDetails() != null) { - switchProviderBlockingErrorDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmApplianceDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmApplianceDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmApplianceDetails. - */ - public static InMageRcmApplianceDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmApplianceDetails deserializedInMageRcmApplianceDetails = new InMageRcmApplianceDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedInMageRcmApplianceDetails.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedInMageRcmApplianceDetails.name = reader.getString(); - } else if ("fabricArmId".equals(fieldName)) { - deserializedInMageRcmApplianceDetails.fabricArmId = reader.getString(); - } else if ("processServer".equals(fieldName)) { - deserializedInMageRcmApplianceDetails.processServer = ProcessServerDetails.fromJson(reader); - } else if ("rcmProxy".equals(fieldName)) { - deserializedInMageRcmApplianceDetails.rcmProxy = RcmProxyDetails.fromJson(reader); - } else if ("pushInstaller".equals(fieldName)) { - deserializedInMageRcmApplianceDetails.pushInstaller = PushInstallerDetails.fromJson(reader); - } else if ("replicationAgent".equals(fieldName)) { - deserializedInMageRcmApplianceDetails.replicationAgent = ReplicationAgentDetails.fromJson(reader); - } else if ("reprotectAgent".equals(fieldName)) { - deserializedInMageRcmApplianceDetails.reprotectAgent = ReprotectAgentDetails.fromJson(reader); - } else if ("marsAgent".equals(fieldName)) { - deserializedInMageRcmApplianceDetails.marsAgent = MarsAgentDetails.fromJson(reader); - } else if ("dra".equals(fieldName)) { - deserializedInMageRcmApplianceDetails.dra = DraDetails.fromJson(reader); - } else if ("switchProviderBlockingErrorDetails".equals(fieldName)) { - List switchProviderBlockingErrorDetails = reader - .readArray(reader1 -> InMageRcmFabricSwitchProviderBlockingErrorDetails.fromJson(reader1)); - deserializedInMageRcmApplianceDetails.switchProviderBlockingErrorDetails - = switchProviderBlockingErrorDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmApplianceDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmApplianceSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmApplianceSpecificDetails.java deleted file mode 100644 index 19b466217495..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmApplianceSpecificDetails.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * InMageRcm appliance specific details. - */ -@Immutable -public final class InMageRcmApplianceSpecificDetails extends ApplianceSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "InMageRcm"; - - /* - * The list of appliances. - */ - private List appliances; - - /** - * Creates an instance of InMageRcmApplianceSpecificDetails class. - */ - public InMageRcmApplianceSpecificDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the appliances property: The list of appliances. - * - * @return the appliances value. - */ - public List appliances() { - return this.appliances; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (appliances() != null) { - appliances().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmApplianceSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmApplianceSpecificDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmApplianceSpecificDetails. - */ - public static InMageRcmApplianceSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmApplianceSpecificDetails deserializedInMageRcmApplianceSpecificDetails - = new InMageRcmApplianceSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmApplianceSpecificDetails.instanceType = reader.getString(); - } else if ("appliances".equals(fieldName)) { - List appliances - = reader.readArray(reader1 -> InMageRcmApplianceDetails.fromJson(reader1)); - deserializedInMageRcmApplianceSpecificDetails.appliances = appliances; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmApplianceSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmApplyRecoveryPointInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmApplyRecoveryPointInput.java deleted file mode 100644 index 306ba8099f11..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmApplyRecoveryPointInput.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * ApplyRecoveryPoint input specific to InMageRcm provider. - */ -@Fluent -public final class InMageRcmApplyRecoveryPointInput extends ApplyRecoveryPointProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageRcm"; - - /* - * The recovery point Id. - */ - private String recoveryPointId; - - /** - * Creates an instance of InMageRcmApplyRecoveryPointInput class. - */ - public InMageRcmApplyRecoveryPointInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointId property: The recovery point Id. - * - * @return the recoveryPointId value. - */ - public String recoveryPointId() { - return this.recoveryPointId; - } - - /** - * Set the recoveryPointId property: The recovery point Id. - * - * @param recoveryPointId the recoveryPointId value to set. - * @return the InMageRcmApplyRecoveryPointInput object itself. - */ - public InMageRcmApplyRecoveryPointInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryPointId in model InMageRcmApplyRecoveryPointInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageRcmApplyRecoveryPointInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmApplyRecoveryPointInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmApplyRecoveryPointInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageRcmApplyRecoveryPointInput. - */ - public static InMageRcmApplyRecoveryPointInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmApplyRecoveryPointInput deserializedInMageRcmApplyRecoveryPointInput - = new InMageRcmApplyRecoveryPointInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryPointId".equals(fieldName)) { - deserializedInMageRcmApplyRecoveryPointInput.recoveryPointId = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedInMageRcmApplyRecoveryPointInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmApplyRecoveryPointInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmDiscoveredProtectedVmDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmDiscoveredProtectedVmDetails.java deleted file mode 100644 index 01aff8120e51..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmDiscoveredProtectedVmDetails.java +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * InMageRcm discovered protected VM details. - */ -@Immutable -public final class InMageRcmDiscoveredProtectedVmDetails - implements JsonSerializable { - /* - * The VCenter Id. - */ - private String vCenterId; - - /* - * The VCenter fqdn. - */ - private String vCenterFqdn; - - /* - * The list of datastores. - */ - private List datastores; - - /* - * The list of IP addresses. - */ - private List ipAddresses; - - /* - * The VMware tools status. - */ - private String vmwareToolsStatus; - - /* - * The VM power status. - */ - private String powerStatus; - - /* - * The VM fqdn. - */ - private String vmFqdn; - - /* - * The VM's OS name. - */ - private String osName; - - /* - * The SDS created timestamp. - */ - private OffsetDateTime createdTimestamp; - - /* - * The SDS updated timestamp. - */ - private OffsetDateTime updatedTimestamp; - - /* - * A value indicating whether the VM is deleted. - */ - private Boolean isDeleted; - - /* - * The last time when SDS information discovered in SRS. - */ - private OffsetDateTime lastDiscoveryTimeInUtc; - - /** - * Creates an instance of InMageRcmDiscoveredProtectedVmDetails class. - */ - public InMageRcmDiscoveredProtectedVmDetails() { - } - - /** - * Get the vCenterId property: The VCenter Id. - * - * @return the vCenterId value. - */ - public String vCenterId() { - return this.vCenterId; - } - - /** - * Get the vCenterFqdn property: The VCenter fqdn. - * - * @return the vCenterFqdn value. - */ - public String vCenterFqdn() { - return this.vCenterFqdn; - } - - /** - * Get the datastores property: The list of datastores. - * - * @return the datastores value. - */ - public List datastores() { - return this.datastores; - } - - /** - * Get the ipAddresses property: The list of IP addresses. - * - * @return the ipAddresses value. - */ - public List ipAddresses() { - return this.ipAddresses; - } - - /** - * Get the vmwareToolsStatus property: The VMware tools status. - * - * @return the vmwareToolsStatus value. - */ - public String vmwareToolsStatus() { - return this.vmwareToolsStatus; - } - - /** - * Get the powerStatus property: The VM power status. - * - * @return the powerStatus value. - */ - public String powerStatus() { - return this.powerStatus; - } - - /** - * Get the vmFqdn property: The VM fqdn. - * - * @return the vmFqdn value. - */ - public String vmFqdn() { - return this.vmFqdn; - } - - /** - * Get the osName property: The VM's OS name. - * - * @return the osName value. - */ - public String osName() { - return this.osName; - } - - /** - * Get the createdTimestamp property: The SDS created timestamp. - * - * @return the createdTimestamp value. - */ - public OffsetDateTime createdTimestamp() { - return this.createdTimestamp; - } - - /** - * Get the updatedTimestamp property: The SDS updated timestamp. - * - * @return the updatedTimestamp value. - */ - public OffsetDateTime updatedTimestamp() { - return this.updatedTimestamp; - } - - /** - * Get the isDeleted property: A value indicating whether the VM is deleted. - * - * @return the isDeleted value. - */ - public Boolean isDeleted() { - return this.isDeleted; - } - - /** - * Get the lastDiscoveryTimeInUtc property: The last time when SDS information discovered in SRS. - * - * @return the lastDiscoveryTimeInUtc value. - */ - public OffsetDateTime lastDiscoveryTimeInUtc() { - return this.lastDiscoveryTimeInUtc; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmDiscoveredProtectedVmDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmDiscoveredProtectedVmDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmDiscoveredProtectedVmDetails. - */ - public static InMageRcmDiscoveredProtectedVmDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmDiscoveredProtectedVmDetails deserializedInMageRcmDiscoveredProtectedVmDetails - = new InMageRcmDiscoveredProtectedVmDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("vCenterId".equals(fieldName)) { - deserializedInMageRcmDiscoveredProtectedVmDetails.vCenterId = reader.getString(); - } else if ("vCenterFqdn".equals(fieldName)) { - deserializedInMageRcmDiscoveredProtectedVmDetails.vCenterFqdn = reader.getString(); - } else if ("datastores".equals(fieldName)) { - List datastores = reader.readArray(reader1 -> reader1.getString()); - deserializedInMageRcmDiscoveredProtectedVmDetails.datastores = datastores; - } else if ("ipAddresses".equals(fieldName)) { - List ipAddresses = reader.readArray(reader1 -> reader1.getString()); - deserializedInMageRcmDiscoveredProtectedVmDetails.ipAddresses = ipAddresses; - } else if ("vmwareToolsStatus".equals(fieldName)) { - deserializedInMageRcmDiscoveredProtectedVmDetails.vmwareToolsStatus = reader.getString(); - } else if ("powerStatus".equals(fieldName)) { - deserializedInMageRcmDiscoveredProtectedVmDetails.powerStatus = reader.getString(); - } else if ("vmFqdn".equals(fieldName)) { - deserializedInMageRcmDiscoveredProtectedVmDetails.vmFqdn = reader.getString(); - } else if ("osName".equals(fieldName)) { - deserializedInMageRcmDiscoveredProtectedVmDetails.osName = reader.getString(); - } else if ("createdTimestamp".equals(fieldName)) { - deserializedInMageRcmDiscoveredProtectedVmDetails.createdTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("updatedTimestamp".equals(fieldName)) { - deserializedInMageRcmDiscoveredProtectedVmDetails.updatedTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("isDeleted".equals(fieldName)) { - deserializedInMageRcmDiscoveredProtectedVmDetails.isDeleted - = reader.getNullable(JsonReader::getBoolean); - } else if ("lastDiscoveryTimeInUtc".equals(fieldName)) { - deserializedInMageRcmDiscoveredProtectedVmDetails.lastDiscoveryTimeInUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmDiscoveredProtectedVmDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmDiskInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmDiskInput.java deleted file mode 100644 index b20f9bddaa72..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmDiskInput.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm disk input. - */ -@Fluent -public final class InMageRcmDiskInput implements JsonSerializable { - /* - * The disk Id. - */ - private String diskId; - - /* - * The log storage account ARM Id. - */ - private String logStorageAccountId; - - /* - * The disk type. - */ - private DiskAccountType diskType; - - /* - * The DiskEncryptionSet ARM Id. - */ - private String diskEncryptionSetId; - - /** - * Creates an instance of InMageRcmDiskInput class. - */ - public InMageRcmDiskInput() { - } - - /** - * Get the diskId property: The disk Id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: The disk Id. - * - * @param diskId the diskId value to set. - * @return the InMageRcmDiskInput object itself. - */ - public InMageRcmDiskInput withDiskId(String diskId) { - this.diskId = diskId; - return this; - } - - /** - * Get the logStorageAccountId property: The log storage account ARM Id. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Set the logStorageAccountId property: The log storage account ARM Id. - * - * @param logStorageAccountId the logStorageAccountId value to set. - * @return the InMageRcmDiskInput object itself. - */ - public InMageRcmDiskInput withLogStorageAccountId(String logStorageAccountId) { - this.logStorageAccountId = logStorageAccountId; - return this; - } - - /** - * Get the diskType property: The disk type. - * - * @return the diskType value. - */ - public DiskAccountType diskType() { - return this.diskType; - } - - /** - * Set the diskType property: The disk type. - * - * @param diskType the diskType value to set. - * @return the InMageRcmDiskInput object itself. - */ - public InMageRcmDiskInput withDiskType(DiskAccountType diskType) { - this.diskType = diskType; - return this; - } - - /** - * Get the diskEncryptionSetId property: The DiskEncryptionSet ARM Id. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Set the diskEncryptionSetId property: The DiskEncryptionSet ARM Id. - * - * @param diskEncryptionSetId the diskEncryptionSetId value to set. - * @return the InMageRcmDiskInput object itself. - */ - public InMageRcmDiskInput withDiskEncryptionSetId(String diskEncryptionSetId) { - this.diskEncryptionSetId = diskEncryptionSetId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property diskId in model InMageRcmDiskInput")); - } - if (logStorageAccountId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property logStorageAccountId in model InMageRcmDiskInput")); - } - if (diskType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property diskType in model InMageRcmDiskInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageRcmDiskInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("logStorageAccountId", this.logStorageAccountId); - jsonWriter.writeStringField("diskType", this.diskType == null ? null : this.diskType.toString()); - jsonWriter.writeStringField("diskEncryptionSetId", this.diskEncryptionSetId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmDiskInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmDiskInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageRcmDiskInput. - */ - public static InMageRcmDiskInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmDiskInput deserializedInMageRcmDiskInput = new InMageRcmDiskInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedInMageRcmDiskInput.diskId = reader.getString(); - } else if ("logStorageAccountId".equals(fieldName)) { - deserializedInMageRcmDiskInput.logStorageAccountId = reader.getString(); - } else if ("diskType".equals(fieldName)) { - deserializedInMageRcmDiskInput.diskType = DiskAccountType.fromString(reader.getString()); - } else if ("diskEncryptionSetId".equals(fieldName)) { - deserializedInMageRcmDiskInput.diskEncryptionSetId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmDiskInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmDisksDefaultInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmDisksDefaultInput.java deleted file mode 100644 index 253660972b2d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmDisksDefaultInput.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm disk input. - */ -@Fluent -public final class InMageRcmDisksDefaultInput implements JsonSerializable { - /* - * The log storage account ARM Id. - */ - private String logStorageAccountId; - - /* - * The disk type. - */ - private DiskAccountType diskType; - - /* - * The DiskEncryptionSet ARM Id. - */ - private String diskEncryptionSetId; - - /** - * Creates an instance of InMageRcmDisksDefaultInput class. - */ - public InMageRcmDisksDefaultInput() { - } - - /** - * Get the logStorageAccountId property: The log storage account ARM Id. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Set the logStorageAccountId property: The log storage account ARM Id. - * - * @param logStorageAccountId the logStorageAccountId value to set. - * @return the InMageRcmDisksDefaultInput object itself. - */ - public InMageRcmDisksDefaultInput withLogStorageAccountId(String logStorageAccountId) { - this.logStorageAccountId = logStorageAccountId; - return this; - } - - /** - * Get the diskType property: The disk type. - * - * @return the diskType value. - */ - public DiskAccountType diskType() { - return this.diskType; - } - - /** - * Set the diskType property: The disk type. - * - * @param diskType the diskType value to set. - * @return the InMageRcmDisksDefaultInput object itself. - */ - public InMageRcmDisksDefaultInput withDiskType(DiskAccountType diskType) { - this.diskType = diskType; - return this; - } - - /** - * Get the diskEncryptionSetId property: The DiskEncryptionSet ARM Id. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Set the diskEncryptionSetId property: The DiskEncryptionSet ARM Id. - * - * @param diskEncryptionSetId the diskEncryptionSetId value to set. - * @return the InMageRcmDisksDefaultInput object itself. - */ - public InMageRcmDisksDefaultInput withDiskEncryptionSetId(String diskEncryptionSetId) { - this.diskEncryptionSetId = diskEncryptionSetId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logStorageAccountId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property logStorageAccountId in model InMageRcmDisksDefaultInput")); - } - if (diskType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property diskType in model InMageRcmDisksDefaultInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageRcmDisksDefaultInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("logStorageAccountId", this.logStorageAccountId); - jsonWriter.writeStringField("diskType", this.diskType == null ? null : this.diskType.toString()); - jsonWriter.writeStringField("diskEncryptionSetId", this.diskEncryptionSetId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmDisksDefaultInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmDisksDefaultInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageRcmDisksDefaultInput. - */ - public static InMageRcmDisksDefaultInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmDisksDefaultInput deserializedInMageRcmDisksDefaultInput = new InMageRcmDisksDefaultInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("logStorageAccountId".equals(fieldName)) { - deserializedInMageRcmDisksDefaultInput.logStorageAccountId = reader.getString(); - } else if ("diskType".equals(fieldName)) { - deserializedInMageRcmDisksDefaultInput.diskType = DiskAccountType.fromString(reader.getString()); - } else if ("diskEncryptionSetId".equals(fieldName)) { - deserializedInMageRcmDisksDefaultInput.diskEncryptionSetId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmDisksDefaultInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmEnableProtectionInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmEnableProtectionInput.java deleted file mode 100644 index 3b5eea0044e8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmEnableProtectionInput.java +++ /dev/null @@ -1,621 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * InMageRcm specific enable protection input. - */ -@Fluent -public final class InMageRcmEnableProtectionInput extends EnableProtectionProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageRcm"; - - /* - * The ARM Id of discovered machine. - */ - private String fabricDiscoveryMachineId; - - /* - * The disks to include list. - */ - private List disksToInclude; - - /* - * The default disk input. - */ - private InMageRcmDisksDefaultInput disksDefault; - - /* - * The target resource group ARM Id. - */ - private String targetResourceGroupId; - - /* - * The selected target network ARM Id. - */ - private String targetNetworkId; - - /* - * The selected test network ARM Id. - */ - private String testNetworkId; - - /* - * The selected target subnet name. - */ - private String targetSubnetName; - - /* - * The selected test subnet name. - */ - private String testSubnetName; - - /* - * The target VM name. - */ - private String targetVmName; - - /* - * The target VM size. - */ - private String targetVmSize; - - /* - * The license type. - */ - private LicenseType licenseType; - - /* - * The target availability set ARM Id. - */ - private String targetAvailabilitySetId; - - /* - * The target availability zone. - */ - private String targetAvailabilityZone; - - /* - * The target proximity placement group Id. - */ - private String targetProximityPlacementGroupId; - - /* - * The target boot diagnostics storage account ARM Id. - */ - private String targetBootDiagnosticsStorageAccountId; - - /* - * The run-as account Id. - */ - private String runAsAccountId; - - /* - * The process server Id. - */ - private String processServerId; - - /* - * The multi VM group name. - */ - private String multiVmGroupName; - - /** - * Creates an instance of InMageRcmEnableProtectionInput class. - */ - public InMageRcmEnableProtectionInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the fabricDiscoveryMachineId property: The ARM Id of discovered machine. - * - * @return the fabricDiscoveryMachineId value. - */ - public String fabricDiscoveryMachineId() { - return this.fabricDiscoveryMachineId; - } - - /** - * Set the fabricDiscoveryMachineId property: The ARM Id of discovered machine. - * - * @param fabricDiscoveryMachineId the fabricDiscoveryMachineId value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withFabricDiscoveryMachineId(String fabricDiscoveryMachineId) { - this.fabricDiscoveryMachineId = fabricDiscoveryMachineId; - return this; - } - - /** - * Get the disksToInclude property: The disks to include list. - * - * @return the disksToInclude value. - */ - public List disksToInclude() { - return this.disksToInclude; - } - - /** - * Set the disksToInclude property: The disks to include list. - * - * @param disksToInclude the disksToInclude value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withDisksToInclude(List disksToInclude) { - this.disksToInclude = disksToInclude; - return this; - } - - /** - * Get the disksDefault property: The default disk input. - * - * @return the disksDefault value. - */ - public InMageRcmDisksDefaultInput disksDefault() { - return this.disksDefault; - } - - /** - * Set the disksDefault property: The default disk input. - * - * @param disksDefault the disksDefault value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withDisksDefault(InMageRcmDisksDefaultInput disksDefault) { - this.disksDefault = disksDefault; - return this; - } - - /** - * Get the targetResourceGroupId property: The target resource group ARM Id. - * - * @return the targetResourceGroupId value. - */ - public String targetResourceGroupId() { - return this.targetResourceGroupId; - } - - /** - * Set the targetResourceGroupId property: The target resource group ARM Id. - * - * @param targetResourceGroupId the targetResourceGroupId value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withTargetResourceGroupId(String targetResourceGroupId) { - this.targetResourceGroupId = targetResourceGroupId; - return this; - } - - /** - * Get the targetNetworkId property: The selected target network ARM Id. - * - * @return the targetNetworkId value. - */ - public String targetNetworkId() { - return this.targetNetworkId; - } - - /** - * Set the targetNetworkId property: The selected target network ARM Id. - * - * @param targetNetworkId the targetNetworkId value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withTargetNetworkId(String targetNetworkId) { - this.targetNetworkId = targetNetworkId; - return this; - } - - /** - * Get the testNetworkId property: The selected test network ARM Id. - * - * @return the testNetworkId value. - */ - public String testNetworkId() { - return this.testNetworkId; - } - - /** - * Set the testNetworkId property: The selected test network ARM Id. - * - * @param testNetworkId the testNetworkId value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withTestNetworkId(String testNetworkId) { - this.testNetworkId = testNetworkId; - return this; - } - - /** - * Get the targetSubnetName property: The selected target subnet name. - * - * @return the targetSubnetName value. - */ - public String targetSubnetName() { - return this.targetSubnetName; - } - - /** - * Set the targetSubnetName property: The selected target subnet name. - * - * @param targetSubnetName the targetSubnetName value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withTargetSubnetName(String targetSubnetName) { - this.targetSubnetName = targetSubnetName; - return this; - } - - /** - * Get the testSubnetName property: The selected test subnet name. - * - * @return the testSubnetName value. - */ - public String testSubnetName() { - return this.testSubnetName; - } - - /** - * Set the testSubnetName property: The selected test subnet name. - * - * @param testSubnetName the testSubnetName value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withTestSubnetName(String testSubnetName) { - this.testSubnetName = testSubnetName; - return this; - } - - /** - * Get the targetVmName property: The target VM name. - * - * @return the targetVmName value. - */ - public String targetVmName() { - return this.targetVmName; - } - - /** - * Set the targetVmName property: The target VM name. - * - * @param targetVmName the targetVmName value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withTargetVmName(String targetVmName) { - this.targetVmName = targetVmName; - return this; - } - - /** - * Get the targetVmSize property: The target VM size. - * - * @return the targetVmSize value. - */ - public String targetVmSize() { - return this.targetVmSize; - } - - /** - * Set the targetVmSize property: The target VM size. - * - * @param targetVmSize the targetVmSize value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withTargetVmSize(String targetVmSize) { - this.targetVmSize = targetVmSize; - return this; - } - - /** - * Get the licenseType property: The license type. - * - * @return the licenseType value. - */ - public LicenseType licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: The license type. - * - * @param licenseType the licenseType value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withLicenseType(LicenseType licenseType) { - this.licenseType = licenseType; - return this; - } - - /** - * Get the targetAvailabilitySetId property: The target availability set ARM Id. - * - * @return the targetAvailabilitySetId value. - */ - public String targetAvailabilitySetId() { - return this.targetAvailabilitySetId; - } - - /** - * Set the targetAvailabilitySetId property: The target availability set ARM Id. - * - * @param targetAvailabilitySetId the targetAvailabilitySetId value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withTargetAvailabilitySetId(String targetAvailabilitySetId) { - this.targetAvailabilitySetId = targetAvailabilitySetId; - return this; - } - - /** - * Get the targetAvailabilityZone property: The target availability zone. - * - * @return the targetAvailabilityZone value. - */ - public String targetAvailabilityZone() { - return this.targetAvailabilityZone; - } - - /** - * Set the targetAvailabilityZone property: The target availability zone. - * - * @param targetAvailabilityZone the targetAvailabilityZone value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withTargetAvailabilityZone(String targetAvailabilityZone) { - this.targetAvailabilityZone = targetAvailabilityZone; - return this; - } - - /** - * Get the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @return the targetProximityPlacementGroupId value. - */ - public String targetProximityPlacementGroupId() { - return this.targetProximityPlacementGroupId; - } - - /** - * Set the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) { - this.targetProximityPlacementGroupId = targetProximityPlacementGroupId; - return this; - } - - /** - * Get the targetBootDiagnosticsStorageAccountId property: The target boot diagnostics storage account ARM Id. - * - * @return the targetBootDiagnosticsStorageAccountId value. - */ - public String targetBootDiagnosticsStorageAccountId() { - return this.targetBootDiagnosticsStorageAccountId; - } - - /** - * Set the targetBootDiagnosticsStorageAccountId property: The target boot diagnostics storage account ARM Id. - * - * @param targetBootDiagnosticsStorageAccountId the targetBootDiagnosticsStorageAccountId value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput - withTargetBootDiagnosticsStorageAccountId(String targetBootDiagnosticsStorageAccountId) { - this.targetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; - return this; - } - - /** - * Get the runAsAccountId property: The run-as account Id. - * - * @return the runAsAccountId value. - */ - public String runAsAccountId() { - return this.runAsAccountId; - } - - /** - * Set the runAsAccountId property: The run-as account Id. - * - * @param runAsAccountId the runAsAccountId value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withRunAsAccountId(String runAsAccountId) { - this.runAsAccountId = runAsAccountId; - return this; - } - - /** - * Get the processServerId property: The process server Id. - * - * @return the processServerId value. - */ - public String processServerId() { - return this.processServerId; - } - - /** - * Set the processServerId property: The process server Id. - * - * @param processServerId the processServerId value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withProcessServerId(String processServerId) { - this.processServerId = processServerId; - return this; - } - - /** - * Get the multiVmGroupName property: The multi VM group name. - * - * @return the multiVmGroupName value. - */ - public String multiVmGroupName() { - return this.multiVmGroupName; - } - - /** - * Set the multiVmGroupName property: The multi VM group name. - * - * @param multiVmGroupName the multiVmGroupName value to set. - * @return the InMageRcmEnableProtectionInput object itself. - */ - public InMageRcmEnableProtectionInput withMultiVmGroupName(String multiVmGroupName) { - this.multiVmGroupName = multiVmGroupName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (fabricDiscoveryMachineId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property fabricDiscoveryMachineId in model InMageRcmEnableProtectionInput")); - } - if (disksToInclude() != null) { - disksToInclude().forEach(e -> e.validate()); - } - if (disksDefault() != null) { - disksDefault().validate(); - } - if (targetResourceGroupId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetResourceGroupId in model InMageRcmEnableProtectionInput")); - } - if (processServerId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property processServerId in model InMageRcmEnableProtectionInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageRcmEnableProtectionInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fabricDiscoveryMachineId", this.fabricDiscoveryMachineId); - jsonWriter.writeStringField("targetResourceGroupId", this.targetResourceGroupId); - jsonWriter.writeStringField("processServerId", this.processServerId); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("disksToInclude", this.disksToInclude, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("disksDefault", this.disksDefault); - jsonWriter.writeStringField("targetNetworkId", this.targetNetworkId); - jsonWriter.writeStringField("testNetworkId", this.testNetworkId); - jsonWriter.writeStringField("targetSubnetName", this.targetSubnetName); - jsonWriter.writeStringField("testSubnetName", this.testSubnetName); - jsonWriter.writeStringField("targetVmName", this.targetVmName); - jsonWriter.writeStringField("targetVmSize", this.targetVmSize); - jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); - jsonWriter.writeStringField("targetAvailabilitySetId", this.targetAvailabilitySetId); - jsonWriter.writeStringField("targetAvailabilityZone", this.targetAvailabilityZone); - jsonWriter.writeStringField("targetProximityPlacementGroupId", this.targetProximityPlacementGroupId); - jsonWriter.writeStringField("targetBootDiagnosticsStorageAccountId", - this.targetBootDiagnosticsStorageAccountId); - jsonWriter.writeStringField("runAsAccountId", this.runAsAccountId); - jsonWriter.writeStringField("multiVmGroupName", this.multiVmGroupName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmEnableProtectionInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmEnableProtectionInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageRcmEnableProtectionInput. - */ - public static InMageRcmEnableProtectionInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmEnableProtectionInput deserializedInMageRcmEnableProtectionInput - = new InMageRcmEnableProtectionInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fabricDiscoveryMachineId".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.fabricDiscoveryMachineId = reader.getString(); - } else if ("targetResourceGroupId".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.targetResourceGroupId = reader.getString(); - } else if ("processServerId".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.processServerId = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.instanceType = reader.getString(); - } else if ("disksToInclude".equals(fieldName)) { - List disksToInclude - = reader.readArray(reader1 -> InMageRcmDiskInput.fromJson(reader1)); - deserializedInMageRcmEnableProtectionInput.disksToInclude = disksToInclude; - } else if ("disksDefault".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.disksDefault - = InMageRcmDisksDefaultInput.fromJson(reader); - } else if ("targetNetworkId".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.targetNetworkId = reader.getString(); - } else if ("testNetworkId".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.testNetworkId = reader.getString(); - } else if ("targetSubnetName".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.targetSubnetName = reader.getString(); - } else if ("testSubnetName".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.testSubnetName = reader.getString(); - } else if ("targetVmName".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.targetVmName = reader.getString(); - } else if ("targetVmSize".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.targetVmSize = reader.getString(); - } else if ("licenseType".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.licenseType = LicenseType.fromString(reader.getString()); - } else if ("targetAvailabilitySetId".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.targetAvailabilitySetId = reader.getString(); - } else if ("targetAvailabilityZone".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.targetAvailabilityZone = reader.getString(); - } else if ("targetProximityPlacementGroupId".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.targetProximityPlacementGroupId = reader.getString(); - } else if ("targetBootDiagnosticsStorageAccountId".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.targetBootDiagnosticsStorageAccountId - = reader.getString(); - } else if ("runAsAccountId".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.runAsAccountId = reader.getString(); - } else if ("multiVmGroupName".equals(fieldName)) { - deserializedInMageRcmEnableProtectionInput.multiVmGroupName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmEnableProtectionInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmEventDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmEventDetails.java deleted file mode 100644 index cabb579dad45..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmEventDetails.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Event details for InMageRcm provider. - */ -@Immutable -public final class InMageRcmEventDetails extends EventProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "InMageRcm"; - - /* - * The protected item name. - */ - private String protectedItemName; - - /* - * The protected item name. - */ - private String vmName; - - /* - * The latest agent version. - */ - private String latestAgentVersion; - - /* - * The job Id. - */ - private String jobId; - - /* - * The fabric name. - */ - private String fabricName; - - /* - * The appliance name. - */ - private String applianceName; - - /* - * The server type. - */ - private String serverType; - - /* - * The component display name. - */ - private String componentDisplayName; - - /** - * Creates an instance of InMageRcmEventDetails class. - */ - public InMageRcmEventDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the protectedItemName property: The protected item name. - * - * @return the protectedItemName value. - */ - public String protectedItemName() { - return this.protectedItemName; - } - - /** - * Get the vmName property: The protected item name. - * - * @return the vmName value. - */ - public String vmName() { - return this.vmName; - } - - /** - * Get the latestAgentVersion property: The latest agent version. - * - * @return the latestAgentVersion value. - */ - public String latestAgentVersion() { - return this.latestAgentVersion; - } - - /** - * Get the jobId property: The job Id. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Get the fabricName property: The fabric name. - * - * @return the fabricName value. - */ - public String fabricName() { - return this.fabricName; - } - - /** - * Get the applianceName property: The appliance name. - * - * @return the applianceName value. - */ - public String applianceName() { - return this.applianceName; - } - - /** - * Get the serverType property: The server type. - * - * @return the serverType value. - */ - public String serverType() { - return this.serverType; - } - - /** - * Get the componentDisplayName property: The component display name. - * - * @return the componentDisplayName value. - */ - public String componentDisplayName() { - return this.componentDisplayName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmEventDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmEventDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmEventDetails. - */ - public static InMageRcmEventDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmEventDetails deserializedInMageRcmEventDetails = new InMageRcmEventDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmEventDetails.instanceType = reader.getString(); - } else if ("protectedItemName".equals(fieldName)) { - deserializedInMageRcmEventDetails.protectedItemName = reader.getString(); - } else if ("vmName".equals(fieldName)) { - deserializedInMageRcmEventDetails.vmName = reader.getString(); - } else if ("latestAgentVersion".equals(fieldName)) { - deserializedInMageRcmEventDetails.latestAgentVersion = reader.getString(); - } else if ("jobId".equals(fieldName)) { - deserializedInMageRcmEventDetails.jobId = reader.getString(); - } else if ("fabricName".equals(fieldName)) { - deserializedInMageRcmEventDetails.fabricName = reader.getString(); - } else if ("applianceName".equals(fieldName)) { - deserializedInMageRcmEventDetails.applianceName = reader.getString(); - } else if ("serverType".equals(fieldName)) { - deserializedInMageRcmEventDetails.serverType = reader.getString(); - } else if ("componentDisplayName".equals(fieldName)) { - deserializedInMageRcmEventDetails.componentDisplayName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmEventDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFabricCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFabricCreationInput.java deleted file mode 100644 index 0a14fb2ce78b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFabricCreationInput.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm fabric provider specific settings. - */ -@Fluent -public final class InMageRcmFabricCreationInput extends FabricSpecificCreationInput { - /* - * Gets the class type. - */ - private String instanceType = "InMageRcm"; - - /* - * The ARM Id of the VMware site. - */ - private String vmwareSiteId; - - /* - * The ARM Id of the physical site. - */ - private String physicalSiteId; - - /* - * The identity provider input for source agent authentication. - */ - private IdentityProviderInput sourceAgentIdentity; - - /** - * Creates an instance of InMageRcmFabricCreationInput class. - */ - public InMageRcmFabricCreationInput() { - } - - /** - * Get the instanceType property: Gets the class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the vmwareSiteId property: The ARM Id of the VMware site. - * - * @return the vmwareSiteId value. - */ - public String vmwareSiteId() { - return this.vmwareSiteId; - } - - /** - * Set the vmwareSiteId property: The ARM Id of the VMware site. - * - * @param vmwareSiteId the vmwareSiteId value to set. - * @return the InMageRcmFabricCreationInput object itself. - */ - public InMageRcmFabricCreationInput withVmwareSiteId(String vmwareSiteId) { - this.vmwareSiteId = vmwareSiteId; - return this; - } - - /** - * Get the physicalSiteId property: The ARM Id of the physical site. - * - * @return the physicalSiteId value. - */ - public String physicalSiteId() { - return this.physicalSiteId; - } - - /** - * Set the physicalSiteId property: The ARM Id of the physical site. - * - * @param physicalSiteId the physicalSiteId value to set. - * @return the InMageRcmFabricCreationInput object itself. - */ - public InMageRcmFabricCreationInput withPhysicalSiteId(String physicalSiteId) { - this.physicalSiteId = physicalSiteId; - return this; - } - - /** - * Get the sourceAgentIdentity property: The identity provider input for source agent authentication. - * - * @return the sourceAgentIdentity value. - */ - public IdentityProviderInput sourceAgentIdentity() { - return this.sourceAgentIdentity; - } - - /** - * Set the sourceAgentIdentity property: The identity provider input for source agent authentication. - * - * @param sourceAgentIdentity the sourceAgentIdentity value to set. - * @return the InMageRcmFabricCreationInput object itself. - */ - public InMageRcmFabricCreationInput withSourceAgentIdentity(IdentityProviderInput sourceAgentIdentity) { - this.sourceAgentIdentity = sourceAgentIdentity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmwareSiteId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property vmwareSiteId in model InMageRcmFabricCreationInput")); - } - if (physicalSiteId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property physicalSiteId in model InMageRcmFabricCreationInput")); - } - if (sourceAgentIdentity() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sourceAgentIdentity in model InMageRcmFabricCreationInput")); - } else { - sourceAgentIdentity().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageRcmFabricCreationInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("vmwareSiteId", this.vmwareSiteId); - jsonWriter.writeStringField("physicalSiteId", this.physicalSiteId); - jsonWriter.writeJsonField("sourceAgentIdentity", this.sourceAgentIdentity); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFabricCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFabricCreationInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageRcmFabricCreationInput. - */ - public static InMageRcmFabricCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFabricCreationInput deserializedInMageRcmFabricCreationInput = new InMageRcmFabricCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("vmwareSiteId".equals(fieldName)) { - deserializedInMageRcmFabricCreationInput.vmwareSiteId = reader.getString(); - } else if ("physicalSiteId".equals(fieldName)) { - deserializedInMageRcmFabricCreationInput.physicalSiteId = reader.getString(); - } else if ("sourceAgentIdentity".equals(fieldName)) { - deserializedInMageRcmFabricCreationInput.sourceAgentIdentity - = IdentityProviderInput.fromJson(reader); - } else if ("instanceType".equals(fieldName)) { - deserializedInMageRcmFabricCreationInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFabricCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFabricSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFabricSpecificDetails.java deleted file mode 100644 index a9a87a0055ce..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFabricSpecificDetails.java +++ /dev/null @@ -1,394 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * InMageRcm fabric specific details. - */ -@Fluent -public final class InMageRcmFabricSpecificDetails extends FabricSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "InMageRcm"; - - /* - * The ARM Id of the VMware site. - */ - private String vmwareSiteId; - - /* - * The ARM Id of the physical site. - */ - private String physicalSiteId; - - /* - * The service endpoint. - */ - private String serviceEndpoint; - - /* - * The service resource Id. - */ - private String serviceResourceId; - - /* - * The service container Id. - */ - private String serviceContainerId; - - /* - * The data plane Uri. - */ - private String dataPlaneUri; - - /* - * The control plane Uri. - */ - private String controlPlaneUri; - - /* - * The source agent identity details. - */ - private IdentityProviderDetails sourceAgentIdentityDetails; - - /* - * The list of process servers. - */ - private List processServers; - - /* - * The list of RCM proxies. - */ - private List rcmProxies; - - /* - * The list of push installers. - */ - private List pushInstallers; - - /* - * The list of replication agents. - */ - private List replicationAgents; - - /* - * The list of reprotect agents. - */ - private List reprotectAgents; - - /* - * The list of Mars agents. - */ - private List marsAgents; - - /* - * The list of DRAs. - */ - private List dras; - - /* - * The list of agent details. - */ - private List agentDetails; - - /** - * Creates an instance of InMageRcmFabricSpecificDetails class. - */ - public InMageRcmFabricSpecificDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the vmwareSiteId property: The ARM Id of the VMware site. - * - * @return the vmwareSiteId value. - */ - public String vmwareSiteId() { - return this.vmwareSiteId; - } - - /** - * Get the physicalSiteId property: The ARM Id of the physical site. - * - * @return the physicalSiteId value. - */ - public String physicalSiteId() { - return this.physicalSiteId; - } - - /** - * Get the serviceEndpoint property: The service endpoint. - * - * @return the serviceEndpoint value. - */ - public String serviceEndpoint() { - return this.serviceEndpoint; - } - - /** - * Get the serviceResourceId property: The service resource Id. - * - * @return the serviceResourceId value. - */ - public String serviceResourceId() { - return this.serviceResourceId; - } - - /** - * Get the serviceContainerId property: The service container Id. - * - * @return the serviceContainerId value. - */ - public String serviceContainerId() { - return this.serviceContainerId; - } - - /** - * Get the dataPlaneUri property: The data plane Uri. - * - * @return the dataPlaneUri value. - */ - public String dataPlaneUri() { - return this.dataPlaneUri; - } - - /** - * Get the controlPlaneUri property: The control plane Uri. - * - * @return the controlPlaneUri value. - */ - public String controlPlaneUri() { - return this.controlPlaneUri; - } - - /** - * Get the sourceAgentIdentityDetails property: The source agent identity details. - * - * @return the sourceAgentIdentityDetails value. - */ - public IdentityProviderDetails sourceAgentIdentityDetails() { - return this.sourceAgentIdentityDetails; - } - - /** - * Set the sourceAgentIdentityDetails property: The source agent identity details. - * - * @param sourceAgentIdentityDetails the sourceAgentIdentityDetails value to set. - * @return the InMageRcmFabricSpecificDetails object itself. - */ - public InMageRcmFabricSpecificDetails - withSourceAgentIdentityDetails(IdentityProviderDetails sourceAgentIdentityDetails) { - this.sourceAgentIdentityDetails = sourceAgentIdentityDetails; - return this; - } - - /** - * Get the processServers property: The list of process servers. - * - * @return the processServers value. - */ - public List processServers() { - return this.processServers; - } - - /** - * Get the rcmProxies property: The list of RCM proxies. - * - * @return the rcmProxies value. - */ - public List rcmProxies() { - return this.rcmProxies; - } - - /** - * Get the pushInstallers property: The list of push installers. - * - * @return the pushInstallers value. - */ - public List pushInstallers() { - return this.pushInstallers; - } - - /** - * Get the replicationAgents property: The list of replication agents. - * - * @return the replicationAgents value. - */ - public List replicationAgents() { - return this.replicationAgents; - } - - /** - * Get the reprotectAgents property: The list of reprotect agents. - * - * @return the reprotectAgents value. - */ - public List reprotectAgents() { - return this.reprotectAgents; - } - - /** - * Get the marsAgents property: The list of Mars agents. - * - * @return the marsAgents value. - */ - public List marsAgents() { - return this.marsAgents; - } - - /** - * Get the dras property: The list of DRAs. - * - * @return the dras value. - */ - public List dras() { - return this.dras; - } - - /** - * Get the agentDetails property: The list of agent details. - * - * @return the agentDetails value. - */ - public List agentDetails() { - return this.agentDetails; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (sourceAgentIdentityDetails() != null) { - sourceAgentIdentityDetails().validate(); - } - if (processServers() != null) { - processServers().forEach(e -> e.validate()); - } - if (rcmProxies() != null) { - rcmProxies().forEach(e -> e.validate()); - } - if (pushInstallers() != null) { - pushInstallers().forEach(e -> e.validate()); - } - if (replicationAgents() != null) { - replicationAgents().forEach(e -> e.validate()); - } - if (reprotectAgents() != null) { - reprotectAgents().forEach(e -> e.validate()); - } - if (marsAgents() != null) { - marsAgents().forEach(e -> e.validate()); - } - if (dras() != null) { - dras().forEach(e -> e.validate()); - } - if (agentDetails() != null) { - agentDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeJsonField("sourceAgentIdentityDetails", this.sourceAgentIdentityDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFabricSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFabricSpecificDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmFabricSpecificDetails. - */ - public static InMageRcmFabricSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFabricSpecificDetails deserializedInMageRcmFabricSpecificDetails - = new InMageRcmFabricSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmFabricSpecificDetails.instanceType = reader.getString(); - } else if ("vmwareSiteId".equals(fieldName)) { - deserializedInMageRcmFabricSpecificDetails.vmwareSiteId = reader.getString(); - } else if ("physicalSiteId".equals(fieldName)) { - deserializedInMageRcmFabricSpecificDetails.physicalSiteId = reader.getString(); - } else if ("serviceEndpoint".equals(fieldName)) { - deserializedInMageRcmFabricSpecificDetails.serviceEndpoint = reader.getString(); - } else if ("serviceResourceId".equals(fieldName)) { - deserializedInMageRcmFabricSpecificDetails.serviceResourceId = reader.getString(); - } else if ("serviceContainerId".equals(fieldName)) { - deserializedInMageRcmFabricSpecificDetails.serviceContainerId = reader.getString(); - } else if ("dataPlaneUri".equals(fieldName)) { - deserializedInMageRcmFabricSpecificDetails.dataPlaneUri = reader.getString(); - } else if ("controlPlaneUri".equals(fieldName)) { - deserializedInMageRcmFabricSpecificDetails.controlPlaneUri = reader.getString(); - } else if ("sourceAgentIdentityDetails".equals(fieldName)) { - deserializedInMageRcmFabricSpecificDetails.sourceAgentIdentityDetails - = IdentityProviderDetails.fromJson(reader); - } else if ("processServers".equals(fieldName)) { - List processServers - = reader.readArray(reader1 -> ProcessServerDetails.fromJson(reader1)); - deserializedInMageRcmFabricSpecificDetails.processServers = processServers; - } else if ("rcmProxies".equals(fieldName)) { - List rcmProxies = reader.readArray(reader1 -> RcmProxyDetails.fromJson(reader1)); - deserializedInMageRcmFabricSpecificDetails.rcmProxies = rcmProxies; - } else if ("pushInstallers".equals(fieldName)) { - List pushInstallers - = reader.readArray(reader1 -> PushInstallerDetails.fromJson(reader1)); - deserializedInMageRcmFabricSpecificDetails.pushInstallers = pushInstallers; - } else if ("replicationAgents".equals(fieldName)) { - List replicationAgents - = reader.readArray(reader1 -> ReplicationAgentDetails.fromJson(reader1)); - deserializedInMageRcmFabricSpecificDetails.replicationAgents = replicationAgents; - } else if ("reprotectAgents".equals(fieldName)) { - List reprotectAgents - = reader.readArray(reader1 -> ReprotectAgentDetails.fromJson(reader1)); - deserializedInMageRcmFabricSpecificDetails.reprotectAgents = reprotectAgents; - } else if ("marsAgents".equals(fieldName)) { - List marsAgents = reader.readArray(reader1 -> MarsAgentDetails.fromJson(reader1)); - deserializedInMageRcmFabricSpecificDetails.marsAgents = marsAgents; - } else if ("dras".equals(fieldName)) { - List dras = reader.readArray(reader1 -> DraDetails.fromJson(reader1)); - deserializedInMageRcmFabricSpecificDetails.dras = dras; - } else if ("agentDetails".equals(fieldName)) { - List agentDetails = reader.readArray(reader1 -> AgentDetails.fromJson(reader1)); - deserializedInMageRcmFabricSpecificDetails.agentDetails = agentDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFabricSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFabricSwitchProviderBlockingErrorDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFabricSwitchProviderBlockingErrorDetails.java deleted file mode 100644 index d4d6e4ea1a18..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFabricSwitchProviderBlockingErrorDetails.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * InMageRcmFabric switch provider blocking error details. - */ -@Immutable -public final class InMageRcmFabricSwitchProviderBlockingErrorDetails - implements JsonSerializable { - /* - * The error code. - */ - private String errorCode; - - /* - * The error message. - */ - private String errorMessage; - - /* - * The possible causes. - */ - private String possibleCauses; - - /* - * The recommended action. - */ - private String recommendedAction; - - /* - * The error message parameters. - */ - private Map errorMessageParameters; - - /* - * The error tags. - */ - private Map errorTags; - - /** - * Creates an instance of InMageRcmFabricSwitchProviderBlockingErrorDetails class. - */ - public InMageRcmFabricSwitchProviderBlockingErrorDetails() { - } - - /** - * Get the errorCode property: The error code. - * - * @return the errorCode value. - */ - public String errorCode() { - return this.errorCode; - } - - /** - * Get the errorMessage property: The error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the possibleCauses property: The possible causes. - * - * @return the possibleCauses value. - */ - public String possibleCauses() { - return this.possibleCauses; - } - - /** - * Get the recommendedAction property: The recommended action. - * - * @return the recommendedAction value. - */ - public String recommendedAction() { - return this.recommendedAction; - } - - /** - * Get the errorMessageParameters property: The error message parameters. - * - * @return the errorMessageParameters value. - */ - public Map errorMessageParameters() { - return this.errorMessageParameters; - } - - /** - * Get the errorTags property: The error tags. - * - * @return the errorTags value. - */ - public Map errorTags() { - return this.errorTags; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFabricSwitchProviderBlockingErrorDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFabricSwitchProviderBlockingErrorDetails if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmFabricSwitchProviderBlockingErrorDetails. - */ - public static InMageRcmFabricSwitchProviderBlockingErrorDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFabricSwitchProviderBlockingErrorDetails deserializedInMageRcmFabricSwitchProviderBlockingErrorDetails - = new InMageRcmFabricSwitchProviderBlockingErrorDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("errorCode".equals(fieldName)) { - deserializedInMageRcmFabricSwitchProviderBlockingErrorDetails.errorCode = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedInMageRcmFabricSwitchProviderBlockingErrorDetails.errorMessage = reader.getString(); - } else if ("possibleCauses".equals(fieldName)) { - deserializedInMageRcmFabricSwitchProviderBlockingErrorDetails.possibleCauses = reader.getString(); - } else if ("recommendedAction".equals(fieldName)) { - deserializedInMageRcmFabricSwitchProviderBlockingErrorDetails.recommendedAction - = reader.getString(); - } else if ("errorMessageParameters".equals(fieldName)) { - Map errorMessageParameters = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageRcmFabricSwitchProviderBlockingErrorDetails.errorMessageParameters - = errorMessageParameters; - } else if ("errorTags".equals(fieldName)) { - Map errorTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageRcmFabricSwitchProviderBlockingErrorDetails.errorTags = errorTags; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFabricSwitchProviderBlockingErrorDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackDiscoveredProtectedVmDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackDiscoveredProtectedVmDetails.java deleted file mode 100644 index 38c955333330..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackDiscoveredProtectedVmDetails.java +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * InMageRcmFailback discovered VM details. - */ -@Immutable -public final class InMageRcmFailbackDiscoveredProtectedVmDetails - implements JsonSerializable { - /* - * The VCenter Id. - */ - private String vCenterId; - - /* - * The VCenter fqdn. - */ - private String vCenterFqdn; - - /* - * The list of datastores. - */ - private List datastores; - - /* - * The list of IP addresses. - */ - private List ipAddresses; - - /* - * The VMware tools status. - */ - private String vmwareToolsStatus; - - /* - * The VM power status. - */ - private String powerStatus; - - /* - * The VM fqdn. - */ - private String vmFqdn; - - /* - * The VM's OS name. - */ - private String osName; - - /* - * The SDS created timestamp. - */ - private OffsetDateTime createdTimestamp; - - /* - * The SDS updated timestamp. - */ - private OffsetDateTime updatedTimestamp; - - /* - * A value indicating whether the VM is deleted. - */ - private Boolean isDeleted; - - /* - * The last time when SDS information discovered in SRS. - */ - private OffsetDateTime lastDiscoveryTimeInUtc; - - /** - * Creates an instance of InMageRcmFailbackDiscoveredProtectedVmDetails class. - */ - public InMageRcmFailbackDiscoveredProtectedVmDetails() { - } - - /** - * Get the vCenterId property: The VCenter Id. - * - * @return the vCenterId value. - */ - public String vCenterId() { - return this.vCenterId; - } - - /** - * Get the vCenterFqdn property: The VCenter fqdn. - * - * @return the vCenterFqdn value. - */ - public String vCenterFqdn() { - return this.vCenterFqdn; - } - - /** - * Get the datastores property: The list of datastores. - * - * @return the datastores value. - */ - public List datastores() { - return this.datastores; - } - - /** - * Get the ipAddresses property: The list of IP addresses. - * - * @return the ipAddresses value. - */ - public List ipAddresses() { - return this.ipAddresses; - } - - /** - * Get the vmwareToolsStatus property: The VMware tools status. - * - * @return the vmwareToolsStatus value. - */ - public String vmwareToolsStatus() { - return this.vmwareToolsStatus; - } - - /** - * Get the powerStatus property: The VM power status. - * - * @return the powerStatus value. - */ - public String powerStatus() { - return this.powerStatus; - } - - /** - * Get the vmFqdn property: The VM fqdn. - * - * @return the vmFqdn value. - */ - public String vmFqdn() { - return this.vmFqdn; - } - - /** - * Get the osName property: The VM's OS name. - * - * @return the osName value. - */ - public String osName() { - return this.osName; - } - - /** - * Get the createdTimestamp property: The SDS created timestamp. - * - * @return the createdTimestamp value. - */ - public OffsetDateTime createdTimestamp() { - return this.createdTimestamp; - } - - /** - * Get the updatedTimestamp property: The SDS updated timestamp. - * - * @return the updatedTimestamp value. - */ - public OffsetDateTime updatedTimestamp() { - return this.updatedTimestamp; - } - - /** - * Get the isDeleted property: A value indicating whether the VM is deleted. - * - * @return the isDeleted value. - */ - public Boolean isDeleted() { - return this.isDeleted; - } - - /** - * Get the lastDiscoveryTimeInUtc property: The last time when SDS information discovered in SRS. - * - * @return the lastDiscoveryTimeInUtc value. - */ - public OffsetDateTime lastDiscoveryTimeInUtc() { - return this.lastDiscoveryTimeInUtc; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFailbackDiscoveredProtectedVmDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFailbackDiscoveredProtectedVmDetails if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmFailbackDiscoveredProtectedVmDetails. - */ - public static InMageRcmFailbackDiscoveredProtectedVmDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFailbackDiscoveredProtectedVmDetails deserializedInMageRcmFailbackDiscoveredProtectedVmDetails - = new InMageRcmFailbackDiscoveredProtectedVmDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("vCenterId".equals(fieldName)) { - deserializedInMageRcmFailbackDiscoveredProtectedVmDetails.vCenterId = reader.getString(); - } else if ("vCenterFqdn".equals(fieldName)) { - deserializedInMageRcmFailbackDiscoveredProtectedVmDetails.vCenterFqdn = reader.getString(); - } else if ("datastores".equals(fieldName)) { - List datastores = reader.readArray(reader1 -> reader1.getString()); - deserializedInMageRcmFailbackDiscoveredProtectedVmDetails.datastores = datastores; - } else if ("ipAddresses".equals(fieldName)) { - List ipAddresses = reader.readArray(reader1 -> reader1.getString()); - deserializedInMageRcmFailbackDiscoveredProtectedVmDetails.ipAddresses = ipAddresses; - } else if ("vmwareToolsStatus".equals(fieldName)) { - deserializedInMageRcmFailbackDiscoveredProtectedVmDetails.vmwareToolsStatus = reader.getString(); - } else if ("powerStatus".equals(fieldName)) { - deserializedInMageRcmFailbackDiscoveredProtectedVmDetails.powerStatus = reader.getString(); - } else if ("vmFqdn".equals(fieldName)) { - deserializedInMageRcmFailbackDiscoveredProtectedVmDetails.vmFqdn = reader.getString(); - } else if ("osName".equals(fieldName)) { - deserializedInMageRcmFailbackDiscoveredProtectedVmDetails.osName = reader.getString(); - } else if ("createdTimestamp".equals(fieldName)) { - deserializedInMageRcmFailbackDiscoveredProtectedVmDetails.createdTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("updatedTimestamp".equals(fieldName)) { - deserializedInMageRcmFailbackDiscoveredProtectedVmDetails.updatedTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("isDeleted".equals(fieldName)) { - deserializedInMageRcmFailbackDiscoveredProtectedVmDetails.isDeleted - = reader.getNullable(JsonReader::getBoolean); - } else if ("lastDiscoveryTimeInUtc".equals(fieldName)) { - deserializedInMageRcmFailbackDiscoveredProtectedVmDetails.lastDiscoveryTimeInUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFailbackDiscoveredProtectedVmDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackEventDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackEventDetails.java deleted file mode 100644 index 22e078c80d43..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackEventDetails.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Event details for InMageRcmFailback provider. - */ -@Immutable -public final class InMageRcmFailbackEventDetails extends EventProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "InMageRcmFailback"; - - /* - * The protected item name. - */ - private String protectedItemName; - - /* - * The protected item name. - */ - private String vmName; - - /* - * The appliance name. - */ - private String applianceName; - - /* - * The server type. - */ - private String serverType; - - /* - * The component display name. - */ - private String componentDisplayName; - - /** - * Creates an instance of InMageRcmFailbackEventDetails class. - */ - public InMageRcmFailbackEventDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the protectedItemName property: The protected item name. - * - * @return the protectedItemName value. - */ - public String protectedItemName() { - return this.protectedItemName; - } - - /** - * Get the vmName property: The protected item name. - * - * @return the vmName value. - */ - public String vmName() { - return this.vmName; - } - - /** - * Get the applianceName property: The appliance name. - * - * @return the applianceName value. - */ - public String applianceName() { - return this.applianceName; - } - - /** - * Get the serverType property: The server type. - * - * @return the serverType value. - */ - public String serverType() { - return this.serverType; - } - - /** - * Get the componentDisplayName property: The component display name. - * - * @return the componentDisplayName value. - */ - public String componentDisplayName() { - return this.componentDisplayName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFailbackEventDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFailbackEventDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmFailbackEventDetails. - */ - public static InMageRcmFailbackEventDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFailbackEventDetails deserializedInMageRcmFailbackEventDetails - = new InMageRcmFailbackEventDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmFailbackEventDetails.instanceType = reader.getString(); - } else if ("protectedItemName".equals(fieldName)) { - deserializedInMageRcmFailbackEventDetails.protectedItemName = reader.getString(); - } else if ("vmName".equals(fieldName)) { - deserializedInMageRcmFailbackEventDetails.vmName = reader.getString(); - } else if ("applianceName".equals(fieldName)) { - deserializedInMageRcmFailbackEventDetails.applianceName = reader.getString(); - } else if ("serverType".equals(fieldName)) { - deserializedInMageRcmFailbackEventDetails.serverType = reader.getString(); - } else if ("componentDisplayName".equals(fieldName)) { - deserializedInMageRcmFailbackEventDetails.componentDisplayName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFailbackEventDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackMobilityAgentDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackMobilityAgentDetails.java deleted file mode 100644 index 876d57c42dcd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackMobilityAgentDetails.java +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * InMageRcmFailback mobility agent details. - */ -@Immutable -public final class InMageRcmFailbackMobilityAgentDetails - implements JsonSerializable { - /* - * The agent version. - */ - private String version; - - /* - * The latest agent version available. - */ - private String latestVersion; - - /* - * The driver version. - */ - private String driverVersion; - - /* - * The latest upgradeable version available without reboot. - */ - private String latestUpgradableVersionWithoutReboot; - - /* - * The agent version expiry date. - */ - private OffsetDateTime agentVersionExpiryDate; - - /* - * The driver version expiry date. - */ - private OffsetDateTime driverVersionExpiryDate; - - /* - * The time of the last heartbeat received from the agent. - */ - private OffsetDateTime lastHeartbeatUtc; - - /* - * The whether update is possible or not. - */ - private List reasonsBlockingUpgrade; - - /* - * A value indicating whether agent is upgradeable or not. - */ - private String isUpgradeable; - - /** - * Creates an instance of InMageRcmFailbackMobilityAgentDetails class. - */ - public InMageRcmFailbackMobilityAgentDetails() { - } - - /** - * Get the version property: The agent version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the latestVersion property: The latest agent version available. - * - * @return the latestVersion value. - */ - public String latestVersion() { - return this.latestVersion; - } - - /** - * Get the driverVersion property: The driver version. - * - * @return the driverVersion value. - */ - public String driverVersion() { - return this.driverVersion; - } - - /** - * Get the latestUpgradableVersionWithoutReboot property: The latest upgradeable version available without reboot. - * - * @return the latestUpgradableVersionWithoutReboot value. - */ - public String latestUpgradableVersionWithoutReboot() { - return this.latestUpgradableVersionWithoutReboot; - } - - /** - * Get the agentVersionExpiryDate property: The agent version expiry date. - * - * @return the agentVersionExpiryDate value. - */ - public OffsetDateTime agentVersionExpiryDate() { - return this.agentVersionExpiryDate; - } - - /** - * Get the driverVersionExpiryDate property: The driver version expiry date. - * - * @return the driverVersionExpiryDate value. - */ - public OffsetDateTime driverVersionExpiryDate() { - return this.driverVersionExpiryDate; - } - - /** - * Get the lastHeartbeatUtc property: The time of the last heartbeat received from the agent. - * - * @return the lastHeartbeatUtc value. - */ - public OffsetDateTime lastHeartbeatUtc() { - return this.lastHeartbeatUtc; - } - - /** - * Get the reasonsBlockingUpgrade property: The whether update is possible or not. - * - * @return the reasonsBlockingUpgrade value. - */ - public List reasonsBlockingUpgrade() { - return this.reasonsBlockingUpgrade; - } - - /** - * Get the isUpgradeable property: A value indicating whether agent is upgradeable or not. - * - * @return the isUpgradeable value. - */ - public String isUpgradeable() { - return this.isUpgradeable; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFailbackMobilityAgentDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFailbackMobilityAgentDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmFailbackMobilityAgentDetails. - */ - public static InMageRcmFailbackMobilityAgentDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFailbackMobilityAgentDetails deserializedInMageRcmFailbackMobilityAgentDetails - = new InMageRcmFailbackMobilityAgentDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("version".equals(fieldName)) { - deserializedInMageRcmFailbackMobilityAgentDetails.version = reader.getString(); - } else if ("latestVersion".equals(fieldName)) { - deserializedInMageRcmFailbackMobilityAgentDetails.latestVersion = reader.getString(); - } else if ("driverVersion".equals(fieldName)) { - deserializedInMageRcmFailbackMobilityAgentDetails.driverVersion = reader.getString(); - } else if ("latestUpgradableVersionWithoutReboot".equals(fieldName)) { - deserializedInMageRcmFailbackMobilityAgentDetails.latestUpgradableVersionWithoutReboot - = reader.getString(); - } else if ("agentVersionExpiryDate".equals(fieldName)) { - deserializedInMageRcmFailbackMobilityAgentDetails.agentVersionExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("driverVersionExpiryDate".equals(fieldName)) { - deserializedInMageRcmFailbackMobilityAgentDetails.driverVersionExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastHeartbeatUtc".equals(fieldName)) { - deserializedInMageRcmFailbackMobilityAgentDetails.lastHeartbeatUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("reasonsBlockingUpgrade".equals(fieldName)) { - List reasonsBlockingUpgrade - = reader.readArray(reader1 -> AgentUpgradeBlockedReason.fromString(reader1.getString())); - deserializedInMageRcmFailbackMobilityAgentDetails.reasonsBlockingUpgrade = reasonsBlockingUpgrade; - } else if ("isUpgradeable".equals(fieldName)) { - deserializedInMageRcmFailbackMobilityAgentDetails.isUpgradeable = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFailbackMobilityAgentDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackNicDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackNicDetails.java deleted file mode 100644 index 41bcb8bf7243..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackNicDetails.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcmFailback NIC details. - */ -@Immutable -public final class InMageRcmFailbackNicDetails implements JsonSerializable { - /* - * The mac address. - */ - private String macAddress; - - /* - * The network name. - */ - private String networkName; - - /* - * The adapter type. - */ - private String adapterType; - - /* - * The IP address. - */ - private String sourceIpAddress; - - /** - * Creates an instance of InMageRcmFailbackNicDetails class. - */ - public InMageRcmFailbackNicDetails() { - } - - /** - * Get the macAddress property: The mac address. - * - * @return the macAddress value. - */ - public String macAddress() { - return this.macAddress; - } - - /** - * Get the networkName property: The network name. - * - * @return the networkName value. - */ - public String networkName() { - return this.networkName; - } - - /** - * Get the adapterType property: The adapter type. - * - * @return the adapterType value. - */ - public String adapterType() { - return this.adapterType; - } - - /** - * Get the sourceIpAddress property: The IP address. - * - * @return the sourceIpAddress value. - */ - public String sourceIpAddress() { - return this.sourceIpAddress; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFailbackNicDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFailbackNicDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmFailbackNicDetails. - */ - public static InMageRcmFailbackNicDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFailbackNicDetails deserializedInMageRcmFailbackNicDetails = new InMageRcmFailbackNicDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("macAddress".equals(fieldName)) { - deserializedInMageRcmFailbackNicDetails.macAddress = reader.getString(); - } else if ("networkName".equals(fieldName)) { - deserializedInMageRcmFailbackNicDetails.networkName = reader.getString(); - } else if ("adapterType".equals(fieldName)) { - deserializedInMageRcmFailbackNicDetails.adapterType = reader.getString(); - } else if ("sourceIpAddress".equals(fieldName)) { - deserializedInMageRcmFailbackNicDetails.sourceIpAddress = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFailbackNicDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackPlannedFailoverProviderInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackPlannedFailoverProviderInput.java deleted file mode 100644 index 3d439ff72044..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackPlannedFailoverProviderInput.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific input for InMageRcmFailback failover. - */ -@Fluent -public final class InMageRcmFailbackPlannedFailoverProviderInput extends PlannedFailoverProviderSpecificFailoverInput { - /* - * The class type. - */ - private String instanceType = "InMageRcmFailback"; - - /* - * The recovery point type. - */ - private InMageRcmFailbackRecoveryPointType recoveryPointType; - - /** - * Creates an instance of InMageRcmFailbackPlannedFailoverProviderInput class. - */ - public InMageRcmFailbackPlannedFailoverProviderInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointType property: The recovery point type. - * - * @return the recoveryPointType value. - */ - public InMageRcmFailbackRecoveryPointType recoveryPointType() { - return this.recoveryPointType; - } - - /** - * Set the recoveryPointType property: The recovery point type. - * - * @param recoveryPointType the recoveryPointType value to set. - * @return the InMageRcmFailbackPlannedFailoverProviderInput object itself. - */ - public InMageRcmFailbackPlannedFailoverProviderInput - withRecoveryPointType(InMageRcmFailbackRecoveryPointType recoveryPointType) { - this.recoveryPointType = recoveryPointType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryPointType in model InMageRcmFailbackPlannedFailoverProviderInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageRcmFailbackPlannedFailoverProviderInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryPointType", - this.recoveryPointType == null ? null : this.recoveryPointType.toString()); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFailbackPlannedFailoverProviderInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFailbackPlannedFailoverProviderInput if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageRcmFailbackPlannedFailoverProviderInput. - */ - public static InMageRcmFailbackPlannedFailoverProviderInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFailbackPlannedFailoverProviderInput deserializedInMageRcmFailbackPlannedFailoverProviderInput - = new InMageRcmFailbackPlannedFailoverProviderInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryPointType".equals(fieldName)) { - deserializedInMageRcmFailbackPlannedFailoverProviderInput.recoveryPointType - = InMageRcmFailbackRecoveryPointType.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedInMageRcmFailbackPlannedFailoverProviderInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFailbackPlannedFailoverProviderInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackPolicyCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackPolicyCreationInput.java deleted file mode 100644 index dc8d111cd85d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackPolicyCreationInput.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcmFailback policy creation input. - */ -@Fluent -public final class InMageRcmFailbackPolicyCreationInput extends PolicyProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageRcmFailback"; - - /* - * The crash consistent snapshot frequency (in minutes). - */ - private Integer crashConsistentFrequencyInMinutes; - - /* - * The app consistent snapshot frequency (in minutes). - */ - private Integer appConsistentFrequencyInMinutes; - - /** - * Creates an instance of InMageRcmFailbackPolicyCreationInput class. - */ - public InMageRcmFailbackPolicyCreationInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency (in minutes). - * - * @return the crashConsistentFrequencyInMinutes value. - */ - public Integer crashConsistentFrequencyInMinutes() { - return this.crashConsistentFrequencyInMinutes; - } - - /** - * Set the crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency (in minutes). - * - * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set. - * @return the InMageRcmFailbackPolicyCreationInput object itself. - */ - public InMageRcmFailbackPolicyCreationInput - withCrashConsistentFrequencyInMinutes(Integer crashConsistentFrequencyInMinutes) { - this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - return this; - } - - /** - * Get the appConsistentFrequencyInMinutes property: The app consistent snapshot frequency (in minutes). - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: The app consistent snapshot frequency (in minutes). - * - * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set. - * @return the InMageRcmFailbackPolicyCreationInput object itself. - */ - public InMageRcmFailbackPolicyCreationInput - withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { - this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("crashConsistentFrequencyInMinutes", this.crashConsistentFrequencyInMinutes); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFailbackPolicyCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFailbackPolicyCreationInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmFailbackPolicyCreationInput. - */ - public static InMageRcmFailbackPolicyCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFailbackPolicyCreationInput deserializedInMageRcmFailbackPolicyCreationInput - = new InMageRcmFailbackPolicyCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmFailbackPolicyCreationInput.instanceType = reader.getString(); - } else if ("crashConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageRcmFailbackPolicyCreationInput.crashConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageRcmFailbackPolicyCreationInput.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFailbackPolicyCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackPolicyDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackPolicyDetails.java deleted file mode 100644 index b8108e1e9086..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackPolicyDetails.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm failback specific policy details. - */ -@Fluent -public final class InMageRcmFailbackPolicyDetails extends PolicyProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "InMageRcmFailback"; - - /* - * The app consistent snapshot frequency in minutes. - */ - private Integer appConsistentFrequencyInMinutes; - - /* - * The crash consistent snapshot frequency in minutes. - */ - private Integer crashConsistentFrequencyInMinutes; - - /** - * Creates an instance of InMageRcmFailbackPolicyDetails class. - */ - public InMageRcmFailbackPolicyDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the appConsistentFrequencyInMinutes property: The app consistent snapshot frequency in minutes. - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: The app consistent snapshot frequency in minutes. - * - * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set. - * @return the InMageRcmFailbackPolicyDetails object itself. - */ - public InMageRcmFailbackPolicyDetails withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { - this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - return this; - } - - /** - * Get the crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency in minutes. - * - * @return the crashConsistentFrequencyInMinutes value. - */ - public Integer crashConsistentFrequencyInMinutes() { - return this.crashConsistentFrequencyInMinutes; - } - - /** - * Set the crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency in minutes. - * - * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set. - * @return the InMageRcmFailbackPolicyDetails object itself. - */ - public InMageRcmFailbackPolicyDetails - withCrashConsistentFrequencyInMinutes(Integer crashConsistentFrequencyInMinutes) { - this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - jsonWriter.writeNumberField("crashConsistentFrequencyInMinutes", this.crashConsistentFrequencyInMinutes); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFailbackPolicyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFailbackPolicyDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmFailbackPolicyDetails. - */ - public static InMageRcmFailbackPolicyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFailbackPolicyDetails deserializedInMageRcmFailbackPolicyDetails - = new InMageRcmFailbackPolicyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmFailbackPolicyDetails.instanceType = reader.getString(); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageRcmFailbackPolicyDetails.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("crashConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageRcmFailbackPolicyDetails.crashConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFailbackPolicyDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackProtectedDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackProtectedDiskDetails.java deleted file mode 100644 index c6fb2336db4b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackProtectedDiskDetails.java +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * InMageRcmFailback protected disk details. - */ -@Fluent -public final class InMageRcmFailbackProtectedDiskDetails - implements JsonSerializable { - /* - * The disk Id (reported by source agent). - */ - private String diskId; - - /* - * The disk name. - */ - private String diskName; - - /* - * A value indicating whether the disk is the OS disk. - */ - private String isOSDisk; - - /* - * The disk capacity in bytes. - */ - private Long capacityInBytes; - - /* - * The disk Uuid (reported by vCenter). - */ - private String diskUuid; - - /* - * The data pending in log data store in MB. - */ - private Double dataPendingInLogDataStoreInMB; - - /* - * The data pending at source agent in MB. - */ - private Double dataPendingAtSourceAgentInMB; - - /* - * A value indicating whether initial replication is complete or not. - */ - private String isInitialReplicationComplete; - - /* - * The initial replication details. - */ - private InMageRcmFailbackSyncDetails irDetails; - - /* - * The resync details. - */ - private InMageRcmFailbackSyncDetails resyncDetails; - - /* - * The last sync time. - */ - private OffsetDateTime lastSyncTime; - - /** - * Creates an instance of InMageRcmFailbackProtectedDiskDetails class. - */ - public InMageRcmFailbackProtectedDiskDetails() { - } - - /** - * Get the diskId property: The disk Id (reported by source agent). - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Get the diskName property: The disk name. - * - * @return the diskName value. - */ - public String diskName() { - return this.diskName; - } - - /** - * Get the isOSDisk property: A value indicating whether the disk is the OS disk. - * - * @return the isOSDisk value. - */ - public String isOSDisk() { - return this.isOSDisk; - } - - /** - * Get the capacityInBytes property: The disk capacity in bytes. - * - * @return the capacityInBytes value. - */ - public Long capacityInBytes() { - return this.capacityInBytes; - } - - /** - * Get the diskUuid property: The disk Uuid (reported by vCenter). - * - * @return the diskUuid value. - */ - public String diskUuid() { - return this.diskUuid; - } - - /** - * Get the dataPendingInLogDataStoreInMB property: The data pending in log data store in MB. - * - * @return the dataPendingInLogDataStoreInMB value. - */ - public Double dataPendingInLogDataStoreInMB() { - return this.dataPendingInLogDataStoreInMB; - } - - /** - * Get the dataPendingAtSourceAgentInMB property: The data pending at source agent in MB. - * - * @return the dataPendingAtSourceAgentInMB value. - */ - public Double dataPendingAtSourceAgentInMB() { - return this.dataPendingAtSourceAgentInMB; - } - - /** - * Get the isInitialReplicationComplete property: A value indicating whether initial replication is complete or not. - * - * @return the isInitialReplicationComplete value. - */ - public String isInitialReplicationComplete() { - return this.isInitialReplicationComplete; - } - - /** - * Get the irDetails property: The initial replication details. - * - * @return the irDetails value. - */ - public InMageRcmFailbackSyncDetails irDetails() { - return this.irDetails; - } - - /** - * Set the irDetails property: The initial replication details. - * - * @param irDetails the irDetails value to set. - * @return the InMageRcmFailbackProtectedDiskDetails object itself. - */ - public InMageRcmFailbackProtectedDiskDetails withIrDetails(InMageRcmFailbackSyncDetails irDetails) { - this.irDetails = irDetails; - return this; - } - - /** - * Get the resyncDetails property: The resync details. - * - * @return the resyncDetails value. - */ - public InMageRcmFailbackSyncDetails resyncDetails() { - return this.resyncDetails; - } - - /** - * Set the resyncDetails property: The resync details. - * - * @param resyncDetails the resyncDetails value to set. - * @return the InMageRcmFailbackProtectedDiskDetails object itself. - */ - public InMageRcmFailbackProtectedDiskDetails withResyncDetails(InMageRcmFailbackSyncDetails resyncDetails) { - this.resyncDetails = resyncDetails; - return this; - } - - /** - * Get the lastSyncTime property: The last sync time. - * - * @return the lastSyncTime value. - */ - public OffsetDateTime lastSyncTime() { - return this.lastSyncTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (irDetails() != null) { - irDetails().validate(); - } - if (resyncDetails() != null) { - resyncDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("irDetails", this.irDetails); - jsonWriter.writeJsonField("resyncDetails", this.resyncDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFailbackProtectedDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFailbackProtectedDiskDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmFailbackProtectedDiskDetails. - */ - public static InMageRcmFailbackProtectedDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFailbackProtectedDiskDetails deserializedInMageRcmFailbackProtectedDiskDetails - = new InMageRcmFailbackProtectedDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedInMageRcmFailbackProtectedDiskDetails.diskId = reader.getString(); - } else if ("diskName".equals(fieldName)) { - deserializedInMageRcmFailbackProtectedDiskDetails.diskName = reader.getString(); - } else if ("isOSDisk".equals(fieldName)) { - deserializedInMageRcmFailbackProtectedDiskDetails.isOSDisk = reader.getString(); - } else if ("capacityInBytes".equals(fieldName)) { - deserializedInMageRcmFailbackProtectedDiskDetails.capacityInBytes - = reader.getNullable(JsonReader::getLong); - } else if ("diskUuid".equals(fieldName)) { - deserializedInMageRcmFailbackProtectedDiskDetails.diskUuid = reader.getString(); - } else if ("dataPendingInLogDataStoreInMB".equals(fieldName)) { - deserializedInMageRcmFailbackProtectedDiskDetails.dataPendingInLogDataStoreInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("dataPendingAtSourceAgentInMB".equals(fieldName)) { - deserializedInMageRcmFailbackProtectedDiskDetails.dataPendingAtSourceAgentInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("isInitialReplicationComplete".equals(fieldName)) { - deserializedInMageRcmFailbackProtectedDiskDetails.isInitialReplicationComplete = reader.getString(); - } else if ("irDetails".equals(fieldName)) { - deserializedInMageRcmFailbackProtectedDiskDetails.irDetails - = InMageRcmFailbackSyncDetails.fromJson(reader); - } else if ("resyncDetails".equals(fieldName)) { - deserializedInMageRcmFailbackProtectedDiskDetails.resyncDetails - = InMageRcmFailbackSyncDetails.fromJson(reader); - } else if ("lastSyncTime".equals(fieldName)) { - deserializedInMageRcmFailbackProtectedDiskDetails.lastSyncTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFailbackProtectedDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackRecoveryPointType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackRecoveryPointType.java deleted file mode 100644 index 7b72d0835fee..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackRecoveryPointType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The recovery point type. - */ -public final class InMageRcmFailbackRecoveryPointType extends ExpandableStringEnum { - /** - * Static value ApplicationConsistent for InMageRcmFailbackRecoveryPointType. - */ - public static final InMageRcmFailbackRecoveryPointType APPLICATION_CONSISTENT = fromString("ApplicationConsistent"); - - /** - * Static value CrashConsistent for InMageRcmFailbackRecoveryPointType. - */ - public static final InMageRcmFailbackRecoveryPointType CRASH_CONSISTENT = fromString("CrashConsistent"); - - /** - * Creates a new instance of InMageRcmFailbackRecoveryPointType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public InMageRcmFailbackRecoveryPointType() { - } - - /** - * Creates or finds a InMageRcmFailbackRecoveryPointType from its string representation. - * - * @param name a name to look for. - * @return the corresponding InMageRcmFailbackRecoveryPointType. - */ - public static InMageRcmFailbackRecoveryPointType fromString(String name) { - return fromString(name, InMageRcmFailbackRecoveryPointType.class); - } - - /** - * Gets known InMageRcmFailbackRecoveryPointType values. - * - * @return known InMageRcmFailbackRecoveryPointType values. - */ - public static Collection values() { - return values(InMageRcmFailbackRecoveryPointType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackReplicationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackReplicationDetails.java deleted file mode 100644 index 6c85c930da11..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackReplicationDetails.java +++ /dev/null @@ -1,640 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * InMageRcmFailback provider specific details. - */ -@Fluent -public final class InMageRcmFailbackReplicationDetails extends ReplicationProviderSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "InMageRcmFailback"; - - /* - * The virtual machine internal identifier. - */ - private String internalIdentifier; - - /* - * The ARM Id of the azure VM. - */ - private String azureVirtualMachineId; - - /* - * The multi VM group name. - */ - private String multiVmGroupName; - - /* - * The reprotect agent Id. - */ - private String reprotectAgentId; - - /* - * The reprotect agent name. - */ - private String reprotectAgentName; - - /* - * The type of the OS on the VM. - */ - private String osType; - - /* - * The log storage account ARM Id. - */ - private String logStorageAccountId; - - /* - * The target vCenter Id. - */ - private String targetvCenterId; - - /* - * The target datastore name. - */ - private String targetDataStoreName; - - /* - * The target VM name. - */ - private String targetVmName; - - /* - * The initial replication progress percentage. - */ - private Integer initialReplicationProgressPercentage; - - /* - * The initial replication processed bytes. This includes sum of total bytes transferred and matched bytes on all - * selected disks in source VM. - */ - private Long initialReplicationProcessedBytes; - - /* - * The initial replication transferred bytes from source VM to target for all selected disks on source VM. - */ - private Long initialReplicationTransferredBytes; - - /* - * The initial replication progress health. - */ - private VmReplicationProgressHealth initialReplicationProgressHealth; - - /* - * The resync progress percentage. - */ - private Integer resyncProgressPercentage; - - /* - * The resync processed bytes. This includes sum of total bytes transferred and matched bytes on all selected disks - * in source VM. - */ - private Long resyncProcessedBytes; - - /* - * The resync transferred bytes from source VM to target for all selected disks on source VM. - */ - private Long resyncTransferredBytes; - - /* - * The resync progress health. - */ - private VmReplicationProgressHealth resyncProgressHealth; - - /* - * A value indicating whether resync is required. - */ - private String resyncRequired; - - /* - * The resync state. - */ - private ResyncState resyncState; - - /* - * The list of protected disks. - */ - private List protectedDisks; - - /* - * The mobility agent information. - */ - private InMageRcmFailbackMobilityAgentDetails mobilityAgentDetails; - - /* - * The network details. - */ - private List vmNics; - - /* - * The last planned failover start time. - */ - private OffsetDateTime lastPlannedFailoverStartTime; - - /* - * The last planned failover status. - */ - private PlannedFailoverStatus lastPlannedFailoverStatus; - - /* - * The discovered VM information. - */ - private InMageRcmFailbackDiscoveredProtectedVmDetails discoveredVmDetails; - - /* - * The policy Id used by the forward replication. - */ - private String lastUsedPolicyId; - - /* - * The policy friendly name used by the forward replication. - */ - private String lastUsedPolicyFriendlyName; - - /* - * A value indicating whether agent registration was successful after failover. - */ - private Boolean isAgentRegistrationSuccessfulAfterFailover; - - /** - * Creates an instance of InMageRcmFailbackReplicationDetails class. - */ - public InMageRcmFailbackReplicationDetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the internalIdentifier property: The virtual machine internal identifier. - * - * @return the internalIdentifier value. - */ - public String internalIdentifier() { - return this.internalIdentifier; - } - - /** - * Get the azureVirtualMachineId property: The ARM Id of the azure VM. - * - * @return the azureVirtualMachineId value. - */ - public String azureVirtualMachineId() { - return this.azureVirtualMachineId; - } - - /** - * Get the multiVmGroupName property: The multi VM group name. - * - * @return the multiVmGroupName value. - */ - public String multiVmGroupName() { - return this.multiVmGroupName; - } - - /** - * Get the reprotectAgentId property: The reprotect agent Id. - * - * @return the reprotectAgentId value. - */ - public String reprotectAgentId() { - return this.reprotectAgentId; - } - - /** - * Get the reprotectAgentName property: The reprotect agent name. - * - * @return the reprotectAgentName value. - */ - public String reprotectAgentName() { - return this.reprotectAgentName; - } - - /** - * Get the osType property: The type of the OS on the VM. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Get the logStorageAccountId property: The log storage account ARM Id. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Get the targetvCenterId property: The target vCenter Id. - * - * @return the targetvCenterId value. - */ - public String targetvCenterId() { - return this.targetvCenterId; - } - - /** - * Get the targetDataStoreName property: The target datastore name. - * - * @return the targetDataStoreName value. - */ - public String targetDataStoreName() { - return this.targetDataStoreName; - } - - /** - * Get the targetVmName property: The target VM name. - * - * @return the targetVmName value. - */ - public String targetVmName() { - return this.targetVmName; - } - - /** - * Get the initialReplicationProgressPercentage property: The initial replication progress percentage. - * - * @return the initialReplicationProgressPercentage value. - */ - public Integer initialReplicationProgressPercentage() { - return this.initialReplicationProgressPercentage; - } - - /** - * Get the initialReplicationProcessedBytes property: The initial replication processed bytes. This includes sum of - * total bytes transferred and matched bytes on all selected disks in source VM. - * - * @return the initialReplicationProcessedBytes value. - */ - public Long initialReplicationProcessedBytes() { - return this.initialReplicationProcessedBytes; - } - - /** - * Get the initialReplicationTransferredBytes property: The initial replication transferred bytes from source VM to - * target for all selected disks on source VM. - * - * @return the initialReplicationTransferredBytes value. - */ - public Long initialReplicationTransferredBytes() { - return this.initialReplicationTransferredBytes; - } - - /** - * Get the initialReplicationProgressHealth property: The initial replication progress health. - * - * @return the initialReplicationProgressHealth value. - */ - public VmReplicationProgressHealth initialReplicationProgressHealth() { - return this.initialReplicationProgressHealth; - } - - /** - * Get the resyncProgressPercentage property: The resync progress percentage. - * - * @return the resyncProgressPercentage value. - */ - public Integer resyncProgressPercentage() { - return this.resyncProgressPercentage; - } - - /** - * Get the resyncProcessedBytes property: The resync processed bytes. This includes sum of total bytes transferred - * and matched bytes on all selected disks in source VM. - * - * @return the resyncProcessedBytes value. - */ - public Long resyncProcessedBytes() { - return this.resyncProcessedBytes; - } - - /** - * Get the resyncTransferredBytes property: The resync transferred bytes from source VM to target for all selected - * disks on source VM. - * - * @return the resyncTransferredBytes value. - */ - public Long resyncTransferredBytes() { - return this.resyncTransferredBytes; - } - - /** - * Get the resyncProgressHealth property: The resync progress health. - * - * @return the resyncProgressHealth value. - */ - public VmReplicationProgressHealth resyncProgressHealth() { - return this.resyncProgressHealth; - } - - /** - * Get the resyncRequired property: A value indicating whether resync is required. - * - * @return the resyncRequired value. - */ - public String resyncRequired() { - return this.resyncRequired; - } - - /** - * Get the resyncState property: The resync state. - * - * @return the resyncState value. - */ - public ResyncState resyncState() { - return this.resyncState; - } - - /** - * Get the protectedDisks property: The list of protected disks. - * - * @return the protectedDisks value. - */ - public List protectedDisks() { - return this.protectedDisks; - } - - /** - * Set the protectedDisks property: The list of protected disks. - * - * @param protectedDisks the protectedDisks value to set. - * @return the InMageRcmFailbackReplicationDetails object itself. - */ - public InMageRcmFailbackReplicationDetails - withProtectedDisks(List protectedDisks) { - this.protectedDisks = protectedDisks; - return this; - } - - /** - * Get the mobilityAgentDetails property: The mobility agent information. - * - * @return the mobilityAgentDetails value. - */ - public InMageRcmFailbackMobilityAgentDetails mobilityAgentDetails() { - return this.mobilityAgentDetails; - } - - /** - * Set the mobilityAgentDetails property: The mobility agent information. - * - * @param mobilityAgentDetails the mobilityAgentDetails value to set. - * @return the InMageRcmFailbackReplicationDetails object itself. - */ - public InMageRcmFailbackReplicationDetails - withMobilityAgentDetails(InMageRcmFailbackMobilityAgentDetails mobilityAgentDetails) { - this.mobilityAgentDetails = mobilityAgentDetails; - return this; - } - - /** - * Get the vmNics property: The network details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: The network details. - * - * @param vmNics the vmNics value to set. - * @return the InMageRcmFailbackReplicationDetails object itself. - */ - public InMageRcmFailbackReplicationDetails withVmNics(List vmNics) { - this.vmNics = vmNics; - return this; - } - - /** - * Get the lastPlannedFailoverStartTime property: The last planned failover start time. - * - * @return the lastPlannedFailoverStartTime value. - */ - public OffsetDateTime lastPlannedFailoverStartTime() { - return this.lastPlannedFailoverStartTime; - } - - /** - * Get the lastPlannedFailoverStatus property: The last planned failover status. - * - * @return the lastPlannedFailoverStatus value. - */ - public PlannedFailoverStatus lastPlannedFailoverStatus() { - return this.lastPlannedFailoverStatus; - } - - /** - * Get the discoveredVmDetails property: The discovered VM information. - * - * @return the discoveredVmDetails value. - */ - public InMageRcmFailbackDiscoveredProtectedVmDetails discoveredVmDetails() { - return this.discoveredVmDetails; - } - - /** - * Set the discoveredVmDetails property: The discovered VM information. - * - * @param discoveredVmDetails the discoveredVmDetails value to set. - * @return the InMageRcmFailbackReplicationDetails object itself. - */ - public InMageRcmFailbackReplicationDetails - withDiscoveredVmDetails(InMageRcmFailbackDiscoveredProtectedVmDetails discoveredVmDetails) { - this.discoveredVmDetails = discoveredVmDetails; - return this; - } - - /** - * Get the lastUsedPolicyId property: The policy Id used by the forward replication. - * - * @return the lastUsedPolicyId value. - */ - public String lastUsedPolicyId() { - return this.lastUsedPolicyId; - } - - /** - * Get the lastUsedPolicyFriendlyName property: The policy friendly name used by the forward replication. - * - * @return the lastUsedPolicyFriendlyName value. - */ - public String lastUsedPolicyFriendlyName() { - return this.lastUsedPolicyFriendlyName; - } - - /** - * Get the isAgentRegistrationSuccessfulAfterFailover property: A value indicating whether agent registration was - * successful after failover. - * - * @return the isAgentRegistrationSuccessfulAfterFailover value. - */ - public Boolean isAgentRegistrationSuccessfulAfterFailover() { - return this.isAgentRegistrationSuccessfulAfterFailover; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (protectedDisks() != null) { - protectedDisks().forEach(e -> e.validate()); - } - if (mobilityAgentDetails() != null) { - mobilityAgentDetails().validate(); - } - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - if (discoveredVmDetails() != null) { - discoveredVmDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("protectedDisks", this.protectedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("mobilityAgentDetails", this.mobilityAgentDetails); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("discoveredVmDetails", this.discoveredVmDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFailbackReplicationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFailbackReplicationDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmFailbackReplicationDetails. - */ - public static InMageRcmFailbackReplicationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFailbackReplicationDetails deserializedInMageRcmFailbackReplicationDetails - = new InMageRcmFailbackReplicationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.instanceType = reader.getString(); - } else if ("internalIdentifier".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.internalIdentifier = reader.getString(); - } else if ("azureVirtualMachineId".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.azureVirtualMachineId = reader.getString(); - } else if ("multiVmGroupName".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.multiVmGroupName = reader.getString(); - } else if ("reprotectAgentId".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.reprotectAgentId = reader.getString(); - } else if ("reprotectAgentName".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.reprotectAgentName = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.osType = reader.getString(); - } else if ("logStorageAccountId".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.logStorageAccountId = reader.getString(); - } else if ("targetvCenterId".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.targetvCenterId = reader.getString(); - } else if ("targetDataStoreName".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.targetDataStoreName = reader.getString(); - } else if ("targetVmName".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.targetVmName = reader.getString(); - } else if ("initialReplicationProgressPercentage".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.initialReplicationProgressPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("initialReplicationProcessedBytes".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.initialReplicationProcessedBytes - = reader.getNullable(JsonReader::getLong); - } else if ("initialReplicationTransferredBytes".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.initialReplicationTransferredBytes - = reader.getNullable(JsonReader::getLong); - } else if ("initialReplicationProgressHealth".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.initialReplicationProgressHealth - = VmReplicationProgressHealth.fromString(reader.getString()); - } else if ("resyncProgressPercentage".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.resyncProgressPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("resyncProcessedBytes".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.resyncProcessedBytes - = reader.getNullable(JsonReader::getLong); - } else if ("resyncTransferredBytes".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.resyncTransferredBytes - = reader.getNullable(JsonReader::getLong); - } else if ("resyncProgressHealth".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.resyncProgressHealth - = VmReplicationProgressHealth.fromString(reader.getString()); - } else if ("resyncRequired".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.resyncRequired = reader.getString(); - } else if ("resyncState".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.resyncState - = ResyncState.fromString(reader.getString()); - } else if ("protectedDisks".equals(fieldName)) { - List protectedDisks - = reader.readArray(reader1 -> InMageRcmFailbackProtectedDiskDetails.fromJson(reader1)); - deserializedInMageRcmFailbackReplicationDetails.protectedDisks = protectedDisks; - } else if ("mobilityAgentDetails".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.mobilityAgentDetails - = InMageRcmFailbackMobilityAgentDetails.fromJson(reader); - } else if ("vmNics".equals(fieldName)) { - List vmNics - = reader.readArray(reader1 -> InMageRcmFailbackNicDetails.fromJson(reader1)); - deserializedInMageRcmFailbackReplicationDetails.vmNics = vmNics; - } else if ("lastPlannedFailoverStartTime".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.lastPlannedFailoverStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastPlannedFailoverStatus".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.lastPlannedFailoverStatus - = PlannedFailoverStatus.fromString(reader.getString()); - } else if ("discoveredVmDetails".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.discoveredVmDetails - = InMageRcmFailbackDiscoveredProtectedVmDetails.fromJson(reader); - } else if ("lastUsedPolicyId".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.lastUsedPolicyId = reader.getString(); - } else if ("lastUsedPolicyFriendlyName".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.lastUsedPolicyFriendlyName = reader.getString(); - } else if ("isAgentRegistrationSuccessfulAfterFailover".equals(fieldName)) { - deserializedInMageRcmFailbackReplicationDetails.isAgentRegistrationSuccessfulAfterFailover - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFailbackReplicationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackReprotectInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackReprotectInput.java deleted file mode 100644 index 9f5f1339d9ba..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackReprotectInput.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcmFailback specific provider input. - */ -@Fluent -public final class InMageRcmFailbackReprotectInput extends ReverseReplicationProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageRcmFailback"; - - /* - * The process server Id. - */ - private String processServerId; - - /* - * The run as account Id. - */ - private String runAsAccountId; - - /* - * The Policy Id. - */ - private String policyId; - - /** - * Creates an instance of InMageRcmFailbackReprotectInput class. - */ - public InMageRcmFailbackReprotectInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the processServerId property: The process server Id. - * - * @return the processServerId value. - */ - public String processServerId() { - return this.processServerId; - } - - /** - * Set the processServerId property: The process server Id. - * - * @param processServerId the processServerId value to set. - * @return the InMageRcmFailbackReprotectInput object itself. - */ - public InMageRcmFailbackReprotectInput withProcessServerId(String processServerId) { - this.processServerId = processServerId; - return this; - } - - /** - * Get the runAsAccountId property: The run as account Id. - * - * @return the runAsAccountId value. - */ - public String runAsAccountId() { - return this.runAsAccountId; - } - - /** - * Set the runAsAccountId property: The run as account Id. - * - * @param runAsAccountId the runAsAccountId value to set. - * @return the InMageRcmFailbackReprotectInput object itself. - */ - public InMageRcmFailbackReprotectInput withRunAsAccountId(String runAsAccountId) { - this.runAsAccountId = runAsAccountId; - return this; - } - - /** - * Get the policyId property: The Policy Id. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Set the policyId property: The Policy Id. - * - * @param policyId the policyId value to set. - * @return the InMageRcmFailbackReprotectInput object itself. - */ - public InMageRcmFailbackReprotectInput withPolicyId(String policyId) { - this.policyId = policyId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (processServerId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property processServerId in model InMageRcmFailbackReprotectInput")); - } - if (policyId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property policyId in model InMageRcmFailbackReprotectInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageRcmFailbackReprotectInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("processServerId", this.processServerId); - jsonWriter.writeStringField("policyId", this.policyId); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("runAsAccountId", this.runAsAccountId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFailbackReprotectInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFailbackReprotectInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageRcmFailbackReprotectInput. - */ - public static InMageRcmFailbackReprotectInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFailbackReprotectInput deserializedInMageRcmFailbackReprotectInput - = new InMageRcmFailbackReprotectInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("processServerId".equals(fieldName)) { - deserializedInMageRcmFailbackReprotectInput.processServerId = reader.getString(); - } else if ("policyId".equals(fieldName)) { - deserializedInMageRcmFailbackReprotectInput.policyId = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedInMageRcmFailbackReprotectInput.instanceType = reader.getString(); - } else if ("runAsAccountId".equals(fieldName)) { - deserializedInMageRcmFailbackReprotectInput.runAsAccountId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFailbackReprotectInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackSyncDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackSyncDetails.java deleted file mode 100644 index 7e2677f4e288..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmFailbackSyncDetails.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcmFailback disk level sync details. - */ -@Immutable -public final class InMageRcmFailbackSyncDetails implements JsonSerializable { - /* - * The progress health. - */ - private DiskReplicationProgressHealth progressHealth; - - /* - * The transferred bytes from source VM to azure for the disk. - */ - private Long transferredBytes; - - /* - * The bytes transferred in last 15 minutes from source VM to target. - */ - private Long last15MinutesTransferredBytes; - - /* - * The time of the last data transfer from source VM to target. - */ - private String lastDataTransferTimeUtc; - - /* - * The total processed bytes. This includes bytes that are transferred from source VM to target and matched bytes. - */ - private Long processedBytes; - - /* - * The start time. - */ - private String startTime; - - /* - * The last refresh time. - */ - private String lastRefreshTime; - - /* - * Progress in percentage. Progress percentage is calculated based on processed bytes. - */ - private Integer progressPercentage; - - /** - * Creates an instance of InMageRcmFailbackSyncDetails class. - */ - public InMageRcmFailbackSyncDetails() { - } - - /** - * Get the progressHealth property: The progress health. - * - * @return the progressHealth value. - */ - public DiskReplicationProgressHealth progressHealth() { - return this.progressHealth; - } - - /** - * Get the transferredBytes property: The transferred bytes from source VM to azure for the disk. - * - * @return the transferredBytes value. - */ - public Long transferredBytes() { - return this.transferredBytes; - } - - /** - * Get the last15MinutesTransferredBytes property: The bytes transferred in last 15 minutes from source VM to - * target. - * - * @return the last15MinutesTransferredBytes value. - */ - public Long last15MinutesTransferredBytes() { - return this.last15MinutesTransferredBytes; - } - - /** - * Get the lastDataTransferTimeUtc property: The time of the last data transfer from source VM to target. - * - * @return the lastDataTransferTimeUtc value. - */ - public String lastDataTransferTimeUtc() { - return this.lastDataTransferTimeUtc; - } - - /** - * Get the processedBytes property: The total processed bytes. This includes bytes that are transferred from source - * VM to target and matched bytes. - * - * @return the processedBytes value. - */ - public Long processedBytes() { - return this.processedBytes; - } - - /** - * Get the startTime property: The start time. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Get the lastRefreshTime property: The last refresh time. - * - * @return the lastRefreshTime value. - */ - public String lastRefreshTime() { - return this.lastRefreshTime; - } - - /** - * Get the progressPercentage property: Progress in percentage. Progress percentage is calculated based on processed - * bytes. - * - * @return the progressPercentage value. - */ - public Integer progressPercentage() { - return this.progressPercentage; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmFailbackSyncDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmFailbackSyncDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmFailbackSyncDetails. - */ - public static InMageRcmFailbackSyncDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmFailbackSyncDetails deserializedInMageRcmFailbackSyncDetails = new InMageRcmFailbackSyncDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("progressHealth".equals(fieldName)) { - deserializedInMageRcmFailbackSyncDetails.progressHealth - = DiskReplicationProgressHealth.fromString(reader.getString()); - } else if ("transferredBytes".equals(fieldName)) { - deserializedInMageRcmFailbackSyncDetails.transferredBytes = reader.getNullable(JsonReader::getLong); - } else if ("last15MinutesTransferredBytes".equals(fieldName)) { - deserializedInMageRcmFailbackSyncDetails.last15MinutesTransferredBytes - = reader.getNullable(JsonReader::getLong); - } else if ("lastDataTransferTimeUtc".equals(fieldName)) { - deserializedInMageRcmFailbackSyncDetails.lastDataTransferTimeUtc = reader.getString(); - } else if ("processedBytes".equals(fieldName)) { - deserializedInMageRcmFailbackSyncDetails.processedBytes = reader.getNullable(JsonReader::getLong); - } else if ("startTime".equals(fieldName)) { - deserializedInMageRcmFailbackSyncDetails.startTime = reader.getString(); - } else if ("lastRefreshTime".equals(fieldName)) { - deserializedInMageRcmFailbackSyncDetails.lastRefreshTime = reader.getString(); - } else if ("progressPercentage".equals(fieldName)) { - deserializedInMageRcmFailbackSyncDetails.progressPercentage - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmFailbackSyncDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmLastAgentUpgradeErrorDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmLastAgentUpgradeErrorDetails.java deleted file mode 100644 index 5babd02eada8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmLastAgentUpgradeErrorDetails.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * InMageRcm last source agent upgrade error details. - */ -@Immutable -public final class InMageRcmLastAgentUpgradeErrorDetails - implements JsonSerializable { - /* - * The error code. - */ - private String errorCode; - - /* - * The error message. - */ - private String errorMessage; - - /* - * The possible causes. - */ - private String possibleCauses; - - /* - * The recommended action. - */ - private String recommendedAction; - - /* - * The error message parameters. - */ - private Map errorMessageParameters; - - /* - * The error tags. - */ - private Map errorTags; - - /** - * Creates an instance of InMageRcmLastAgentUpgradeErrorDetails class. - */ - public InMageRcmLastAgentUpgradeErrorDetails() { - } - - /** - * Get the errorCode property: The error code. - * - * @return the errorCode value. - */ - public String errorCode() { - return this.errorCode; - } - - /** - * Get the errorMessage property: The error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the possibleCauses property: The possible causes. - * - * @return the possibleCauses value. - */ - public String possibleCauses() { - return this.possibleCauses; - } - - /** - * Get the recommendedAction property: The recommended action. - * - * @return the recommendedAction value. - */ - public String recommendedAction() { - return this.recommendedAction; - } - - /** - * Get the errorMessageParameters property: The error message parameters. - * - * @return the errorMessageParameters value. - */ - public Map errorMessageParameters() { - return this.errorMessageParameters; - } - - /** - * Get the errorTags property: The error tags. - * - * @return the errorTags value. - */ - public Map errorTags() { - return this.errorTags; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmLastAgentUpgradeErrorDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmLastAgentUpgradeErrorDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmLastAgentUpgradeErrorDetails. - */ - public static InMageRcmLastAgentUpgradeErrorDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmLastAgentUpgradeErrorDetails deserializedInMageRcmLastAgentUpgradeErrorDetails - = new InMageRcmLastAgentUpgradeErrorDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("errorCode".equals(fieldName)) { - deserializedInMageRcmLastAgentUpgradeErrorDetails.errorCode = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedInMageRcmLastAgentUpgradeErrorDetails.errorMessage = reader.getString(); - } else if ("possibleCauses".equals(fieldName)) { - deserializedInMageRcmLastAgentUpgradeErrorDetails.possibleCauses = reader.getString(); - } else if ("recommendedAction".equals(fieldName)) { - deserializedInMageRcmLastAgentUpgradeErrorDetails.recommendedAction = reader.getString(); - } else if ("errorMessageParameters".equals(fieldName)) { - Map errorMessageParameters = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageRcmLastAgentUpgradeErrorDetails.errorMessageParameters = errorMessageParameters; - } else if ("errorTags".equals(fieldName)) { - Map errorTags = reader.readMap(reader1 -> reader1.getString()); - deserializedInMageRcmLastAgentUpgradeErrorDetails.errorTags = errorTags; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmLastAgentUpgradeErrorDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmMobilityAgentDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmMobilityAgentDetails.java deleted file mode 100644 index 5b81709a32b8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmMobilityAgentDetails.java +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * InMageRcm mobility agent details. - */ -@Immutable -public final class InMageRcmMobilityAgentDetails implements JsonSerializable { - /* - * The agent version. - */ - private String version; - - /* - * The latest agent version available. - */ - private String latestVersion; - - /* - * The latest agent version release date. - */ - private String latestAgentReleaseDate; - - /* - * The driver version. - */ - private String driverVersion; - - /* - * The latest upgradeable version available without reboot. - */ - private String latestUpgradableVersionWithoutReboot; - - /* - * The agent version expiry date. - */ - private OffsetDateTime agentVersionExpiryDate; - - /* - * The driver version expiry date. - */ - private OffsetDateTime driverVersionExpiryDate; - - /* - * The time of the last heartbeat received from the agent. - */ - private OffsetDateTime lastHeartbeatUtc; - - /* - * The whether update is possible or not. - */ - private List reasonsBlockingUpgrade; - - /* - * A value indicating whether agent is upgradeable or not. - */ - private String isUpgradeable; - - /** - * Creates an instance of InMageRcmMobilityAgentDetails class. - */ - public InMageRcmMobilityAgentDetails() { - } - - /** - * Get the version property: The agent version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the latestVersion property: The latest agent version available. - * - * @return the latestVersion value. - */ - public String latestVersion() { - return this.latestVersion; - } - - /** - * Get the latestAgentReleaseDate property: The latest agent version release date. - * - * @return the latestAgentReleaseDate value. - */ - public String latestAgentReleaseDate() { - return this.latestAgentReleaseDate; - } - - /** - * Get the driverVersion property: The driver version. - * - * @return the driverVersion value. - */ - public String driverVersion() { - return this.driverVersion; - } - - /** - * Get the latestUpgradableVersionWithoutReboot property: The latest upgradeable version available without reboot. - * - * @return the latestUpgradableVersionWithoutReboot value. - */ - public String latestUpgradableVersionWithoutReboot() { - return this.latestUpgradableVersionWithoutReboot; - } - - /** - * Get the agentVersionExpiryDate property: The agent version expiry date. - * - * @return the agentVersionExpiryDate value. - */ - public OffsetDateTime agentVersionExpiryDate() { - return this.agentVersionExpiryDate; - } - - /** - * Get the driverVersionExpiryDate property: The driver version expiry date. - * - * @return the driverVersionExpiryDate value. - */ - public OffsetDateTime driverVersionExpiryDate() { - return this.driverVersionExpiryDate; - } - - /** - * Get the lastHeartbeatUtc property: The time of the last heartbeat received from the agent. - * - * @return the lastHeartbeatUtc value. - */ - public OffsetDateTime lastHeartbeatUtc() { - return this.lastHeartbeatUtc; - } - - /** - * Get the reasonsBlockingUpgrade property: The whether update is possible or not. - * - * @return the reasonsBlockingUpgrade value. - */ - public List reasonsBlockingUpgrade() { - return this.reasonsBlockingUpgrade; - } - - /** - * Get the isUpgradeable property: A value indicating whether agent is upgradeable or not. - * - * @return the isUpgradeable value. - */ - public String isUpgradeable() { - return this.isUpgradeable; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmMobilityAgentDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmMobilityAgentDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmMobilityAgentDetails. - */ - public static InMageRcmMobilityAgentDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmMobilityAgentDetails deserializedInMageRcmMobilityAgentDetails - = new InMageRcmMobilityAgentDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("version".equals(fieldName)) { - deserializedInMageRcmMobilityAgentDetails.version = reader.getString(); - } else if ("latestVersion".equals(fieldName)) { - deserializedInMageRcmMobilityAgentDetails.latestVersion = reader.getString(); - } else if ("latestAgentReleaseDate".equals(fieldName)) { - deserializedInMageRcmMobilityAgentDetails.latestAgentReleaseDate = reader.getString(); - } else if ("driverVersion".equals(fieldName)) { - deserializedInMageRcmMobilityAgentDetails.driverVersion = reader.getString(); - } else if ("latestUpgradableVersionWithoutReboot".equals(fieldName)) { - deserializedInMageRcmMobilityAgentDetails.latestUpgradableVersionWithoutReboot = reader.getString(); - } else if ("agentVersionExpiryDate".equals(fieldName)) { - deserializedInMageRcmMobilityAgentDetails.agentVersionExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("driverVersionExpiryDate".equals(fieldName)) { - deserializedInMageRcmMobilityAgentDetails.driverVersionExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastHeartbeatUtc".equals(fieldName)) { - deserializedInMageRcmMobilityAgentDetails.lastHeartbeatUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("reasonsBlockingUpgrade".equals(fieldName)) { - List reasonsBlockingUpgrade - = reader.readArray(reader1 -> AgentUpgradeBlockedReason.fromString(reader1.getString())); - deserializedInMageRcmMobilityAgentDetails.reasonsBlockingUpgrade = reasonsBlockingUpgrade; - } else if ("isUpgradeable".equals(fieldName)) { - deserializedInMageRcmMobilityAgentDetails.isUpgradeable = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmMobilityAgentDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmNicDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmNicDetails.java deleted file mode 100644 index 52ea37a31cbe..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmNicDetails.java +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm NIC details. - */ -@Fluent -public final class InMageRcmNicDetails implements JsonSerializable { - /* - * The NIC Id. - */ - private String nicId; - - /* - * A value indicating whether this is the primary NIC. - */ - private String isPrimaryNic; - - /* - * A value indicating whether this NIC is selected for failover. - */ - private String isSelectedForFailover; - - /* - * The source IP address. - */ - private String sourceIpAddress; - - /* - * The source IP address type. - */ - private EthernetAddressType sourceIpAddressType; - - /* - * Source network Id. - */ - private String sourceNetworkId; - - /* - * Source subnet name. - */ - private String sourceSubnetName; - - /* - * The target IP address. - */ - private String targetIpAddress; - - /* - * The target IP address type. - */ - private EthernetAddressType targetIpAddressType; - - /* - * Target subnet name. - */ - private String targetSubnetName; - - /* - * Test subnet name. - */ - private String testSubnetName; - - /* - * The test IP address. - */ - private String testIpAddress; - - /* - * The test IP address type. - */ - private EthernetAddressType testIpAddressType; - - /** - * Creates an instance of InMageRcmNicDetails class. - */ - public InMageRcmNicDetails() { - } - - /** - * Get the nicId property: The NIC Id. - * - * @return the nicId value. - */ - public String nicId() { - return this.nicId; - } - - /** - * Get the isPrimaryNic property: A value indicating whether this is the primary NIC. - * - * @return the isPrimaryNic value. - */ - public String isPrimaryNic() { - return this.isPrimaryNic; - } - - /** - * Set the isPrimaryNic property: A value indicating whether this is the primary NIC. - * - * @param isPrimaryNic the isPrimaryNic value to set. - * @return the InMageRcmNicDetails object itself. - */ - public InMageRcmNicDetails withIsPrimaryNic(String isPrimaryNic) { - this.isPrimaryNic = isPrimaryNic; - return this; - } - - /** - * Get the isSelectedForFailover property: A value indicating whether this NIC is selected for failover. - * - * @return the isSelectedForFailover value. - */ - public String isSelectedForFailover() { - return this.isSelectedForFailover; - } - - /** - * Set the isSelectedForFailover property: A value indicating whether this NIC is selected for failover. - * - * @param isSelectedForFailover the isSelectedForFailover value to set. - * @return the InMageRcmNicDetails object itself. - */ - public InMageRcmNicDetails withIsSelectedForFailover(String isSelectedForFailover) { - this.isSelectedForFailover = isSelectedForFailover; - return this; - } - - /** - * Get the sourceIpAddress property: The source IP address. - * - * @return the sourceIpAddress value. - */ - public String sourceIpAddress() { - return this.sourceIpAddress; - } - - /** - * Get the sourceIpAddressType property: The source IP address type. - * - * @return the sourceIpAddressType value. - */ - public EthernetAddressType sourceIpAddressType() { - return this.sourceIpAddressType; - } - - /** - * Get the sourceNetworkId property: Source network Id. - * - * @return the sourceNetworkId value. - */ - public String sourceNetworkId() { - return this.sourceNetworkId; - } - - /** - * Get the sourceSubnetName property: Source subnet name. - * - * @return the sourceSubnetName value. - */ - public String sourceSubnetName() { - return this.sourceSubnetName; - } - - /** - * Get the targetIpAddress property: The target IP address. - * - * @return the targetIpAddress value. - */ - public String targetIpAddress() { - return this.targetIpAddress; - } - - /** - * Set the targetIpAddress property: The target IP address. - * - * @param targetIpAddress the targetIpAddress value to set. - * @return the InMageRcmNicDetails object itself. - */ - public InMageRcmNicDetails withTargetIpAddress(String targetIpAddress) { - this.targetIpAddress = targetIpAddress; - return this; - } - - /** - * Get the targetIpAddressType property: The target IP address type. - * - * @return the targetIpAddressType value. - */ - public EthernetAddressType targetIpAddressType() { - return this.targetIpAddressType; - } - - /** - * Set the targetIpAddressType property: The target IP address type. - * - * @param targetIpAddressType the targetIpAddressType value to set. - * @return the InMageRcmNicDetails object itself. - */ - public InMageRcmNicDetails withTargetIpAddressType(EthernetAddressType targetIpAddressType) { - this.targetIpAddressType = targetIpAddressType; - return this; - } - - /** - * Get the targetSubnetName property: Target subnet name. - * - * @return the targetSubnetName value. - */ - public String targetSubnetName() { - return this.targetSubnetName; - } - - /** - * Set the targetSubnetName property: Target subnet name. - * - * @param targetSubnetName the targetSubnetName value to set. - * @return the InMageRcmNicDetails object itself. - */ - public InMageRcmNicDetails withTargetSubnetName(String targetSubnetName) { - this.targetSubnetName = targetSubnetName; - return this; - } - - /** - * Get the testSubnetName property: Test subnet name. - * - * @return the testSubnetName value. - */ - public String testSubnetName() { - return this.testSubnetName; - } - - /** - * Set the testSubnetName property: Test subnet name. - * - * @param testSubnetName the testSubnetName value to set. - * @return the InMageRcmNicDetails object itself. - */ - public InMageRcmNicDetails withTestSubnetName(String testSubnetName) { - this.testSubnetName = testSubnetName; - return this; - } - - /** - * Get the testIpAddress property: The test IP address. - * - * @return the testIpAddress value. - */ - public String testIpAddress() { - return this.testIpAddress; - } - - /** - * Set the testIpAddress property: The test IP address. - * - * @param testIpAddress the testIpAddress value to set. - * @return the InMageRcmNicDetails object itself. - */ - public InMageRcmNicDetails withTestIpAddress(String testIpAddress) { - this.testIpAddress = testIpAddress; - return this; - } - - /** - * Get the testIpAddressType property: The test IP address type. - * - * @return the testIpAddressType value. - */ - public EthernetAddressType testIpAddressType() { - return this.testIpAddressType; - } - - /** - * Set the testIpAddressType property: The test IP address type. - * - * @param testIpAddressType the testIpAddressType value to set. - * @return the InMageRcmNicDetails object itself. - */ - public InMageRcmNicDetails withTestIpAddressType(EthernetAddressType testIpAddressType) { - this.testIpAddressType = testIpAddressType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("isPrimaryNic", this.isPrimaryNic); - jsonWriter.writeStringField("isSelectedForFailover", this.isSelectedForFailover); - jsonWriter.writeStringField("targetIPAddress", this.targetIpAddress); - jsonWriter.writeStringField("targetIPAddressType", - this.targetIpAddressType == null ? null : this.targetIpAddressType.toString()); - jsonWriter.writeStringField("targetSubnetName", this.targetSubnetName); - jsonWriter.writeStringField("testSubnetName", this.testSubnetName); - jsonWriter.writeStringField("testIPAddress", this.testIpAddress); - jsonWriter.writeStringField("testIPAddressType", - this.testIpAddressType == null ? null : this.testIpAddressType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmNicDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmNicDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmNicDetails. - */ - public static InMageRcmNicDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmNicDetails deserializedInMageRcmNicDetails = new InMageRcmNicDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nicId".equals(fieldName)) { - deserializedInMageRcmNicDetails.nicId = reader.getString(); - } else if ("isPrimaryNic".equals(fieldName)) { - deserializedInMageRcmNicDetails.isPrimaryNic = reader.getString(); - } else if ("isSelectedForFailover".equals(fieldName)) { - deserializedInMageRcmNicDetails.isSelectedForFailover = reader.getString(); - } else if ("sourceIPAddress".equals(fieldName)) { - deserializedInMageRcmNicDetails.sourceIpAddress = reader.getString(); - } else if ("sourceIPAddressType".equals(fieldName)) { - deserializedInMageRcmNicDetails.sourceIpAddressType - = EthernetAddressType.fromString(reader.getString()); - } else if ("sourceNetworkId".equals(fieldName)) { - deserializedInMageRcmNicDetails.sourceNetworkId = reader.getString(); - } else if ("sourceSubnetName".equals(fieldName)) { - deserializedInMageRcmNicDetails.sourceSubnetName = reader.getString(); - } else if ("targetIPAddress".equals(fieldName)) { - deserializedInMageRcmNicDetails.targetIpAddress = reader.getString(); - } else if ("targetIPAddressType".equals(fieldName)) { - deserializedInMageRcmNicDetails.targetIpAddressType - = EthernetAddressType.fromString(reader.getString()); - } else if ("targetSubnetName".equals(fieldName)) { - deserializedInMageRcmNicDetails.targetSubnetName = reader.getString(); - } else if ("testSubnetName".equals(fieldName)) { - deserializedInMageRcmNicDetails.testSubnetName = reader.getString(); - } else if ("testIPAddress".equals(fieldName)) { - deserializedInMageRcmNicDetails.testIpAddress = reader.getString(); - } else if ("testIPAddressType".equals(fieldName)) { - deserializedInMageRcmNicDetails.testIpAddressType - = EthernetAddressType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmNicDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmNicInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmNicInput.java deleted file mode 100644 index 576faa20fddf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmNicInput.java +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm NIC input. - */ -@Fluent -public final class InMageRcmNicInput implements JsonSerializable { - /* - * The NIC Id. - */ - private String nicId; - - /* - * A value indicating whether this is the primary NIC. - */ - private String isPrimaryNic; - - /* - * A value indicating whether this NIC is selected for failover. - */ - private String isSelectedForFailover; - - /* - * Target subnet name. - */ - private String targetSubnetName; - - /* - * The target static IP address. - */ - private String targetStaticIpAddress; - - /* - * The test subnet name. - */ - private String testSubnetName; - - /* - * The test static IP address. - */ - private String testStaticIpAddress; - - /** - * Creates an instance of InMageRcmNicInput class. - */ - public InMageRcmNicInput() { - } - - /** - * Get the nicId property: The NIC Id. - * - * @return the nicId value. - */ - public String nicId() { - return this.nicId; - } - - /** - * Set the nicId property: The NIC Id. - * - * @param nicId the nicId value to set. - * @return the InMageRcmNicInput object itself. - */ - public InMageRcmNicInput withNicId(String nicId) { - this.nicId = nicId; - return this; - } - - /** - * Get the isPrimaryNic property: A value indicating whether this is the primary NIC. - * - * @return the isPrimaryNic value. - */ - public String isPrimaryNic() { - return this.isPrimaryNic; - } - - /** - * Set the isPrimaryNic property: A value indicating whether this is the primary NIC. - * - * @param isPrimaryNic the isPrimaryNic value to set. - * @return the InMageRcmNicInput object itself. - */ - public InMageRcmNicInput withIsPrimaryNic(String isPrimaryNic) { - this.isPrimaryNic = isPrimaryNic; - return this; - } - - /** - * Get the isSelectedForFailover property: A value indicating whether this NIC is selected for failover. - * - * @return the isSelectedForFailover value. - */ - public String isSelectedForFailover() { - return this.isSelectedForFailover; - } - - /** - * Set the isSelectedForFailover property: A value indicating whether this NIC is selected for failover. - * - * @param isSelectedForFailover the isSelectedForFailover value to set. - * @return the InMageRcmNicInput object itself. - */ - public InMageRcmNicInput withIsSelectedForFailover(String isSelectedForFailover) { - this.isSelectedForFailover = isSelectedForFailover; - return this; - } - - /** - * Get the targetSubnetName property: Target subnet name. - * - * @return the targetSubnetName value. - */ - public String targetSubnetName() { - return this.targetSubnetName; - } - - /** - * Set the targetSubnetName property: Target subnet name. - * - * @param targetSubnetName the targetSubnetName value to set. - * @return the InMageRcmNicInput object itself. - */ - public InMageRcmNicInput withTargetSubnetName(String targetSubnetName) { - this.targetSubnetName = targetSubnetName; - return this; - } - - /** - * Get the targetStaticIpAddress property: The target static IP address. - * - * @return the targetStaticIpAddress value. - */ - public String targetStaticIpAddress() { - return this.targetStaticIpAddress; - } - - /** - * Set the targetStaticIpAddress property: The target static IP address. - * - * @param targetStaticIpAddress the targetStaticIpAddress value to set. - * @return the InMageRcmNicInput object itself. - */ - public InMageRcmNicInput withTargetStaticIpAddress(String targetStaticIpAddress) { - this.targetStaticIpAddress = targetStaticIpAddress; - return this; - } - - /** - * Get the testSubnetName property: The test subnet name. - * - * @return the testSubnetName value. - */ - public String testSubnetName() { - return this.testSubnetName; - } - - /** - * Set the testSubnetName property: The test subnet name. - * - * @param testSubnetName the testSubnetName value to set. - * @return the InMageRcmNicInput object itself. - */ - public InMageRcmNicInput withTestSubnetName(String testSubnetName) { - this.testSubnetName = testSubnetName; - return this; - } - - /** - * Get the testStaticIpAddress property: The test static IP address. - * - * @return the testStaticIpAddress value. - */ - public String testStaticIpAddress() { - return this.testStaticIpAddress; - } - - /** - * Set the testStaticIpAddress property: The test static IP address. - * - * @param testStaticIpAddress the testStaticIpAddress value to set. - * @return the InMageRcmNicInput object itself. - */ - public InMageRcmNicInput withTestStaticIpAddress(String testStaticIpAddress) { - this.testStaticIpAddress = testStaticIpAddress; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nicId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property nicId in model InMageRcmNicInput")); - } - if (isPrimaryNic() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property isPrimaryNic in model InMageRcmNicInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageRcmNicInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nicId", this.nicId); - jsonWriter.writeStringField("isPrimaryNic", this.isPrimaryNic); - jsonWriter.writeStringField("isSelectedForFailover", this.isSelectedForFailover); - jsonWriter.writeStringField("targetSubnetName", this.targetSubnetName); - jsonWriter.writeStringField("targetStaticIPAddress", this.targetStaticIpAddress); - jsonWriter.writeStringField("testSubnetName", this.testSubnetName); - jsonWriter.writeStringField("testStaticIPAddress", this.testStaticIpAddress); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmNicInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmNicInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageRcmNicInput. - */ - public static InMageRcmNicInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmNicInput deserializedInMageRcmNicInput = new InMageRcmNicInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nicId".equals(fieldName)) { - deserializedInMageRcmNicInput.nicId = reader.getString(); - } else if ("isPrimaryNic".equals(fieldName)) { - deserializedInMageRcmNicInput.isPrimaryNic = reader.getString(); - } else if ("isSelectedForFailover".equals(fieldName)) { - deserializedInMageRcmNicInput.isSelectedForFailover = reader.getString(); - } else if ("targetSubnetName".equals(fieldName)) { - deserializedInMageRcmNicInput.targetSubnetName = reader.getString(); - } else if ("targetStaticIPAddress".equals(fieldName)) { - deserializedInMageRcmNicInput.targetStaticIpAddress = reader.getString(); - } else if ("testSubnetName".equals(fieldName)) { - deserializedInMageRcmNicInput.testSubnetName = reader.getString(); - } else if ("testStaticIPAddress".equals(fieldName)) { - deserializedInMageRcmNicInput.testStaticIpAddress = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmNicInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmPolicyCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmPolicyCreationInput.java deleted file mode 100644 index 37ae5df30a7a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmPolicyCreationInput.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm policy creation input. - */ -@Fluent -public final class InMageRcmPolicyCreationInput extends PolicyProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageRcm"; - - /* - * The duration in minutes until which the recovery points need to be stored. - */ - private Integer recoveryPointHistoryInMinutes; - - /* - * The crash consistent snapshot frequency (in minutes). - */ - private Integer crashConsistentFrequencyInMinutes; - - /* - * The app consistent snapshot frequency (in minutes). - */ - private Integer appConsistentFrequencyInMinutes; - - /* - * A value indicating whether multi-VM sync has to be enabled. - */ - private String enableMultiVmSync; - - /** - * Creates an instance of InMageRcmPolicyCreationInput class. - */ - public InMageRcmPolicyCreationInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointHistoryInMinutes property: The duration in minutes until which the recovery points need to - * be stored. - * - * @return the recoveryPointHistoryInMinutes value. - */ - public Integer recoveryPointHistoryInMinutes() { - return this.recoveryPointHistoryInMinutes; - } - - /** - * Set the recoveryPointHistoryInMinutes property: The duration in minutes until which the recovery points need to - * be stored. - * - * @param recoveryPointHistoryInMinutes the recoveryPointHistoryInMinutes value to set. - * @return the InMageRcmPolicyCreationInput object itself. - */ - public InMageRcmPolicyCreationInput withRecoveryPointHistoryInMinutes(Integer recoveryPointHistoryInMinutes) { - this.recoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; - return this; - } - - /** - * Get the crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency (in minutes). - * - * @return the crashConsistentFrequencyInMinutes value. - */ - public Integer crashConsistentFrequencyInMinutes() { - return this.crashConsistentFrequencyInMinutes; - } - - /** - * Set the crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency (in minutes). - * - * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set. - * @return the InMageRcmPolicyCreationInput object itself. - */ - public InMageRcmPolicyCreationInput - withCrashConsistentFrequencyInMinutes(Integer crashConsistentFrequencyInMinutes) { - this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - return this; - } - - /** - * Get the appConsistentFrequencyInMinutes property: The app consistent snapshot frequency (in minutes). - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: The app consistent snapshot frequency (in minutes). - * - * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set. - * @return the InMageRcmPolicyCreationInput object itself. - */ - public InMageRcmPolicyCreationInput withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { - this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - return this; - } - - /** - * Get the enableMultiVmSync property: A value indicating whether multi-VM sync has to be enabled. - * - * @return the enableMultiVmSync value. - */ - public String enableMultiVmSync() { - return this.enableMultiVmSync; - } - - /** - * Set the enableMultiVmSync property: A value indicating whether multi-VM sync has to be enabled. - * - * @param enableMultiVmSync the enableMultiVmSync value to set. - * @return the InMageRcmPolicyCreationInput object itself. - */ - public InMageRcmPolicyCreationInput withEnableMultiVmSync(String enableMultiVmSync) { - this.enableMultiVmSync = enableMultiVmSync; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPointHistoryInMinutes", this.recoveryPointHistoryInMinutes); - jsonWriter.writeNumberField("crashConsistentFrequencyInMinutes", this.crashConsistentFrequencyInMinutes); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - jsonWriter.writeStringField("enableMultiVmSync", this.enableMultiVmSync); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmPolicyCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmPolicyCreationInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmPolicyCreationInput. - */ - public static InMageRcmPolicyCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmPolicyCreationInput deserializedInMageRcmPolicyCreationInput = new InMageRcmPolicyCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmPolicyCreationInput.instanceType = reader.getString(); - } else if ("recoveryPointHistoryInMinutes".equals(fieldName)) { - deserializedInMageRcmPolicyCreationInput.recoveryPointHistoryInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("crashConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageRcmPolicyCreationInput.crashConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageRcmPolicyCreationInput.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("enableMultiVmSync".equals(fieldName)) { - deserializedInMageRcmPolicyCreationInput.enableMultiVmSync = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmPolicyCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmPolicyDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmPolicyDetails.java deleted file mode 100644 index 87b946b37462..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmPolicyDetails.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm specific policy details. - */ -@Fluent -public final class InMageRcmPolicyDetails extends PolicyProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "InMageRcm"; - - /* - * The duration in minutes until which the recovery points need to be stored. - */ - private Integer recoveryPointHistoryInMinutes; - - /* - * The app consistent snapshot frequency in minutes. - */ - private Integer appConsistentFrequencyInMinutes; - - /* - * The crash consistent snapshot frequency in minutes. - */ - private Integer crashConsistentFrequencyInMinutes; - - /* - * A value indicating whether multi-VM sync has to be enabled. - */ - private String enableMultiVmSync; - - /** - * Creates an instance of InMageRcmPolicyDetails class. - */ - public InMageRcmPolicyDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointHistoryInMinutes property: The duration in minutes until which the recovery points need to - * be stored. - * - * @return the recoveryPointHistoryInMinutes value. - */ - public Integer recoveryPointHistoryInMinutes() { - return this.recoveryPointHistoryInMinutes; - } - - /** - * Set the recoveryPointHistoryInMinutes property: The duration in minutes until which the recovery points need to - * be stored. - * - * @param recoveryPointHistoryInMinutes the recoveryPointHistoryInMinutes value to set. - * @return the InMageRcmPolicyDetails object itself. - */ - public InMageRcmPolicyDetails withRecoveryPointHistoryInMinutes(Integer recoveryPointHistoryInMinutes) { - this.recoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; - return this; - } - - /** - * Get the appConsistentFrequencyInMinutes property: The app consistent snapshot frequency in minutes. - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: The app consistent snapshot frequency in minutes. - * - * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set. - * @return the InMageRcmPolicyDetails object itself. - */ - public InMageRcmPolicyDetails withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { - this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - return this; - } - - /** - * Get the crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency in minutes. - * - * @return the crashConsistentFrequencyInMinutes value. - */ - public Integer crashConsistentFrequencyInMinutes() { - return this.crashConsistentFrequencyInMinutes; - } - - /** - * Set the crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency in minutes. - * - * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set. - * @return the InMageRcmPolicyDetails object itself. - */ - public InMageRcmPolicyDetails withCrashConsistentFrequencyInMinutes(Integer crashConsistentFrequencyInMinutes) { - this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - return this; - } - - /** - * Get the enableMultiVmSync property: A value indicating whether multi-VM sync has to be enabled. - * - * @return the enableMultiVmSync value. - */ - public String enableMultiVmSync() { - return this.enableMultiVmSync; - } - - /** - * Set the enableMultiVmSync property: A value indicating whether multi-VM sync has to be enabled. - * - * @param enableMultiVmSync the enableMultiVmSync value to set. - * @return the InMageRcmPolicyDetails object itself. - */ - public InMageRcmPolicyDetails withEnableMultiVmSync(String enableMultiVmSync) { - this.enableMultiVmSync = enableMultiVmSync; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPointHistoryInMinutes", this.recoveryPointHistoryInMinutes); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - jsonWriter.writeNumberField("crashConsistentFrequencyInMinutes", this.crashConsistentFrequencyInMinutes); - jsonWriter.writeStringField("enableMultiVmSync", this.enableMultiVmSync); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmPolicyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmPolicyDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmPolicyDetails. - */ - public static InMageRcmPolicyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmPolicyDetails deserializedInMageRcmPolicyDetails = new InMageRcmPolicyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmPolicyDetails.instanceType = reader.getString(); - } else if ("recoveryPointHistoryInMinutes".equals(fieldName)) { - deserializedInMageRcmPolicyDetails.recoveryPointHistoryInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageRcmPolicyDetails.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("crashConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedInMageRcmPolicyDetails.crashConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("enableMultiVmSync".equals(fieldName)) { - deserializedInMageRcmPolicyDetails.enableMultiVmSync = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmPolicyDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmProtectedDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmProtectedDiskDetails.java deleted file mode 100644 index 93c2155ed1b9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmProtectedDiskDetails.java +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm protected disk details. - */ -@Fluent -public final class InMageRcmProtectedDiskDetails implements JsonSerializable { - /* - * The disk Id. - */ - private String diskId; - - /* - * The disk name. - */ - private String diskName; - - /* - * A value indicating whether the disk is the OS disk. - */ - private String isOSDisk; - - /* - * The disk capacity in bytes. - */ - private Long capacityInBytes; - - /* - * The log storage account ARM Id. - */ - private String logStorageAccountId; - - /* - * The DiskEncryptionSet ARM Id. - */ - private String diskEncryptionSetId; - - /* - * The ARM Id of the seed managed disk. - */ - private String seedManagedDiskId; - - /* - * The uri of the seed blob. - */ - private String seedBlobUri; - - /* - * The ARM Id of the target managed disk. - */ - private String targetManagedDiskId; - - /* - * The disk type. - */ - private DiskAccountType diskType; - - /* - * The data pending in log data store in MB. - */ - private Double dataPendingInLogDataStoreInMB; - - /* - * The data pending at source agent in MB. - */ - private Double dataPendingAtSourceAgentInMB; - - /* - * A value indicating whether initial replication is complete or not. - */ - private String isInitialReplicationComplete; - - /* - * The initial replication details. - */ - private InMageRcmSyncDetails irDetails; - - /* - * The resync details. - */ - private InMageRcmSyncDetails resyncDetails; - - /** - * Creates an instance of InMageRcmProtectedDiskDetails class. - */ - public InMageRcmProtectedDiskDetails() { - } - - /** - * Get the diskId property: The disk Id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Get the diskName property: The disk name. - * - * @return the diskName value. - */ - public String diskName() { - return this.diskName; - } - - /** - * Get the isOSDisk property: A value indicating whether the disk is the OS disk. - * - * @return the isOSDisk value. - */ - public String isOSDisk() { - return this.isOSDisk; - } - - /** - * Get the capacityInBytes property: The disk capacity in bytes. - * - * @return the capacityInBytes value. - */ - public Long capacityInBytes() { - return this.capacityInBytes; - } - - /** - * Get the logStorageAccountId property: The log storage account ARM Id. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Get the diskEncryptionSetId property: The DiskEncryptionSet ARM Id. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Get the seedManagedDiskId property: The ARM Id of the seed managed disk. - * - * @return the seedManagedDiskId value. - */ - public String seedManagedDiskId() { - return this.seedManagedDiskId; - } - - /** - * Get the seedBlobUri property: The uri of the seed blob. - * - * @return the seedBlobUri value. - */ - public String seedBlobUri() { - return this.seedBlobUri; - } - - /** - * Get the targetManagedDiskId property: The ARM Id of the target managed disk. - * - * @return the targetManagedDiskId value. - */ - public String targetManagedDiskId() { - return this.targetManagedDiskId; - } - - /** - * Get the diskType property: The disk type. - * - * @return the diskType value. - */ - public DiskAccountType diskType() { - return this.diskType; - } - - /** - * Set the diskType property: The disk type. - * - * @param diskType the diskType value to set. - * @return the InMageRcmProtectedDiskDetails object itself. - */ - public InMageRcmProtectedDiskDetails withDiskType(DiskAccountType diskType) { - this.diskType = diskType; - return this; - } - - /** - * Get the dataPendingInLogDataStoreInMB property: The data pending in log data store in MB. - * - * @return the dataPendingInLogDataStoreInMB value. - */ - public Double dataPendingInLogDataStoreInMB() { - return this.dataPendingInLogDataStoreInMB; - } - - /** - * Get the dataPendingAtSourceAgentInMB property: The data pending at source agent in MB. - * - * @return the dataPendingAtSourceAgentInMB value. - */ - public Double dataPendingAtSourceAgentInMB() { - return this.dataPendingAtSourceAgentInMB; - } - - /** - * Get the isInitialReplicationComplete property: A value indicating whether initial replication is complete or not. - * - * @return the isInitialReplicationComplete value. - */ - public String isInitialReplicationComplete() { - return this.isInitialReplicationComplete; - } - - /** - * Get the irDetails property: The initial replication details. - * - * @return the irDetails value. - */ - public InMageRcmSyncDetails irDetails() { - return this.irDetails; - } - - /** - * Set the irDetails property: The initial replication details. - * - * @param irDetails the irDetails value to set. - * @return the InMageRcmProtectedDiskDetails object itself. - */ - public InMageRcmProtectedDiskDetails withIrDetails(InMageRcmSyncDetails irDetails) { - this.irDetails = irDetails; - return this; - } - - /** - * Get the resyncDetails property: The resync details. - * - * @return the resyncDetails value. - */ - public InMageRcmSyncDetails resyncDetails() { - return this.resyncDetails; - } - - /** - * Set the resyncDetails property: The resync details. - * - * @param resyncDetails the resyncDetails value to set. - * @return the InMageRcmProtectedDiskDetails object itself. - */ - public InMageRcmProtectedDiskDetails withResyncDetails(InMageRcmSyncDetails resyncDetails) { - this.resyncDetails = resyncDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (irDetails() != null) { - irDetails().validate(); - } - if (resyncDetails() != null) { - resyncDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskType", this.diskType == null ? null : this.diskType.toString()); - jsonWriter.writeJsonField("irDetails", this.irDetails); - jsonWriter.writeJsonField("resyncDetails", this.resyncDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmProtectedDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmProtectedDiskDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmProtectedDiskDetails. - */ - public static InMageRcmProtectedDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmProtectedDiskDetails deserializedInMageRcmProtectedDiskDetails - = new InMageRcmProtectedDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.diskId = reader.getString(); - } else if ("diskName".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.diskName = reader.getString(); - } else if ("isOSDisk".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.isOSDisk = reader.getString(); - } else if ("capacityInBytes".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.capacityInBytes = reader.getNullable(JsonReader::getLong); - } else if ("logStorageAccountId".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.logStorageAccountId = reader.getString(); - } else if ("diskEncryptionSetId".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.diskEncryptionSetId = reader.getString(); - } else if ("seedManagedDiskId".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.seedManagedDiskId = reader.getString(); - } else if ("seedBlobUri".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.seedBlobUri = reader.getString(); - } else if ("targetManagedDiskId".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.targetManagedDiskId = reader.getString(); - } else if ("diskType".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.diskType = DiskAccountType.fromString(reader.getString()); - } else if ("dataPendingInLogDataStoreInMB".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.dataPendingInLogDataStoreInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("dataPendingAtSourceAgentInMB".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.dataPendingAtSourceAgentInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("isInitialReplicationComplete".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.isInitialReplicationComplete = reader.getString(); - } else if ("irDetails".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.irDetails = InMageRcmSyncDetails.fromJson(reader); - } else if ("resyncDetails".equals(fieldName)) { - deserializedInMageRcmProtectedDiskDetails.resyncDetails = InMageRcmSyncDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmProtectedDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmProtectionContainerMappingDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmProtectionContainerMappingDetails.java deleted file mode 100644 index 1c7045330ec6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmProtectionContainerMappingDetails.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm provider specific container mapping details. - */ -@Immutable -public final class InMageRcmProtectionContainerMappingDetails - extends ProtectionContainerMappingProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "InMageRcm"; - - /* - * A value indicating whether the flag for enable agent auto upgrade. - */ - private String enableAgentAutoUpgrade; - - /** - * Creates an instance of InMageRcmProtectionContainerMappingDetails class. - */ - public InMageRcmProtectionContainerMappingDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the enableAgentAutoUpgrade property: A value indicating whether the flag for enable agent auto upgrade. - * - * @return the enableAgentAutoUpgrade value. - */ - public String enableAgentAutoUpgrade() { - return this.enableAgentAutoUpgrade; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmProtectionContainerMappingDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmProtectionContainerMappingDetails if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmProtectionContainerMappingDetails. - */ - public static InMageRcmProtectionContainerMappingDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmProtectionContainerMappingDetails deserializedInMageRcmProtectionContainerMappingDetails - = new InMageRcmProtectionContainerMappingDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmProtectionContainerMappingDetails.instanceType = reader.getString(); - } else if ("enableAgentAutoUpgrade".equals(fieldName)) { - deserializedInMageRcmProtectionContainerMappingDetails.enableAgentAutoUpgrade = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmProtectionContainerMappingDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmRecoveryPointDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmRecoveryPointDetails.java deleted file mode 100644 index d0596033f922..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmRecoveryPointDetails.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm provider specific recovery point details. - */ -@Immutable -public final class InMageRcmRecoveryPointDetails extends ProviderSpecificRecoveryPointDetails { - /* - * Gets the provider type. - */ - private String instanceType = "InMageRcm"; - - /* - * A value indicating whether the recovery point is multi VM consistent. - */ - private String isMultiVmSyncPoint; - - /** - * Creates an instance of InMageRcmRecoveryPointDetails class. - */ - public InMageRcmRecoveryPointDetails() { - } - - /** - * Get the instanceType property: Gets the provider type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the isMultiVmSyncPoint property: A value indicating whether the recovery point is multi VM consistent. - * - * @return the isMultiVmSyncPoint value. - */ - public String isMultiVmSyncPoint() { - return this.isMultiVmSyncPoint; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmRecoveryPointDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmRecoveryPointDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmRecoveryPointDetails. - */ - public static InMageRcmRecoveryPointDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmRecoveryPointDetails deserializedInMageRcmRecoveryPointDetails - = new InMageRcmRecoveryPointDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmRecoveryPointDetails.instanceType = reader.getString(); - } else if ("isMultiVmSyncPoint".equals(fieldName)) { - deserializedInMageRcmRecoveryPointDetails.isMultiVmSyncPoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmRecoveryPointDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmReplicationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmReplicationDetails.java deleted file mode 100644 index c51a8f6338e8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmReplicationDetails.java +++ /dev/null @@ -1,1183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * InMageRcm provider specific details. - */ -@Fluent -public final class InMageRcmReplicationDetails extends ReplicationProviderSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "InMageRcm"; - - /* - * The virtual machine internal identifier. - */ - private String internalIdentifier; - - /* - * The ARM Id of the discovered VM. - */ - private String fabricDiscoveryMachineId; - - /* - * The multi VM group name. - */ - private String multiVmGroupName; - - /* - * The type of the discovered VM. - */ - private String discoveryType; - - /* - * The process server Id. - */ - private String processServerId; - - /* - * The processor core count. - */ - private Integer processorCoreCount; - - /* - * The allocated memory in MB. - */ - private Double allocatedMemoryInMB; - - /* - * The process server name. - */ - private String processServerName; - - /* - * The run-as account Id. - */ - private String runAsAccountId; - - /* - * The type of the OS on the VM. - */ - private String osType; - - /* - * The firmware type. - */ - private String firmwareType; - - /* - * The IP address of the primary network interface. - */ - private String primaryNicIpAddress; - - /* - * The target generation. - */ - private String targetGeneration; - - /* - * License Type of the VM to be used. - */ - private String licenseType; - - /* - * The replication storage account ARM Id. This is applicable only for the blob based replication test hook. - */ - private String storageAccountId; - - /* - * Target VM name. - */ - private String targetVmName; - - /* - * The target VM size. - */ - private String targetVmSize; - - /* - * The target resource group Id. - */ - private String targetResourceGroupId; - - /* - * The target location. - */ - private String targetLocation; - - /* - * The target availability set Id. - */ - private String targetAvailabilitySetId; - - /* - * The target availability zone. - */ - private String targetAvailabilityZone; - - /* - * The target proximity placement group Id. - */ - private String targetProximityPlacementGroupId; - - /* - * The target boot diagnostics storage account ARM Id. - */ - private String targetBootDiagnosticsStorageAccountId; - - /* - * The target network Id. - */ - private String targetNetworkId; - - /* - * The test network Id. - */ - private String testNetworkId; - - /* - * The recovery point Id to which the VM was failed over. - */ - private String failoverRecoveryPointId; - - /* - * The last recovery point received time. - */ - private OffsetDateTime lastRecoveryPointReceived; - - /* - * The last recovery point objective value. - */ - private Long lastRpoInSeconds; - - /* - * The last recovery point objective calculated time. - */ - private OffsetDateTime lastRpoCalculatedTime; - - /* - * The last recovery point Id. - */ - private String lastRecoveryPointId; - - /* - * The initial replication progress percentage. This is calculated based on total bytes processed for all disks in - * the source VM. - */ - private Integer initialReplicationProgressPercentage; - - /* - * The initial replication processed bytes. This includes sum of total bytes transferred and matched bytes on all - * selected disks in source VM. - */ - private Long initialReplicationProcessedBytes; - - /* - * The initial replication transferred bytes from source VM to azure for all selected disks on source VM. - */ - private Long initialReplicationTransferredBytes; - - /* - * The initial replication progress health. - */ - private VmReplicationProgressHealth initialReplicationProgressHealth; - - /* - * The resync progress percentage. This is calculated based on total bytes processed for all disks in the source VM. - */ - private Integer resyncProgressPercentage; - - /* - * The resync processed bytes. This includes sum of total bytes transferred and matched bytes on all selected disks - * in source VM. - */ - private Long resyncProcessedBytes; - - /* - * The resync transferred bytes from source VM to azure for all selected disks on source VM. - */ - private Long resyncTransferredBytes; - - /* - * The resync progress health. - */ - private VmReplicationProgressHealth resyncProgressHealth; - - /* - * A value indicating whether resync is required. - */ - private String resyncRequired; - - /* - * The resync state. - */ - private ResyncState resyncState; - - /* - * The agent auto upgrade state. - */ - private MobilityAgentUpgradeState agentUpgradeState; - - /* - * The last agent upgrade type. - */ - private String lastAgentUpgradeType; - - /* - * The agent upgrade job Id. - */ - private String agentUpgradeJobId; - - /* - * The agent version to which last agent upgrade was attempted. - */ - private String agentUpgradeAttemptToVersion; - - /* - * The list of protected disks. - */ - private List protectedDisks; - - /* - * A value indicating whether last agent upgrade was successful or not. - */ - private String isLastUpgradeSuccessful; - - /* - * A value indicating whether agent registration was successful after failover. - */ - private Boolean isAgentRegistrationSuccessfulAfterFailover; - - /* - * The mobility agent information. - */ - private InMageRcmMobilityAgentDetails mobilityAgentDetails; - - /* - * The last agent upgrade error information. - */ - private List lastAgentUpgradeErrorDetails; - - /* - * The agent upgrade blocking error information. - */ - private List agentUpgradeBlockingErrorDetails; - - /* - * The network details. - */ - private List vmNics; - - /* - * The discovered VM details. - */ - private InMageRcmDiscoveredProtectedVmDetails discoveredVmDetails; - - /** - * Creates an instance of InMageRcmReplicationDetails class. - */ - public InMageRcmReplicationDetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the internalIdentifier property: The virtual machine internal identifier. - * - * @return the internalIdentifier value. - */ - public String internalIdentifier() { - return this.internalIdentifier; - } - - /** - * Get the fabricDiscoveryMachineId property: The ARM Id of the discovered VM. - * - * @return the fabricDiscoveryMachineId value. - */ - public String fabricDiscoveryMachineId() { - return this.fabricDiscoveryMachineId; - } - - /** - * Get the multiVmGroupName property: The multi VM group name. - * - * @return the multiVmGroupName value. - */ - public String multiVmGroupName() { - return this.multiVmGroupName; - } - - /** - * Get the discoveryType property: The type of the discovered VM. - * - * @return the discoveryType value. - */ - public String discoveryType() { - return this.discoveryType; - } - - /** - * Get the processServerId property: The process server Id. - * - * @return the processServerId value. - */ - public String processServerId() { - return this.processServerId; - } - - /** - * Get the processorCoreCount property: The processor core count. - * - * @return the processorCoreCount value. - */ - public Integer processorCoreCount() { - return this.processorCoreCount; - } - - /** - * Get the allocatedMemoryInMB property: The allocated memory in MB. - * - * @return the allocatedMemoryInMB value. - */ - public Double allocatedMemoryInMB() { - return this.allocatedMemoryInMB; - } - - /** - * Get the processServerName property: The process server name. - * - * @return the processServerName value. - */ - public String processServerName() { - return this.processServerName; - } - - /** - * Get the runAsAccountId property: The run-as account Id. - * - * @return the runAsAccountId value. - */ - public String runAsAccountId() { - return this.runAsAccountId; - } - - /** - * Get the osType property: The type of the OS on the VM. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Get the firmwareType property: The firmware type. - * - * @return the firmwareType value. - */ - public String firmwareType() { - return this.firmwareType; - } - - /** - * Get the primaryNicIpAddress property: The IP address of the primary network interface. - * - * @return the primaryNicIpAddress value. - */ - public String primaryNicIpAddress() { - return this.primaryNicIpAddress; - } - - /** - * Get the targetGeneration property: The target generation. - * - * @return the targetGeneration value. - */ - public String targetGeneration() { - return this.targetGeneration; - } - - /** - * Get the licenseType property: License Type of the VM to be used. - * - * @return the licenseType value. - */ - public String licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: License Type of the VM to be used. - * - * @param licenseType the licenseType value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withLicenseType(String licenseType) { - this.licenseType = licenseType; - return this; - } - - /** - * Get the storageAccountId property: The replication storage account ARM Id. This is applicable only for the blob - * based replication test hook. - * - * @return the storageAccountId value. - */ - public String storageAccountId() { - return this.storageAccountId; - } - - /** - * Get the targetVmName property: Target VM name. - * - * @return the targetVmName value. - */ - public String targetVmName() { - return this.targetVmName; - } - - /** - * Set the targetVmName property: Target VM name. - * - * @param targetVmName the targetVmName value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withTargetVmName(String targetVmName) { - this.targetVmName = targetVmName; - return this; - } - - /** - * Get the targetVmSize property: The target VM size. - * - * @return the targetVmSize value. - */ - public String targetVmSize() { - return this.targetVmSize; - } - - /** - * Set the targetVmSize property: The target VM size. - * - * @param targetVmSize the targetVmSize value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withTargetVmSize(String targetVmSize) { - this.targetVmSize = targetVmSize; - return this; - } - - /** - * Get the targetResourceGroupId property: The target resource group Id. - * - * @return the targetResourceGroupId value. - */ - public String targetResourceGroupId() { - return this.targetResourceGroupId; - } - - /** - * Set the targetResourceGroupId property: The target resource group Id. - * - * @param targetResourceGroupId the targetResourceGroupId value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withTargetResourceGroupId(String targetResourceGroupId) { - this.targetResourceGroupId = targetResourceGroupId; - return this; - } - - /** - * Get the targetLocation property: The target location. - * - * @return the targetLocation value. - */ - public String targetLocation() { - return this.targetLocation; - } - - /** - * Set the targetLocation property: The target location. - * - * @param targetLocation the targetLocation value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withTargetLocation(String targetLocation) { - this.targetLocation = targetLocation; - return this; - } - - /** - * Get the targetAvailabilitySetId property: The target availability set Id. - * - * @return the targetAvailabilitySetId value. - */ - public String targetAvailabilitySetId() { - return this.targetAvailabilitySetId; - } - - /** - * Set the targetAvailabilitySetId property: The target availability set Id. - * - * @param targetAvailabilitySetId the targetAvailabilitySetId value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withTargetAvailabilitySetId(String targetAvailabilitySetId) { - this.targetAvailabilitySetId = targetAvailabilitySetId; - return this; - } - - /** - * Get the targetAvailabilityZone property: The target availability zone. - * - * @return the targetAvailabilityZone value. - */ - public String targetAvailabilityZone() { - return this.targetAvailabilityZone; - } - - /** - * Set the targetAvailabilityZone property: The target availability zone. - * - * @param targetAvailabilityZone the targetAvailabilityZone value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withTargetAvailabilityZone(String targetAvailabilityZone) { - this.targetAvailabilityZone = targetAvailabilityZone; - return this; - } - - /** - * Get the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @return the targetProximityPlacementGroupId value. - */ - public String targetProximityPlacementGroupId() { - return this.targetProximityPlacementGroupId; - } - - /** - * Set the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) { - this.targetProximityPlacementGroupId = targetProximityPlacementGroupId; - return this; - } - - /** - * Get the targetBootDiagnosticsStorageAccountId property: The target boot diagnostics storage account ARM Id. - * - * @return the targetBootDiagnosticsStorageAccountId value. - */ - public String targetBootDiagnosticsStorageAccountId() { - return this.targetBootDiagnosticsStorageAccountId; - } - - /** - * Set the targetBootDiagnosticsStorageAccountId property: The target boot diagnostics storage account ARM Id. - * - * @param targetBootDiagnosticsStorageAccountId the targetBootDiagnosticsStorageAccountId value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails - withTargetBootDiagnosticsStorageAccountId(String targetBootDiagnosticsStorageAccountId) { - this.targetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; - return this; - } - - /** - * Get the targetNetworkId property: The target network Id. - * - * @return the targetNetworkId value. - */ - public String targetNetworkId() { - return this.targetNetworkId; - } - - /** - * Set the targetNetworkId property: The target network Id. - * - * @param targetNetworkId the targetNetworkId value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withTargetNetworkId(String targetNetworkId) { - this.targetNetworkId = targetNetworkId; - return this; - } - - /** - * Get the testNetworkId property: The test network Id. - * - * @return the testNetworkId value. - */ - public String testNetworkId() { - return this.testNetworkId; - } - - /** - * Set the testNetworkId property: The test network Id. - * - * @param testNetworkId the testNetworkId value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withTestNetworkId(String testNetworkId) { - this.testNetworkId = testNetworkId; - return this; - } - - /** - * Get the failoverRecoveryPointId property: The recovery point Id to which the VM was failed over. - * - * @return the failoverRecoveryPointId value. - */ - public String failoverRecoveryPointId() { - return this.failoverRecoveryPointId; - } - - /** - * Get the lastRecoveryPointReceived property: The last recovery point received time. - * - * @return the lastRecoveryPointReceived value. - */ - public OffsetDateTime lastRecoveryPointReceived() { - return this.lastRecoveryPointReceived; - } - - /** - * Get the lastRpoInSeconds property: The last recovery point objective value. - * - * @return the lastRpoInSeconds value. - */ - public Long lastRpoInSeconds() { - return this.lastRpoInSeconds; - } - - /** - * Get the lastRpoCalculatedTime property: The last recovery point objective calculated time. - * - * @return the lastRpoCalculatedTime value. - */ - public OffsetDateTime lastRpoCalculatedTime() { - return this.lastRpoCalculatedTime; - } - - /** - * Get the lastRecoveryPointId property: The last recovery point Id. - * - * @return the lastRecoveryPointId value. - */ - public String lastRecoveryPointId() { - return this.lastRecoveryPointId; - } - - /** - * Get the initialReplicationProgressPercentage property: The initial replication progress percentage. This is - * calculated based on total bytes processed for all disks in the source VM. - * - * @return the initialReplicationProgressPercentage value. - */ - public Integer initialReplicationProgressPercentage() { - return this.initialReplicationProgressPercentage; - } - - /** - * Get the initialReplicationProcessedBytes property: The initial replication processed bytes. This includes sum of - * total bytes transferred and matched bytes on all selected disks in source VM. - * - * @return the initialReplicationProcessedBytes value. - */ - public Long initialReplicationProcessedBytes() { - return this.initialReplicationProcessedBytes; - } - - /** - * Get the initialReplicationTransferredBytes property: The initial replication transferred bytes from source VM to - * azure for all selected disks on source VM. - * - * @return the initialReplicationTransferredBytes value. - */ - public Long initialReplicationTransferredBytes() { - return this.initialReplicationTransferredBytes; - } - - /** - * Get the initialReplicationProgressHealth property: The initial replication progress health. - * - * @return the initialReplicationProgressHealth value. - */ - public VmReplicationProgressHealth initialReplicationProgressHealth() { - return this.initialReplicationProgressHealth; - } - - /** - * Get the resyncProgressPercentage property: The resync progress percentage. This is calculated based on total - * bytes processed for all disks in the source VM. - * - * @return the resyncProgressPercentage value. - */ - public Integer resyncProgressPercentage() { - return this.resyncProgressPercentage; - } - - /** - * Get the resyncProcessedBytes property: The resync processed bytes. This includes sum of total bytes transferred - * and matched bytes on all selected disks in source VM. - * - * @return the resyncProcessedBytes value. - */ - public Long resyncProcessedBytes() { - return this.resyncProcessedBytes; - } - - /** - * Get the resyncTransferredBytes property: The resync transferred bytes from source VM to azure for all selected - * disks on source VM. - * - * @return the resyncTransferredBytes value. - */ - public Long resyncTransferredBytes() { - return this.resyncTransferredBytes; - } - - /** - * Get the resyncProgressHealth property: The resync progress health. - * - * @return the resyncProgressHealth value. - */ - public VmReplicationProgressHealth resyncProgressHealth() { - return this.resyncProgressHealth; - } - - /** - * Get the resyncRequired property: A value indicating whether resync is required. - * - * @return the resyncRequired value. - */ - public String resyncRequired() { - return this.resyncRequired; - } - - /** - * Get the resyncState property: The resync state. - * - * @return the resyncState value. - */ - public ResyncState resyncState() { - return this.resyncState; - } - - /** - * Get the agentUpgradeState property: The agent auto upgrade state. - * - * @return the agentUpgradeState value. - */ - public MobilityAgentUpgradeState agentUpgradeState() { - return this.agentUpgradeState; - } - - /** - * Get the lastAgentUpgradeType property: The last agent upgrade type. - * - * @return the lastAgentUpgradeType value. - */ - public String lastAgentUpgradeType() { - return this.lastAgentUpgradeType; - } - - /** - * Get the agentUpgradeJobId property: The agent upgrade job Id. - * - * @return the agentUpgradeJobId value. - */ - public String agentUpgradeJobId() { - return this.agentUpgradeJobId; - } - - /** - * Get the agentUpgradeAttemptToVersion property: The agent version to which last agent upgrade was attempted. - * - * @return the agentUpgradeAttemptToVersion value. - */ - public String agentUpgradeAttemptToVersion() { - return this.agentUpgradeAttemptToVersion; - } - - /** - * Get the protectedDisks property: The list of protected disks. - * - * @return the protectedDisks value. - */ - public List protectedDisks() { - return this.protectedDisks; - } - - /** - * Set the protectedDisks property: The list of protected disks. - * - * @param protectedDisks the protectedDisks value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withProtectedDisks(List protectedDisks) { - this.protectedDisks = protectedDisks; - return this; - } - - /** - * Get the isLastUpgradeSuccessful property: A value indicating whether last agent upgrade was successful or not. - * - * @return the isLastUpgradeSuccessful value. - */ - public String isLastUpgradeSuccessful() { - return this.isLastUpgradeSuccessful; - } - - /** - * Get the isAgentRegistrationSuccessfulAfterFailover property: A value indicating whether agent registration was - * successful after failover. - * - * @return the isAgentRegistrationSuccessfulAfterFailover value. - */ - public Boolean isAgentRegistrationSuccessfulAfterFailover() { - return this.isAgentRegistrationSuccessfulAfterFailover; - } - - /** - * Get the mobilityAgentDetails property: The mobility agent information. - * - * @return the mobilityAgentDetails value. - */ - public InMageRcmMobilityAgentDetails mobilityAgentDetails() { - return this.mobilityAgentDetails; - } - - /** - * Set the mobilityAgentDetails property: The mobility agent information. - * - * @param mobilityAgentDetails the mobilityAgentDetails value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withMobilityAgentDetails(InMageRcmMobilityAgentDetails mobilityAgentDetails) { - this.mobilityAgentDetails = mobilityAgentDetails; - return this; - } - - /** - * Get the lastAgentUpgradeErrorDetails property: The last agent upgrade error information. - * - * @return the lastAgentUpgradeErrorDetails value. - */ - public List lastAgentUpgradeErrorDetails() { - return this.lastAgentUpgradeErrorDetails; - } - - /** - * Set the lastAgentUpgradeErrorDetails property: The last agent upgrade error information. - * - * @param lastAgentUpgradeErrorDetails the lastAgentUpgradeErrorDetails value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails - withLastAgentUpgradeErrorDetails(List lastAgentUpgradeErrorDetails) { - this.lastAgentUpgradeErrorDetails = lastAgentUpgradeErrorDetails; - return this; - } - - /** - * Get the agentUpgradeBlockingErrorDetails property: The agent upgrade blocking error information. - * - * @return the agentUpgradeBlockingErrorDetails value. - */ - public List agentUpgradeBlockingErrorDetails() { - return this.agentUpgradeBlockingErrorDetails; - } - - /** - * Set the agentUpgradeBlockingErrorDetails property: The agent upgrade blocking error information. - * - * @param agentUpgradeBlockingErrorDetails the agentUpgradeBlockingErrorDetails value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withAgentUpgradeBlockingErrorDetails( - List agentUpgradeBlockingErrorDetails) { - this.agentUpgradeBlockingErrorDetails = agentUpgradeBlockingErrorDetails; - return this; - } - - /** - * Get the vmNics property: The network details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: The network details. - * - * @param vmNics the vmNics value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails withVmNics(List vmNics) { - this.vmNics = vmNics; - return this; - } - - /** - * Get the discoveredVmDetails property: The discovered VM details. - * - * @return the discoveredVmDetails value. - */ - public InMageRcmDiscoveredProtectedVmDetails discoveredVmDetails() { - return this.discoveredVmDetails; - } - - /** - * Set the discoveredVmDetails property: The discovered VM details. - * - * @param discoveredVmDetails the discoveredVmDetails value to set. - * @return the InMageRcmReplicationDetails object itself. - */ - public InMageRcmReplicationDetails - withDiscoveredVmDetails(InMageRcmDiscoveredProtectedVmDetails discoveredVmDetails) { - this.discoveredVmDetails = discoveredVmDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (protectedDisks() != null) { - protectedDisks().forEach(e -> e.validate()); - } - if (mobilityAgentDetails() != null) { - mobilityAgentDetails().validate(); - } - if (lastAgentUpgradeErrorDetails() != null) { - lastAgentUpgradeErrorDetails().forEach(e -> e.validate()); - } - if (agentUpgradeBlockingErrorDetails() != null) { - agentUpgradeBlockingErrorDetails().forEach(e -> e.validate()); - } - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - if (discoveredVmDetails() != null) { - discoveredVmDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("licenseType", this.licenseType); - jsonWriter.writeStringField("targetVmName", this.targetVmName); - jsonWriter.writeStringField("targetVmSize", this.targetVmSize); - jsonWriter.writeStringField("targetResourceGroupId", this.targetResourceGroupId); - jsonWriter.writeStringField("targetLocation", this.targetLocation); - jsonWriter.writeStringField("targetAvailabilitySetId", this.targetAvailabilitySetId); - jsonWriter.writeStringField("targetAvailabilityZone", this.targetAvailabilityZone); - jsonWriter.writeStringField("targetProximityPlacementGroupId", this.targetProximityPlacementGroupId); - jsonWriter.writeStringField("targetBootDiagnosticsStorageAccountId", - this.targetBootDiagnosticsStorageAccountId); - jsonWriter.writeStringField("targetNetworkId", this.targetNetworkId); - jsonWriter.writeStringField("testNetworkId", this.testNetworkId); - jsonWriter.writeArrayField("protectedDisks", this.protectedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("mobilityAgentDetails", this.mobilityAgentDetails); - jsonWriter.writeArrayField("lastAgentUpgradeErrorDetails", this.lastAgentUpgradeErrorDetails, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("agentUpgradeBlockingErrorDetails", this.agentUpgradeBlockingErrorDetails, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("discoveredVmDetails", this.discoveredVmDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmReplicationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmReplicationDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmReplicationDetails. - */ - public static InMageRcmReplicationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmReplicationDetails deserializedInMageRcmReplicationDetails = new InMageRcmReplicationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.instanceType = reader.getString(); - } else if ("internalIdentifier".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.internalIdentifier = reader.getString(); - } else if ("fabricDiscoveryMachineId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.fabricDiscoveryMachineId = reader.getString(); - } else if ("multiVmGroupName".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.multiVmGroupName = reader.getString(); - } else if ("discoveryType".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.discoveryType = reader.getString(); - } else if ("processServerId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.processServerId = reader.getString(); - } else if ("processorCoreCount".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.processorCoreCount = reader.getNullable(JsonReader::getInt); - } else if ("allocatedMemoryInMB".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.allocatedMemoryInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("processServerName".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.processServerName = reader.getString(); - } else if ("runAsAccountId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.runAsAccountId = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.osType = reader.getString(); - } else if ("firmwareType".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.firmwareType = reader.getString(); - } else if ("primaryNicIpAddress".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.primaryNicIpAddress = reader.getString(); - } else if ("targetGeneration".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.targetGeneration = reader.getString(); - } else if ("licenseType".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.licenseType = reader.getString(); - } else if ("storageAccountId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.storageAccountId = reader.getString(); - } else if ("targetVmName".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.targetVmName = reader.getString(); - } else if ("targetVmSize".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.targetVmSize = reader.getString(); - } else if ("targetResourceGroupId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.targetResourceGroupId = reader.getString(); - } else if ("targetLocation".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.targetLocation = reader.getString(); - } else if ("targetAvailabilitySetId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.targetAvailabilitySetId = reader.getString(); - } else if ("targetAvailabilityZone".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.targetAvailabilityZone = reader.getString(); - } else if ("targetProximityPlacementGroupId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.targetProximityPlacementGroupId = reader.getString(); - } else if ("targetBootDiagnosticsStorageAccountId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.targetBootDiagnosticsStorageAccountId = reader.getString(); - } else if ("targetNetworkId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.targetNetworkId = reader.getString(); - } else if ("testNetworkId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.testNetworkId = reader.getString(); - } else if ("failoverRecoveryPointId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.failoverRecoveryPointId = reader.getString(); - } else if ("lastRecoveryPointReceived".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.lastRecoveryPointReceived = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastRpoInSeconds".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.lastRpoInSeconds = reader.getNullable(JsonReader::getLong); - } else if ("lastRpoCalculatedTime".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.lastRpoCalculatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastRecoveryPointId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.lastRecoveryPointId = reader.getString(); - } else if ("initialReplicationProgressPercentage".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.initialReplicationProgressPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("initialReplicationProcessedBytes".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.initialReplicationProcessedBytes - = reader.getNullable(JsonReader::getLong); - } else if ("initialReplicationTransferredBytes".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.initialReplicationTransferredBytes - = reader.getNullable(JsonReader::getLong); - } else if ("initialReplicationProgressHealth".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.initialReplicationProgressHealth - = VmReplicationProgressHealth.fromString(reader.getString()); - } else if ("resyncProgressPercentage".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.resyncProgressPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("resyncProcessedBytes".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.resyncProcessedBytes - = reader.getNullable(JsonReader::getLong); - } else if ("resyncTransferredBytes".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.resyncTransferredBytes - = reader.getNullable(JsonReader::getLong); - } else if ("resyncProgressHealth".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.resyncProgressHealth - = VmReplicationProgressHealth.fromString(reader.getString()); - } else if ("resyncRequired".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.resyncRequired = reader.getString(); - } else if ("resyncState".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.resyncState = ResyncState.fromString(reader.getString()); - } else if ("agentUpgradeState".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.agentUpgradeState - = MobilityAgentUpgradeState.fromString(reader.getString()); - } else if ("lastAgentUpgradeType".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.lastAgentUpgradeType = reader.getString(); - } else if ("agentUpgradeJobId".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.agentUpgradeJobId = reader.getString(); - } else if ("agentUpgradeAttemptToVersion".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.agentUpgradeAttemptToVersion = reader.getString(); - } else if ("protectedDisks".equals(fieldName)) { - List protectedDisks - = reader.readArray(reader1 -> InMageRcmProtectedDiskDetails.fromJson(reader1)); - deserializedInMageRcmReplicationDetails.protectedDisks = protectedDisks; - } else if ("isLastUpgradeSuccessful".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.isLastUpgradeSuccessful = reader.getString(); - } else if ("isAgentRegistrationSuccessfulAfterFailover".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.isAgentRegistrationSuccessfulAfterFailover - = reader.getNullable(JsonReader::getBoolean); - } else if ("mobilityAgentDetails".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.mobilityAgentDetails - = InMageRcmMobilityAgentDetails.fromJson(reader); - } else if ("lastAgentUpgradeErrorDetails".equals(fieldName)) { - List lastAgentUpgradeErrorDetails - = reader.readArray(reader1 -> InMageRcmLastAgentUpgradeErrorDetails.fromJson(reader1)); - deserializedInMageRcmReplicationDetails.lastAgentUpgradeErrorDetails = lastAgentUpgradeErrorDetails; - } else if ("agentUpgradeBlockingErrorDetails".equals(fieldName)) { - List agentUpgradeBlockingErrorDetails - = reader.readArray(reader1 -> InMageRcmAgentUpgradeBlockingErrorDetails.fromJson(reader1)); - deserializedInMageRcmReplicationDetails.agentUpgradeBlockingErrorDetails - = agentUpgradeBlockingErrorDetails; - } else if ("vmNics".equals(fieldName)) { - List vmNics - = reader.readArray(reader1 -> InMageRcmNicDetails.fromJson(reader1)); - deserializedInMageRcmReplicationDetails.vmNics = vmNics; - } else if ("discoveredVmDetails".equals(fieldName)) { - deserializedInMageRcmReplicationDetails.discoveredVmDetails - = InMageRcmDiscoveredProtectedVmDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmReplicationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmReprotectInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmReprotectInput.java deleted file mode 100644 index 66d1298bc109..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmReprotectInput.java +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm specific provider input. - */ -@Fluent -public final class InMageRcmReprotectInput extends ReverseReplicationProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageRcm"; - - /* - * The reprotect agent Id. - */ - private String reprotectAgentId; - - /* - * The target datastore name. - */ - private String datastoreName; - - /* - * The log storage account ARM Id. - */ - private String logStorageAccountId; - - /* - * The Policy Id. - */ - private String policyId; - - /** - * Creates an instance of InMageRcmReprotectInput class. - */ - public InMageRcmReprotectInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the reprotectAgentId property: The reprotect agent Id. - * - * @return the reprotectAgentId value. - */ - public String reprotectAgentId() { - return this.reprotectAgentId; - } - - /** - * Set the reprotectAgentId property: The reprotect agent Id. - * - * @param reprotectAgentId the reprotectAgentId value to set. - * @return the InMageRcmReprotectInput object itself. - */ - public InMageRcmReprotectInput withReprotectAgentId(String reprotectAgentId) { - this.reprotectAgentId = reprotectAgentId; - return this; - } - - /** - * Get the datastoreName property: The target datastore name. - * - * @return the datastoreName value. - */ - public String datastoreName() { - return this.datastoreName; - } - - /** - * Set the datastoreName property: The target datastore name. - * - * @param datastoreName the datastoreName value to set. - * @return the InMageRcmReprotectInput object itself. - */ - public InMageRcmReprotectInput withDatastoreName(String datastoreName) { - this.datastoreName = datastoreName; - return this; - } - - /** - * Get the logStorageAccountId property: The log storage account ARM Id. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Set the logStorageAccountId property: The log storage account ARM Id. - * - * @param logStorageAccountId the logStorageAccountId value to set. - * @return the InMageRcmReprotectInput object itself. - */ - public InMageRcmReprotectInput withLogStorageAccountId(String logStorageAccountId) { - this.logStorageAccountId = logStorageAccountId; - return this; - } - - /** - * Get the policyId property: The Policy Id. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Set the policyId property: The Policy Id. - * - * @param policyId the policyId value to set. - * @return the InMageRcmReprotectInput object itself. - */ - public InMageRcmReprotectInput withPolicyId(String policyId) { - this.policyId = policyId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (reprotectAgentId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property reprotectAgentId in model InMageRcmReprotectInput")); - } - if (datastoreName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property datastoreName in model InMageRcmReprotectInput")); - } - if (logStorageAccountId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property logStorageAccountId in model InMageRcmReprotectInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageRcmReprotectInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("reprotectAgentId", this.reprotectAgentId); - jsonWriter.writeStringField("datastoreName", this.datastoreName); - jsonWriter.writeStringField("logStorageAccountId", this.logStorageAccountId); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("policyId", this.policyId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmReprotectInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmReprotectInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageRcmReprotectInput. - */ - public static InMageRcmReprotectInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmReprotectInput deserializedInMageRcmReprotectInput = new InMageRcmReprotectInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("reprotectAgentId".equals(fieldName)) { - deserializedInMageRcmReprotectInput.reprotectAgentId = reader.getString(); - } else if ("datastoreName".equals(fieldName)) { - deserializedInMageRcmReprotectInput.datastoreName = reader.getString(); - } else if ("logStorageAccountId".equals(fieldName)) { - deserializedInMageRcmReprotectInput.logStorageAccountId = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedInMageRcmReprotectInput.instanceType = reader.getString(); - } else if ("policyId".equals(fieldName)) { - deserializedInMageRcmReprotectInput.policyId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmReprotectInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmSyncDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmSyncDetails.java deleted file mode 100644 index e95863b23df1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmSyncDetails.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm disk level sync details. - */ -@Immutable -public final class InMageRcmSyncDetails implements JsonSerializable { - /* - * The progress health. - */ - private DiskReplicationProgressHealth progressHealth; - - /* - * The transferred bytes from source VM to azure for the disk. - */ - private Long transferredBytes; - - /* - * The bytes transferred in last 15 minutes from source VM to azure. - */ - private Long last15MinutesTransferredBytes; - - /* - * The time of the last data transfer from source VM to azure. - */ - private String lastDataTransferTimeUtc; - - /* - * The total processed bytes. This includes bytes that are transferred from source VM to azure and matched bytes. - */ - private Long processedBytes; - - /* - * The start time. - */ - private String startTime; - - /* - * The last refresh time. - */ - private String lastRefreshTime; - - /* - * Progress in percentage. Progress percentage is calculated based on processed bytes. - */ - private Integer progressPercentage; - - /** - * Creates an instance of InMageRcmSyncDetails class. - */ - public InMageRcmSyncDetails() { - } - - /** - * Get the progressHealth property: The progress health. - * - * @return the progressHealth value. - */ - public DiskReplicationProgressHealth progressHealth() { - return this.progressHealth; - } - - /** - * Get the transferredBytes property: The transferred bytes from source VM to azure for the disk. - * - * @return the transferredBytes value. - */ - public Long transferredBytes() { - return this.transferredBytes; - } - - /** - * Get the last15MinutesTransferredBytes property: The bytes transferred in last 15 minutes from source VM to azure. - * - * @return the last15MinutesTransferredBytes value. - */ - public Long last15MinutesTransferredBytes() { - return this.last15MinutesTransferredBytes; - } - - /** - * Get the lastDataTransferTimeUtc property: The time of the last data transfer from source VM to azure. - * - * @return the lastDataTransferTimeUtc value. - */ - public String lastDataTransferTimeUtc() { - return this.lastDataTransferTimeUtc; - } - - /** - * Get the processedBytes property: The total processed bytes. This includes bytes that are transferred from source - * VM to azure and matched bytes. - * - * @return the processedBytes value. - */ - public Long processedBytes() { - return this.processedBytes; - } - - /** - * Get the startTime property: The start time. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Get the lastRefreshTime property: The last refresh time. - * - * @return the lastRefreshTime value. - */ - public String lastRefreshTime() { - return this.lastRefreshTime; - } - - /** - * Get the progressPercentage property: Progress in percentage. Progress percentage is calculated based on processed - * bytes. - * - * @return the progressPercentage value. - */ - public Integer progressPercentage() { - return this.progressPercentage; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmSyncDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmSyncDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmSyncDetails. - */ - public static InMageRcmSyncDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmSyncDetails deserializedInMageRcmSyncDetails = new InMageRcmSyncDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("progressHealth".equals(fieldName)) { - deserializedInMageRcmSyncDetails.progressHealth - = DiskReplicationProgressHealth.fromString(reader.getString()); - } else if ("transferredBytes".equals(fieldName)) { - deserializedInMageRcmSyncDetails.transferredBytes = reader.getNullable(JsonReader::getLong); - } else if ("last15MinutesTransferredBytes".equals(fieldName)) { - deserializedInMageRcmSyncDetails.last15MinutesTransferredBytes - = reader.getNullable(JsonReader::getLong); - } else if ("lastDataTransferTimeUtc".equals(fieldName)) { - deserializedInMageRcmSyncDetails.lastDataTransferTimeUtc = reader.getString(); - } else if ("processedBytes".equals(fieldName)) { - deserializedInMageRcmSyncDetails.processedBytes = reader.getNullable(JsonReader::getLong); - } else if ("startTime".equals(fieldName)) { - deserializedInMageRcmSyncDetails.startTime = reader.getString(); - } else if ("lastRefreshTime".equals(fieldName)) { - deserializedInMageRcmSyncDetails.lastRefreshTime = reader.getString(); - } else if ("progressPercentage".equals(fieldName)) { - deserializedInMageRcmSyncDetails.progressPercentage = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmSyncDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmTestFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmTestFailoverInput.java deleted file mode 100644 index a70d5b3267de..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmTestFailoverInput.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm provider specific input for test failover. - */ -@Fluent -public final class InMageRcmTestFailoverInput extends TestFailoverProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageRcm"; - - /* - * The test network Id. - */ - private String networkId; - - /* - * The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery - * point, null should be passed. - */ - private String recoveryPointId; - - /** - * Creates an instance of InMageRcmTestFailoverInput class. - */ - public InMageRcmTestFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the networkId property: The test network Id. - * - * @return the networkId value. - */ - public String networkId() { - return this.networkId; - } - - /** - * Set the networkId property: The test network Id. - * - * @param networkId the networkId value to set. - * @return the InMageRcmTestFailoverInput object itself. - */ - public InMageRcmTestFailoverInput withNetworkId(String networkId) { - this.networkId = networkId; - return this; - } - - /** - * Get the recoveryPointId property: The recovery point id to be passed to test 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 recoveryPointId property: The recovery point id to be passed to test 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 InMageRcmTestFailoverInput object itself. - */ - public InMageRcmTestFailoverInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("networkId", this.networkId); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmTestFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmTestFailoverInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmTestFailoverInput. - */ - public static InMageRcmTestFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmTestFailoverInput deserializedInMageRcmTestFailoverInput = new InMageRcmTestFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmTestFailoverInput.instanceType = reader.getString(); - } else if ("networkId".equals(fieldName)) { - deserializedInMageRcmTestFailoverInput.networkId = reader.getString(); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedInMageRcmTestFailoverInput.recoveryPointId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmTestFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmUnplannedFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmUnplannedFailoverInput.java deleted file mode 100644 index 51536b9e08f8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmUnplannedFailoverInput.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm provider specific input for unplanned failover. - */ -@Fluent -public final class InMageRcmUnplannedFailoverInput extends UnplannedFailoverProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageRcm"; - - /* - * A value indicating whether VM is to be shutdown. - */ - private String performShutdown; - - /* - * The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, - * null should be passed. - */ - private String recoveryPointId; - - /** - * Creates an instance of InMageRcmUnplannedFailoverInput class. - */ - public InMageRcmUnplannedFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the performShutdown property: A value indicating whether VM is to be shutdown. - * - * @return the performShutdown value. - */ - public String performShutdown() { - return this.performShutdown; - } - - /** - * Set the performShutdown property: A value indicating whether VM is to be shutdown. - * - * @param performShutdown the performShutdown value to set. - * @return the InMageRcmUnplannedFailoverInput object itself. - */ - public InMageRcmUnplannedFailoverInput withPerformShutdown(String performShutdown) { - this.performShutdown = performShutdown; - return this; - } - - /** - * Get the recoveryPointId property: 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 recoveryPointId property: 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 InMageRcmUnplannedFailoverInput object itself. - */ - public InMageRcmUnplannedFailoverInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (performShutdown() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property performShutdown in model InMageRcmUnplannedFailoverInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageRcmUnplannedFailoverInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("performShutdown", this.performShutdown); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmUnplannedFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmUnplannedFailoverInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageRcmUnplannedFailoverInput. - */ - public static InMageRcmUnplannedFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmUnplannedFailoverInput deserializedInMageRcmUnplannedFailoverInput - = new InMageRcmUnplannedFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("performShutdown".equals(fieldName)) { - deserializedInMageRcmUnplannedFailoverInput.performShutdown = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedInMageRcmUnplannedFailoverInput.instanceType = reader.getString(); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedInMageRcmUnplannedFailoverInput.recoveryPointId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmUnplannedFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmUpdateApplianceForReplicationProtectedItemInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmUpdateApplianceForReplicationProtectedItemInput.java deleted file mode 100644 index 79bd57f89a37..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmUpdateApplianceForReplicationProtectedItemInput.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm provider specific input to update appliance for replication protected item. - */ -@Fluent -public final class InMageRcmUpdateApplianceForReplicationProtectedItemInput - extends UpdateReplicationProtectedItemProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMageRcm"; - - /* - * The run as account Id. - */ - private String runAsAccountId; - - /** - * Creates an instance of InMageRcmUpdateApplianceForReplicationProtectedItemInput class. - */ - public InMageRcmUpdateApplianceForReplicationProtectedItemInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the runAsAccountId property: The run as account Id. - * - * @return the runAsAccountId value. - */ - public String runAsAccountId() { - return this.runAsAccountId; - } - - /** - * Set the runAsAccountId property: The run as account Id. - * - * @param runAsAccountId the runAsAccountId value to set. - * @return the InMageRcmUpdateApplianceForReplicationProtectedItemInput object itself. - */ - public InMageRcmUpdateApplianceForReplicationProtectedItemInput withRunAsAccountId(String runAsAccountId) { - this.runAsAccountId = runAsAccountId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("runAsAccountId", this.runAsAccountId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmUpdateApplianceForReplicationProtectedItemInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmUpdateApplianceForReplicationProtectedItemInput if the JsonReader was pointing to - * an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * InMageRcmUpdateApplianceForReplicationProtectedItemInput. - */ - public static InMageRcmUpdateApplianceForReplicationProtectedItemInput fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmUpdateApplianceForReplicationProtectedItemInput deserializedInMageRcmUpdateApplianceForReplicationProtectedItemInput - = new InMageRcmUpdateApplianceForReplicationProtectedItemInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmUpdateApplianceForReplicationProtectedItemInput.instanceType - = reader.getString(); - } else if ("runAsAccountId".equals(fieldName)) { - deserializedInMageRcmUpdateApplianceForReplicationProtectedItemInput.runAsAccountId - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmUpdateApplianceForReplicationProtectedItemInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmUpdateContainerMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmUpdateContainerMappingInput.java deleted file mode 100644 index 911df08c5f93..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmUpdateContainerMappingInput.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * InMageRcm update protection container mapping. - */ -@Fluent -public final class InMageRcmUpdateContainerMappingInput extends ReplicationProviderSpecificUpdateContainerMappingInput { - /* - * The class type. - */ - private String instanceType = "InMageRcm"; - - /* - * A value indicating whether agent auto upgrade has to be enabled. - */ - private String enableAgentAutoUpgrade; - - /** - * Creates an instance of InMageRcmUpdateContainerMappingInput class. - */ - public InMageRcmUpdateContainerMappingInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the enableAgentAutoUpgrade property: A value indicating whether agent auto upgrade has to be enabled. - * - * @return the enableAgentAutoUpgrade value. - */ - public String enableAgentAutoUpgrade() { - return this.enableAgentAutoUpgrade; - } - - /** - * Set the enableAgentAutoUpgrade property: A value indicating whether agent auto upgrade has to be enabled. - * - * @param enableAgentAutoUpgrade the enableAgentAutoUpgrade value to set. - * @return the InMageRcmUpdateContainerMappingInput object itself. - */ - public InMageRcmUpdateContainerMappingInput withEnableAgentAutoUpgrade(String enableAgentAutoUpgrade) { - this.enableAgentAutoUpgrade = enableAgentAutoUpgrade; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (enableAgentAutoUpgrade() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property enableAgentAutoUpgrade in model InMageRcmUpdateContainerMappingInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageRcmUpdateContainerMappingInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("enableAgentAutoUpgrade", this.enableAgentAutoUpgrade); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmUpdateContainerMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmUpdateContainerMappingInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageRcmUpdateContainerMappingInput. - */ - public static InMageRcmUpdateContainerMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmUpdateContainerMappingInput deserializedInMageRcmUpdateContainerMappingInput - = new InMageRcmUpdateContainerMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enableAgentAutoUpgrade".equals(fieldName)) { - deserializedInMageRcmUpdateContainerMappingInput.enableAgentAutoUpgrade = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedInMageRcmUpdateContainerMappingInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmUpdateContainerMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmUpdateReplicationProtectedItemInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmUpdateReplicationProtectedItemInput.java deleted file mode 100644 index 603c3e37c646..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageRcmUpdateReplicationProtectedItemInput.java +++ /dev/null @@ -1,405 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * InMageRcm provider specific input to update replication protected item. - */ -@Fluent -public final class InMageRcmUpdateReplicationProtectedItemInput extends UpdateReplicationProtectedItemProviderInput { - /* - * The class type. - */ - private String instanceType = "InMageRcm"; - - /* - * The target VM name. - */ - private String targetVmName; - - /* - * The target VM size. - */ - private String targetVmSize; - - /* - * The target resource group ARM Id. - */ - private String targetResourceGroupId; - - /* - * The target availability set ARM Id. - */ - private String targetAvailabilitySetId; - - /* - * The target availability zone. - */ - private String targetAvailabilityZone; - - /* - * The target proximity placement group Id. - */ - private String targetProximityPlacementGroupId; - - /* - * The target boot diagnostics storage account ARM Id. - */ - private String targetBootDiagnosticsStorageAccountId; - - /* - * The target network ARM Id. - */ - private String targetNetworkId; - - /* - * The test network ARM Id. - */ - private String testNetworkId; - - /* - * The list of NIC details. - */ - private List vmNics; - - /* - * The license type. - */ - private LicenseType licenseType; - - /** - * Creates an instance of InMageRcmUpdateReplicationProtectedItemInput class. - */ - public InMageRcmUpdateReplicationProtectedItemInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the targetVmName property: The target VM name. - * - * @return the targetVmName value. - */ - public String targetVmName() { - return this.targetVmName; - } - - /** - * Set the targetVmName property: The target VM name. - * - * @param targetVmName the targetVmName value to set. - * @return the InMageRcmUpdateReplicationProtectedItemInput object itself. - */ - public InMageRcmUpdateReplicationProtectedItemInput withTargetVmName(String targetVmName) { - this.targetVmName = targetVmName; - return this; - } - - /** - * Get the targetVmSize property: The target VM size. - * - * @return the targetVmSize value. - */ - public String targetVmSize() { - return this.targetVmSize; - } - - /** - * Set the targetVmSize property: The target VM size. - * - * @param targetVmSize the targetVmSize value to set. - * @return the InMageRcmUpdateReplicationProtectedItemInput object itself. - */ - public InMageRcmUpdateReplicationProtectedItemInput withTargetVmSize(String targetVmSize) { - this.targetVmSize = targetVmSize; - return this; - } - - /** - * Get the targetResourceGroupId property: The target resource group ARM Id. - * - * @return the targetResourceGroupId value. - */ - public String targetResourceGroupId() { - return this.targetResourceGroupId; - } - - /** - * Set the targetResourceGroupId property: The target resource group ARM Id. - * - * @param targetResourceGroupId the targetResourceGroupId value to set. - * @return the InMageRcmUpdateReplicationProtectedItemInput object itself. - */ - public InMageRcmUpdateReplicationProtectedItemInput withTargetResourceGroupId(String targetResourceGroupId) { - this.targetResourceGroupId = targetResourceGroupId; - return this; - } - - /** - * Get the targetAvailabilitySetId property: The target availability set ARM Id. - * - * @return the targetAvailabilitySetId value. - */ - public String targetAvailabilitySetId() { - return this.targetAvailabilitySetId; - } - - /** - * Set the targetAvailabilitySetId property: The target availability set ARM Id. - * - * @param targetAvailabilitySetId the targetAvailabilitySetId value to set. - * @return the InMageRcmUpdateReplicationProtectedItemInput object itself. - */ - public InMageRcmUpdateReplicationProtectedItemInput withTargetAvailabilitySetId(String targetAvailabilitySetId) { - this.targetAvailabilitySetId = targetAvailabilitySetId; - return this; - } - - /** - * Get the targetAvailabilityZone property: The target availability zone. - * - * @return the targetAvailabilityZone value. - */ - public String targetAvailabilityZone() { - return this.targetAvailabilityZone; - } - - /** - * Set the targetAvailabilityZone property: The target availability zone. - * - * @param targetAvailabilityZone the targetAvailabilityZone value to set. - * @return the InMageRcmUpdateReplicationProtectedItemInput object itself. - */ - public InMageRcmUpdateReplicationProtectedItemInput withTargetAvailabilityZone(String targetAvailabilityZone) { - this.targetAvailabilityZone = targetAvailabilityZone; - return this; - } - - /** - * Get the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @return the targetProximityPlacementGroupId value. - */ - public String targetProximityPlacementGroupId() { - return this.targetProximityPlacementGroupId; - } - - /** - * Set the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set. - * @return the InMageRcmUpdateReplicationProtectedItemInput object itself. - */ - public InMageRcmUpdateReplicationProtectedItemInput - withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) { - this.targetProximityPlacementGroupId = targetProximityPlacementGroupId; - return this; - } - - /** - * Get the targetBootDiagnosticsStorageAccountId property: The target boot diagnostics storage account ARM Id. - * - * @return the targetBootDiagnosticsStorageAccountId value. - */ - public String targetBootDiagnosticsStorageAccountId() { - return this.targetBootDiagnosticsStorageAccountId; - } - - /** - * Set the targetBootDiagnosticsStorageAccountId property: The target boot diagnostics storage account ARM Id. - * - * @param targetBootDiagnosticsStorageAccountId the targetBootDiagnosticsStorageAccountId value to set. - * @return the InMageRcmUpdateReplicationProtectedItemInput object itself. - */ - public InMageRcmUpdateReplicationProtectedItemInput - withTargetBootDiagnosticsStorageAccountId(String targetBootDiagnosticsStorageAccountId) { - this.targetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; - return this; - } - - /** - * Get the targetNetworkId property: The target network ARM Id. - * - * @return the targetNetworkId value. - */ - public String targetNetworkId() { - return this.targetNetworkId; - } - - /** - * Set the targetNetworkId property: The target network ARM Id. - * - * @param targetNetworkId the targetNetworkId value to set. - * @return the InMageRcmUpdateReplicationProtectedItemInput object itself. - */ - public InMageRcmUpdateReplicationProtectedItemInput withTargetNetworkId(String targetNetworkId) { - this.targetNetworkId = targetNetworkId; - return this; - } - - /** - * Get the testNetworkId property: The test network ARM Id. - * - * @return the testNetworkId value. - */ - public String testNetworkId() { - return this.testNetworkId; - } - - /** - * Set the testNetworkId property: The test network ARM Id. - * - * @param testNetworkId the testNetworkId value to set. - * @return the InMageRcmUpdateReplicationProtectedItemInput object itself. - */ - public InMageRcmUpdateReplicationProtectedItemInput withTestNetworkId(String testNetworkId) { - this.testNetworkId = testNetworkId; - return this; - } - - /** - * Get the vmNics property: The list of NIC details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: The list of NIC details. - * - * @param vmNics the vmNics value to set. - * @return the InMageRcmUpdateReplicationProtectedItemInput object itself. - */ - public InMageRcmUpdateReplicationProtectedItemInput withVmNics(List vmNics) { - this.vmNics = vmNics; - return this; - } - - /** - * Get the licenseType property: The license type. - * - * @return the licenseType value. - */ - public LicenseType licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: The license type. - * - * @param licenseType the licenseType value to set. - * @return the InMageRcmUpdateReplicationProtectedItemInput object itself. - */ - public InMageRcmUpdateReplicationProtectedItemInput withLicenseType(LicenseType licenseType) { - this.licenseType = licenseType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("targetVmName", this.targetVmName); - jsonWriter.writeStringField("targetVmSize", this.targetVmSize); - jsonWriter.writeStringField("targetResourceGroupId", this.targetResourceGroupId); - jsonWriter.writeStringField("targetAvailabilitySetId", this.targetAvailabilitySetId); - jsonWriter.writeStringField("targetAvailabilityZone", this.targetAvailabilityZone); - jsonWriter.writeStringField("targetProximityPlacementGroupId", this.targetProximityPlacementGroupId); - jsonWriter.writeStringField("targetBootDiagnosticsStorageAccountId", - this.targetBootDiagnosticsStorageAccountId); - jsonWriter.writeStringField("targetNetworkId", this.targetNetworkId); - jsonWriter.writeStringField("testNetworkId", this.testNetworkId); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageRcmUpdateReplicationProtectedItemInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageRcmUpdateReplicationProtectedItemInput if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageRcmUpdateReplicationProtectedItemInput. - */ - public static InMageRcmUpdateReplicationProtectedItemInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageRcmUpdateReplicationProtectedItemInput deserializedInMageRcmUpdateReplicationProtectedItemInput - = new InMageRcmUpdateReplicationProtectedItemInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageRcmUpdateReplicationProtectedItemInput.instanceType = reader.getString(); - } else if ("targetVmName".equals(fieldName)) { - deserializedInMageRcmUpdateReplicationProtectedItemInput.targetVmName = reader.getString(); - } else if ("targetVmSize".equals(fieldName)) { - deserializedInMageRcmUpdateReplicationProtectedItemInput.targetVmSize = reader.getString(); - } else if ("targetResourceGroupId".equals(fieldName)) { - deserializedInMageRcmUpdateReplicationProtectedItemInput.targetResourceGroupId = reader.getString(); - } else if ("targetAvailabilitySetId".equals(fieldName)) { - deserializedInMageRcmUpdateReplicationProtectedItemInput.targetAvailabilitySetId - = reader.getString(); - } else if ("targetAvailabilityZone".equals(fieldName)) { - deserializedInMageRcmUpdateReplicationProtectedItemInput.targetAvailabilityZone - = reader.getString(); - } else if ("targetProximityPlacementGroupId".equals(fieldName)) { - deserializedInMageRcmUpdateReplicationProtectedItemInput.targetProximityPlacementGroupId - = reader.getString(); - } else if ("targetBootDiagnosticsStorageAccountId".equals(fieldName)) { - deserializedInMageRcmUpdateReplicationProtectedItemInput.targetBootDiagnosticsStorageAccountId - = reader.getString(); - } else if ("targetNetworkId".equals(fieldName)) { - deserializedInMageRcmUpdateReplicationProtectedItemInput.targetNetworkId = reader.getString(); - } else if ("testNetworkId".equals(fieldName)) { - deserializedInMageRcmUpdateReplicationProtectedItemInput.testNetworkId = reader.getString(); - } else if ("vmNics".equals(fieldName)) { - List vmNics = reader.readArray(reader1 -> InMageRcmNicInput.fromJson(reader1)); - deserializedInMageRcmUpdateReplicationProtectedItemInput.vmNics = vmNics; - } else if ("licenseType".equals(fieldName)) { - deserializedInMageRcmUpdateReplicationProtectedItemInput.licenseType - = LicenseType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageRcmUpdateReplicationProtectedItemInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageReplicationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageReplicationDetails.java deleted file mode 100644 index c36810e54f73..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageReplicationDetails.java +++ /dev/null @@ -1,1271 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * InMage provider specific settings. - */ -@Fluent -public final class InMageReplicationDetails extends ReplicationProviderSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "InMage"; - - /* - * 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. - */ - private String activeSiteType; - - /* - * The CPU count of the VM on the primary side. - */ - private Integer sourceVmCpuCount; - - /* - * The RAM size of the VM on the primary side. - */ - private Integer sourceVmRamSizeInMB; - - /* - * The OS details. - */ - private OSDiskDetails osDetails; - - /* - * The protection stage. - */ - private String protectionStage; - - /* - * The virtual machine Id. - */ - private String vmId; - - /* - * The protection state for the vm. - */ - private String vmProtectionState; - - /* - * The protection state description for the vm. - */ - private String vmProtectionStateDescription; - - /* - * The resync details of the machine. - */ - private InitialReplicationDetails resyncDetails; - - /* - * The retention window start time. - */ - private OffsetDateTime retentionWindowStart; - - /* - * The retention window end time. - */ - private OffsetDateTime retentionWindowEnd; - - /* - * The compressed data change rate in MB. - */ - private Double compressedDataRateInMB; - - /* - * The uncompressed data change rate in MB. - */ - private Double uncompressedDataRateInMB; - - /* - * The RPO in seconds. - */ - private Long rpoInSeconds; - - /* - * The list of protected disks. - */ - private List protectedDisks; - - /* - * The source IP address. - */ - private String ipAddress; - - /* - * The last heartbeat received from the source server. - */ - private OffsetDateTime lastHeartbeat; - - /* - * The process server Id. - */ - private String processServerId; - - /* - * The master target Id. - */ - private String masterTargetId; - - /* - * The collection of Consistency points. - */ - private Map consistencyPoints; - - /* - * A value indicating whether any disk is resized for this VM. - */ - private String diskResized; - - /* - * A value indicating whether the source server requires a restart after update. - */ - private String rebootAfterUpdateStatus; - - /* - * The multi vm group Id, if any. - */ - private String multiVmGroupId; - - /* - * The multi vm group name, if any. - */ - private String multiVmGroupName; - - /* - * A value indicating whether the multi vm sync is enabled or disabled. - */ - private String multiVmSyncStatus; - - /* - * The agent details. - */ - private InMageAgentDetails agentDetails; - - /* - * The vCenter infrastructure Id. - */ - private String vCenterInfrastructureId; - - /* - * The infrastructure VM Id. - */ - private String infrastructureVmId; - - /* - * The PE Network details. - */ - private List vmNics; - - /* - * A value indicating the discovery type of the machine. - */ - 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. - */ - private String azureStorageAccountId; - - /* - * The datastores of the on-premise machine Value can be list of strings that contain datastore names. - */ - private List datastores; - - /* - * The validation errors of the on-premise machine Value can be list of validation errors. - */ - private List validationErrors; - - /* - * The last RPO calculated time. - */ - private OffsetDateTime lastRpoCalculatedTime; - - /* - * The last update time received from on-prem components. - */ - private OffsetDateTime lastUpdateReceivedTime; - - /* - * The replica id of the protected item. - */ - private String replicaId; - - /* - * The OS Version of the protected item. - */ - private String osVersion; - - /* - * A value indicating whether additional IR stats are available or not. - */ - private Boolean isAdditionalStatsAvailable; - - /* - * The total transferred data in bytes. - */ - private Long totalDataTransferred; - - /* - * The progress health. - */ - private String totalProgressHealth; - - /** - * Creates an instance of InMageReplicationDetails class. - */ - public InMageReplicationDetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the activeSiteType property: 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 activeSiteType property: 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 sourceVmCpuCount property: The CPU count of the VM on the primary side. - * - * @return the sourceVmCpuCount value. - */ - public Integer sourceVmCpuCount() { - return this.sourceVmCpuCount; - } - - /** - * Set the sourceVmCpuCount property: 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 sourceVmRamSizeInMB property: The RAM size of the VM on the primary side. - * - * @return the sourceVmRamSizeInMB value. - */ - public Integer sourceVmRamSizeInMB() { - return this.sourceVmRamSizeInMB; - } - - /** - * Set the sourceVmRamSizeInMB property: 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 osDetails property: The OS details. - * - * @return the osDetails value. - */ - public OSDiskDetails osDetails() { - return this.osDetails; - } - - /** - * Set the osDetails property: 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 protectionStage property: The protection stage. - * - * @return the protectionStage value. - */ - public String protectionStage() { - return this.protectionStage; - } - - /** - * Set the protectionStage property: 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 vmId property: The virtual machine Id. - * - * @return the vmId value. - */ - public String vmId() { - return this.vmId; - } - - /** - * Set the vmId property: 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 vmProtectionState property: The protection state for the vm. - * - * @return the vmProtectionState value. - */ - public String vmProtectionState() { - return this.vmProtectionState; - } - - /** - * Set the vmProtectionState property: 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 vmProtectionStateDescription property: The protection state description for the vm. - * - * @return the vmProtectionStateDescription value. - */ - public String vmProtectionStateDescription() { - return this.vmProtectionStateDescription; - } - - /** - * Set the vmProtectionStateDescription property: 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 resyncDetails property: The resync details of the machine. - * - * @return the resyncDetails value. - */ - public InitialReplicationDetails resyncDetails() { - return this.resyncDetails; - } - - /** - * Set the resyncDetails property: 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 retentionWindowStart property: The retention window start time. - * - * @return the retentionWindowStart value. - */ - public OffsetDateTime retentionWindowStart() { - return this.retentionWindowStart; - } - - /** - * Set the retentionWindowStart property: The retention window start time. - * - * @param retentionWindowStart the retentionWindowStart value to set. - * @return the InMageReplicationDetails object itself. - */ - public InMageReplicationDetails withRetentionWindowStart(OffsetDateTime retentionWindowStart) { - this.retentionWindowStart = retentionWindowStart; - return this; - } - - /** - * Get the retentionWindowEnd property: The retention window end time. - * - * @return the retentionWindowEnd value. - */ - public OffsetDateTime retentionWindowEnd() { - return this.retentionWindowEnd; - } - - /** - * Set the retentionWindowEnd property: The retention window end time. - * - * @param retentionWindowEnd the retentionWindowEnd value to set. - * @return the InMageReplicationDetails object itself. - */ - public InMageReplicationDetails withRetentionWindowEnd(OffsetDateTime retentionWindowEnd) { - this.retentionWindowEnd = retentionWindowEnd; - return this; - } - - /** - * Get the compressedDataRateInMB property: The compressed data change rate in MB. - * - * @return the compressedDataRateInMB value. - */ - public Double compressedDataRateInMB() { - return this.compressedDataRateInMB; - } - - /** - * Set the compressedDataRateInMB property: 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 uncompressedDataRateInMB property: The uncompressed data change rate in MB. - * - * @return the uncompressedDataRateInMB value. - */ - public Double uncompressedDataRateInMB() { - return this.uncompressedDataRateInMB; - } - - /** - * Set the uncompressedDataRateInMB property: 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 rpoInSeconds property: The RPO in seconds. - * - * @return the rpoInSeconds value. - */ - public Long rpoInSeconds() { - return this.rpoInSeconds; - } - - /** - * Set the rpoInSeconds property: 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 protectedDisks property: The list of protected disks. - * - * @return the protectedDisks value. - */ - public List protectedDisks() { - return this.protectedDisks; - } - - /** - * Set the protectedDisks property: 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 ipAddress property: The source IP address. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: 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 lastHeartbeat property: The last heartbeat received from the source server. - * - * @return the lastHeartbeat value. - */ - public OffsetDateTime lastHeartbeat() { - return this.lastHeartbeat; - } - - /** - * Set the lastHeartbeat property: The last heartbeat received from the source server. - * - * @param lastHeartbeat the lastHeartbeat value to set. - * @return the InMageReplicationDetails object itself. - */ - public InMageReplicationDetails withLastHeartbeat(OffsetDateTime lastHeartbeat) { - this.lastHeartbeat = lastHeartbeat; - return this; - } - - /** - * Get the processServerId property: The process server Id. - * - * @return the processServerId value. - */ - public String processServerId() { - return this.processServerId; - } - - /** - * Set the processServerId property: 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 masterTargetId property: The master target Id. - * - * @return the masterTargetId value. - */ - public String masterTargetId() { - return this.masterTargetId; - } - - /** - * Set the masterTargetId property: 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 consistencyPoints property: The collection of Consistency points. - * - * @return the consistencyPoints value. - */ - public Map consistencyPoints() { - return this.consistencyPoints; - } - - /** - * Set the consistencyPoints property: 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 the diskResized property: A value indicating whether any disk is resized for this VM. - * - * @return the diskResized value. - */ - public String diskResized() { - return this.diskResized; - } - - /** - * Set the diskResized property: 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 the rebootAfterUpdateStatus property: A value indicating whether the source server requires a restart after - * update. - * - * @return the rebootAfterUpdateStatus value. - */ - public String rebootAfterUpdateStatus() { - return this.rebootAfterUpdateStatus; - } - - /** - * Set the rebootAfterUpdateStatus property: 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 multiVmGroupId property: The multi vm group Id, if any. - * - * @return the multiVmGroupId value. - */ - public String multiVmGroupId() { - return this.multiVmGroupId; - } - - /** - * Set the multiVmGroupId property: 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 multiVmGroupName property: The multi vm group name, if any. - * - * @return the multiVmGroupName value. - */ - public String multiVmGroupName() { - return this.multiVmGroupName; - } - - /** - * Set the multiVmGroupName property: 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 the multiVmSyncStatus property: A value indicating whether the multi vm sync is enabled or disabled. - * - * @return the multiVmSyncStatus value. - */ - public String multiVmSyncStatus() { - return this.multiVmSyncStatus; - } - - /** - * Set the multiVmSyncStatus property: 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 agentDetails property: The agent details. - * - * @return the agentDetails value. - */ - public InMageAgentDetails agentDetails() { - return this.agentDetails; - } - - /** - * Set the agentDetails property: 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 vCenterInfrastructureId property: The vCenter infrastructure Id. - * - * @return the vCenterInfrastructureId value. - */ - public String vCenterInfrastructureId() { - return this.vCenterInfrastructureId; - } - - /** - * Set the vCenterInfrastructureId property: 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 infrastructureVmId property: The infrastructure VM Id. - * - * @return the infrastructureVmId value. - */ - public String infrastructureVmId() { - return this.infrastructureVmId; - } - - /** - * Set the infrastructureVmId property: 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 vmNics property: The PE Network details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: 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 the discoveryType property: A value indicating the discovery type of the machine. - * - * @return the discoveryType value. - */ - public String discoveryType() { - return this.discoveryType; - } - - /** - * Set the discoveryType property: 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 the azureStorageAccountId property: 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 the azureStorageAccountId property: 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 property: 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 property: 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 validationErrors property: 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 validationErrors property: 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 lastRpoCalculatedTime property: The last RPO calculated time. - * - * @return the lastRpoCalculatedTime value. - */ - public OffsetDateTime lastRpoCalculatedTime() { - return this.lastRpoCalculatedTime; - } - - /** - * Set the lastRpoCalculatedTime property: The last RPO calculated time. - * - * @param lastRpoCalculatedTime the lastRpoCalculatedTime value to set. - * @return the InMageReplicationDetails object itself. - */ - public InMageReplicationDetails withLastRpoCalculatedTime(OffsetDateTime lastRpoCalculatedTime) { - this.lastRpoCalculatedTime = lastRpoCalculatedTime; - return this; - } - - /** - * Get the lastUpdateReceivedTime property: The last update time received from on-prem components. - * - * @return the lastUpdateReceivedTime value. - */ - public OffsetDateTime lastUpdateReceivedTime() { - return this.lastUpdateReceivedTime; - } - - /** - * Set the lastUpdateReceivedTime property: The last update time received from on-prem components. - * - * @param lastUpdateReceivedTime the lastUpdateReceivedTime value to set. - * @return the InMageReplicationDetails object itself. - */ - public InMageReplicationDetails withLastUpdateReceivedTime(OffsetDateTime lastUpdateReceivedTime) { - this.lastUpdateReceivedTime = lastUpdateReceivedTime; - return this; - } - - /** - * Get the replicaId property: The replica id of the protected item. - * - * @return the replicaId value. - */ - public String replicaId() { - return this.replicaId; - } - - /** - * Set the replicaId property: 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 osVersion property: The OS Version of the protected item. - * - * @return the osVersion value. - */ - public String osVersion() { - return this.osVersion; - } - - /** - * Set the osVersion property: 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; - } - - /** - * Get the isAdditionalStatsAvailable property: A value indicating whether additional IR stats are available or not. - * - * @return the isAdditionalStatsAvailable value. - */ - public Boolean isAdditionalStatsAvailable() { - return this.isAdditionalStatsAvailable; - } - - /** - * Set the isAdditionalStatsAvailable property: A value indicating whether additional IR stats are available or not. - * - * @param isAdditionalStatsAvailable the isAdditionalStatsAvailable value to set. - * @return the InMageReplicationDetails object itself. - */ - public InMageReplicationDetails withIsAdditionalStatsAvailable(Boolean isAdditionalStatsAvailable) { - this.isAdditionalStatsAvailable = isAdditionalStatsAvailable; - return this; - } - - /** - * Get the totalDataTransferred property: The total transferred data in bytes. - * - * @return the totalDataTransferred value. - */ - public Long totalDataTransferred() { - return this.totalDataTransferred; - } - - /** - * Set the totalDataTransferred property: The total transferred data in bytes. - * - * @param totalDataTransferred the totalDataTransferred value to set. - * @return the InMageReplicationDetails object itself. - */ - public InMageReplicationDetails withTotalDataTransferred(Long totalDataTransferred) { - this.totalDataTransferred = totalDataTransferred; - return this; - } - - /** - * Get the totalProgressHealth property: The progress health. - * - * @return the totalProgressHealth value. - */ - public String totalProgressHealth() { - return this.totalProgressHealth; - } - - /** - * Set the totalProgressHealth property: The progress health. - * - * @param totalProgressHealth the totalProgressHealth value to set. - * @return the InMageReplicationDetails object itself. - */ - public InMageReplicationDetails withTotalProgressHealth(String totalProgressHealth) { - this.totalProgressHealth = totalProgressHealth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (osDetails() != null) { - osDetails().validate(); - } - if (resyncDetails() != null) { - resyncDetails().validate(); - } - if (protectedDisks() != null) { - protectedDisks().forEach(e -> e.validate()); - } - if (agentDetails() != null) { - agentDetails().validate(); - } - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("activeSiteType", this.activeSiteType); - jsonWriter.writeNumberField("sourceVmCpuCount", this.sourceVmCpuCount); - jsonWriter.writeNumberField("sourceVmRamSizeInMB", this.sourceVmRamSizeInMB); - jsonWriter.writeJsonField("osDetails", this.osDetails); - jsonWriter.writeStringField("protectionStage", this.protectionStage); - jsonWriter.writeStringField("vmId", this.vmId); - jsonWriter.writeStringField("vmProtectionState", this.vmProtectionState); - jsonWriter.writeStringField("vmProtectionStateDescription", this.vmProtectionStateDescription); - jsonWriter.writeJsonField("resyncDetails", this.resyncDetails); - jsonWriter.writeStringField("retentionWindowStart", - this.retentionWindowStart == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.retentionWindowStart)); - jsonWriter.writeStringField("retentionWindowEnd", - this.retentionWindowEnd == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.retentionWindowEnd)); - jsonWriter.writeNumberField("compressedDataRateInMB", this.compressedDataRateInMB); - jsonWriter.writeNumberField("uncompressedDataRateInMB", this.uncompressedDataRateInMB); - jsonWriter.writeNumberField("rpoInSeconds", this.rpoInSeconds); - jsonWriter.writeArrayField("protectedDisks", this.protectedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("lastHeartbeat", - this.lastHeartbeat == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastHeartbeat)); - jsonWriter.writeStringField("processServerId", this.processServerId); - jsonWriter.writeStringField("masterTargetId", this.masterTargetId); - jsonWriter.writeMapField("consistencyPoints", this.consistencyPoints, (writer, element) -> writer - .writeString(element == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(element))); - jsonWriter.writeStringField("diskResized", this.diskResized); - jsonWriter.writeStringField("rebootAfterUpdateStatus", this.rebootAfterUpdateStatus); - jsonWriter.writeStringField("multiVmGroupId", this.multiVmGroupId); - jsonWriter.writeStringField("multiVmGroupName", this.multiVmGroupName); - jsonWriter.writeStringField("multiVmSyncStatus", this.multiVmSyncStatus); - jsonWriter.writeJsonField("agentDetails", this.agentDetails); - jsonWriter.writeStringField("vCenterInfrastructureId", this.vCenterInfrastructureId); - jsonWriter.writeStringField("infrastructureVmId", this.infrastructureVmId); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("discoveryType", this.discoveryType); - jsonWriter.writeStringField("azureStorageAccountId", this.azureStorageAccountId); - jsonWriter.writeArrayField("datastores", this.datastores, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("validationErrors", this.validationErrors, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("lastRpoCalculatedTime", - this.lastRpoCalculatedTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastRpoCalculatedTime)); - jsonWriter.writeStringField("lastUpdateReceivedTime", - this.lastUpdateReceivedTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastUpdateReceivedTime)); - jsonWriter.writeStringField("replicaId", this.replicaId); - jsonWriter.writeStringField("osVersion", this.osVersion); - jsonWriter.writeBooleanField("isAdditionalStatsAvailable", this.isAdditionalStatsAvailable); - jsonWriter.writeNumberField("totalDataTransferred", this.totalDataTransferred); - jsonWriter.writeStringField("totalProgressHealth", this.totalProgressHealth); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageReplicationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageReplicationDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageReplicationDetails. - */ - public static InMageReplicationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageReplicationDetails deserializedInMageReplicationDetails = new InMageReplicationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageReplicationDetails.instanceType = reader.getString(); - } else if ("activeSiteType".equals(fieldName)) { - deserializedInMageReplicationDetails.activeSiteType = reader.getString(); - } else if ("sourceVmCpuCount".equals(fieldName)) { - deserializedInMageReplicationDetails.sourceVmCpuCount = reader.getNullable(JsonReader::getInt); - } else if ("sourceVmRamSizeInMB".equals(fieldName)) { - deserializedInMageReplicationDetails.sourceVmRamSizeInMB = reader.getNullable(JsonReader::getInt); - } else if ("osDetails".equals(fieldName)) { - deserializedInMageReplicationDetails.osDetails = OSDiskDetails.fromJson(reader); - } else if ("protectionStage".equals(fieldName)) { - deserializedInMageReplicationDetails.protectionStage = reader.getString(); - } else if ("vmId".equals(fieldName)) { - deserializedInMageReplicationDetails.vmId = reader.getString(); - } else if ("vmProtectionState".equals(fieldName)) { - deserializedInMageReplicationDetails.vmProtectionState = reader.getString(); - } else if ("vmProtectionStateDescription".equals(fieldName)) { - deserializedInMageReplicationDetails.vmProtectionStateDescription = reader.getString(); - } else if ("resyncDetails".equals(fieldName)) { - deserializedInMageReplicationDetails.resyncDetails = InitialReplicationDetails.fromJson(reader); - } else if ("retentionWindowStart".equals(fieldName)) { - deserializedInMageReplicationDetails.retentionWindowStart = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("retentionWindowEnd".equals(fieldName)) { - deserializedInMageReplicationDetails.retentionWindowEnd = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("compressedDataRateInMB".equals(fieldName)) { - deserializedInMageReplicationDetails.compressedDataRateInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("uncompressedDataRateInMB".equals(fieldName)) { - deserializedInMageReplicationDetails.uncompressedDataRateInMB - = reader.getNullable(JsonReader::getDouble); - } else if ("rpoInSeconds".equals(fieldName)) { - deserializedInMageReplicationDetails.rpoInSeconds = reader.getNullable(JsonReader::getLong); - } else if ("protectedDisks".equals(fieldName)) { - List protectedDisks - = reader.readArray(reader1 -> InMageProtectedDiskDetails.fromJson(reader1)); - deserializedInMageReplicationDetails.protectedDisks = protectedDisks; - } else if ("ipAddress".equals(fieldName)) { - deserializedInMageReplicationDetails.ipAddress = reader.getString(); - } else if ("lastHeartbeat".equals(fieldName)) { - deserializedInMageReplicationDetails.lastHeartbeat = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("processServerId".equals(fieldName)) { - deserializedInMageReplicationDetails.processServerId = reader.getString(); - } else if ("masterTargetId".equals(fieldName)) { - deserializedInMageReplicationDetails.masterTargetId = reader.getString(); - } else if ("consistencyPoints".equals(fieldName)) { - Map consistencyPoints = reader.readMap(reader1 -> reader1 - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - deserializedInMageReplicationDetails.consistencyPoints = consistencyPoints; - } else if ("diskResized".equals(fieldName)) { - deserializedInMageReplicationDetails.diskResized = reader.getString(); - } else if ("rebootAfterUpdateStatus".equals(fieldName)) { - deserializedInMageReplicationDetails.rebootAfterUpdateStatus = reader.getString(); - } else if ("multiVmGroupId".equals(fieldName)) { - deserializedInMageReplicationDetails.multiVmGroupId = reader.getString(); - } else if ("multiVmGroupName".equals(fieldName)) { - deserializedInMageReplicationDetails.multiVmGroupName = reader.getString(); - } else if ("multiVmSyncStatus".equals(fieldName)) { - deserializedInMageReplicationDetails.multiVmSyncStatus = reader.getString(); - } else if ("agentDetails".equals(fieldName)) { - deserializedInMageReplicationDetails.agentDetails = InMageAgentDetails.fromJson(reader); - } else if ("vCenterInfrastructureId".equals(fieldName)) { - deserializedInMageReplicationDetails.vCenterInfrastructureId = reader.getString(); - } else if ("infrastructureVmId".equals(fieldName)) { - deserializedInMageReplicationDetails.infrastructureVmId = reader.getString(); - } else if ("vmNics".equals(fieldName)) { - List vmNics = reader.readArray(reader1 -> VMNicDetails.fromJson(reader1)); - deserializedInMageReplicationDetails.vmNics = vmNics; - } else if ("discoveryType".equals(fieldName)) { - deserializedInMageReplicationDetails.discoveryType = reader.getString(); - } else if ("azureStorageAccountId".equals(fieldName)) { - deserializedInMageReplicationDetails.azureStorageAccountId = reader.getString(); - } else if ("datastores".equals(fieldName)) { - List datastores = reader.readArray(reader1 -> reader1.getString()); - deserializedInMageReplicationDetails.datastores = datastores; - } else if ("validationErrors".equals(fieldName)) { - List validationErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedInMageReplicationDetails.validationErrors = validationErrors; - } else if ("lastRpoCalculatedTime".equals(fieldName)) { - deserializedInMageReplicationDetails.lastRpoCalculatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastUpdateReceivedTime".equals(fieldName)) { - deserializedInMageReplicationDetails.lastUpdateReceivedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("replicaId".equals(fieldName)) { - deserializedInMageReplicationDetails.replicaId = reader.getString(); - } else if ("osVersion".equals(fieldName)) { - deserializedInMageReplicationDetails.osVersion = reader.getString(); - } else if ("isAdditionalStatsAvailable".equals(fieldName)) { - deserializedInMageReplicationDetails.isAdditionalStatsAvailable - = reader.getNullable(JsonReader::getBoolean); - } else if ("totalDataTransferred".equals(fieldName)) { - deserializedInMageReplicationDetails.totalDataTransferred = reader.getNullable(JsonReader::getLong); - } else if ("totalProgressHealth".equals(fieldName)) { - deserializedInMageReplicationDetails.totalProgressHealth = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageReplicationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageReprotectInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageReprotectInput.java deleted file mode 100644 index 8418345a3b3a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageReprotectInput.java +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * InMageAzureV2 specific provider input. - */ -@Fluent -public final class InMageReprotectInput extends ReverseReplicationProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMage"; - - /* - * The Master Target Id. - */ - private String masterTargetId; - - /* - * The Process Server Id. - */ - private String processServerId; - - /* - * The retention drive to use on the MT. - */ - private String retentionDrive; - - /* - * The CS account Id. - */ - private String runAsAccountId; - - /* - * The target datastore name. - */ - private String datastoreName; - - /* - * The enable disk exclusion input. - */ - private InMageDiskExclusionInput diskExclusionInput; - - /* - * The Policy Id. - */ - private String profileId; - - /* - * The disks to include list. - */ - private List disksToInclude; - - /** - * Creates an instance of InMageReprotectInput class. - */ - public InMageReprotectInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the masterTargetId property: The Master Target Id. - * - * @return the masterTargetId value. - */ - public String masterTargetId() { - return this.masterTargetId; - } - - /** - * Set the masterTargetId property: 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 processServerId property: The Process Server Id. - * - * @return the processServerId value. - */ - public String processServerId() { - return this.processServerId; - } - - /** - * Set the processServerId property: 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 retentionDrive property: The retention drive to use on the MT. - * - * @return the retentionDrive value. - */ - public String retentionDrive() { - return this.retentionDrive; - } - - /** - * Set the retentionDrive property: 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 runAsAccountId property: The CS account Id. - * - * @return the runAsAccountId value. - */ - public String runAsAccountId() { - return this.runAsAccountId; - } - - /** - * Set the runAsAccountId property: 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 datastoreName property: The target datastore name. - * - * @return the datastoreName value. - */ - public String datastoreName() { - return this.datastoreName; - } - - /** - * Set the datastoreName property: 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 diskExclusionInput property: The enable disk exclusion input. - * - * @return the diskExclusionInput value. - */ - public InMageDiskExclusionInput diskExclusionInput() { - return this.diskExclusionInput; - } - - /** - * Set the diskExclusionInput property: 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 profileId property: The Policy Id. - * - * @return the profileId value. - */ - public String profileId() { - return this.profileId; - } - - /** - * Set the profileId property: 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 disksToInclude property: The disks to include list. - * - * @return the disksToInclude value. - */ - public List disksToInclude() { - return this.disksToInclude; - } - - /** - * Set the disksToInclude property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (masterTargetId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property masterTargetId in model InMageReprotectInput")); - } - if (processServerId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property processServerId in model InMageReprotectInput")); - } - if (retentionDrive() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property retentionDrive in model InMageReprotectInput")); - } - if (diskExclusionInput() != null) { - diskExclusionInput().validate(); - } - if (profileId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property profileId in model InMageReprotectInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InMageReprotectInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("masterTargetId", this.masterTargetId); - jsonWriter.writeStringField("processServerId", this.processServerId); - jsonWriter.writeStringField("retentionDrive", this.retentionDrive); - jsonWriter.writeStringField("profileId", this.profileId); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("runAsAccountId", this.runAsAccountId); - jsonWriter.writeStringField("datastoreName", this.datastoreName); - jsonWriter.writeJsonField("diskExclusionInput", this.diskExclusionInput); - jsonWriter.writeArrayField("disksToInclude", this.disksToInclude, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageReprotectInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageReprotectInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InMageReprotectInput. - */ - public static InMageReprotectInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageReprotectInput deserializedInMageReprotectInput = new InMageReprotectInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("masterTargetId".equals(fieldName)) { - deserializedInMageReprotectInput.masterTargetId = reader.getString(); - } else if ("processServerId".equals(fieldName)) { - deserializedInMageReprotectInput.processServerId = reader.getString(); - } else if ("retentionDrive".equals(fieldName)) { - deserializedInMageReprotectInput.retentionDrive = reader.getString(); - } else if ("profileId".equals(fieldName)) { - deserializedInMageReprotectInput.profileId = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedInMageReprotectInput.instanceType = reader.getString(); - } else if ("runAsAccountId".equals(fieldName)) { - deserializedInMageReprotectInput.runAsAccountId = reader.getString(); - } else if ("datastoreName".equals(fieldName)) { - deserializedInMageReprotectInput.datastoreName = reader.getString(); - } else if ("diskExclusionInput".equals(fieldName)) { - deserializedInMageReprotectInput.diskExclusionInput = InMageDiskExclusionInput.fromJson(reader); - } else if ("disksToInclude".equals(fieldName)) { - List disksToInclude = reader.readArray(reader1 -> reader1.getString()); - deserializedInMageReprotectInput.disksToInclude = disksToInclude; - } else { - reader.skipChildren(); - } - } - - return deserializedInMageReprotectInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageTestFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageTestFailoverInput.java deleted file mode 100644 index 661f676f4d64..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageTestFailoverInput.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific input for InMage test failover. - */ -@Fluent -public final class InMageTestFailoverInput extends TestFailoverProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMage"; - - /* - * 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. - */ - private RecoveryPointType recoveryPointType; - - /* - * The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery - * point, null should be passed. - */ - private String recoveryPointId; - - /** - * Creates an instance of InMageTestFailoverInput class. - */ - public InMageTestFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointType property: 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. - * - * @return the recoveryPointType value. - */ - public RecoveryPointType recoveryPointType() { - return this.recoveryPointType; - } - - /** - * Set the recoveryPointType property: 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. - * - * @param recoveryPointType the recoveryPointType value to set. - * @return the InMageTestFailoverInput object itself. - */ - public InMageTestFailoverInput withRecoveryPointType(RecoveryPointType recoveryPointType) { - this.recoveryPointType = recoveryPointType; - return this; - } - - /** - * Get the recoveryPointId property: The recovery point id to be passed to test 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 recoveryPointId property: The recovery point id to be passed to test 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 InMageTestFailoverInput object itself. - */ - public InMageTestFailoverInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryPointType", - this.recoveryPointType == null ? null : this.recoveryPointType.toString()); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageTestFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageTestFailoverInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageTestFailoverInput. - */ - public static InMageTestFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageTestFailoverInput deserializedInMageTestFailoverInput = new InMageTestFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageTestFailoverInput.instanceType = reader.getString(); - } else if ("recoveryPointType".equals(fieldName)) { - deserializedInMageTestFailoverInput.recoveryPointType - = RecoveryPointType.fromString(reader.getString()); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedInMageTestFailoverInput.recoveryPointId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageTestFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageUnplannedFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageUnplannedFailoverInput.java deleted file mode 100644 index 4c8e73efb3cf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageUnplannedFailoverInput.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific input for InMage unplanned failover. - */ -@Fluent -public final class InMageUnplannedFailoverInput extends UnplannedFailoverProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "InMage"; - - /* - * 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. - */ - 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. - */ - private String recoveryPointId; - - /** - * Creates an instance of InMageUnplannedFailoverInput class. - */ - public InMageUnplannedFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointType property: 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. - * - * @return the recoveryPointType value. - */ - public RecoveryPointType recoveryPointType() { - return this.recoveryPointType; - } - - /** - * Set the recoveryPointType property: 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. - * - * @param recoveryPointType the recoveryPointType value to set. - * @return the InMageUnplannedFailoverInput object itself. - */ - public InMageUnplannedFailoverInput withRecoveryPointType(RecoveryPointType recoveryPointType) { - this.recoveryPointType = recoveryPointType; - return this; - } - - /** - * Get the recoveryPointId property: 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 recoveryPointId property: 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 InMageUnplannedFailoverInput object itself. - */ - public InMageUnplannedFailoverInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("recoveryPointType", - this.recoveryPointType == null ? null : this.recoveryPointType.toString()); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageUnplannedFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageUnplannedFailoverInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageUnplannedFailoverInput. - */ - public static InMageUnplannedFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageUnplannedFailoverInput deserializedInMageUnplannedFailoverInput = new InMageUnplannedFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedInMageUnplannedFailoverInput.instanceType = reader.getString(); - } else if ("recoveryPointType".equals(fieldName)) { - deserializedInMageUnplannedFailoverInput.recoveryPointType - = RecoveryPointType.fromString(reader.getString()); - } else if ("recoveryPointId".equals(fieldName)) { - deserializedInMageUnplannedFailoverInput.recoveryPointId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageUnplannedFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageV2RpRecoveryPointType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageV2RpRecoveryPointType.java deleted file mode 100644 index 1fc5854b313f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageV2RpRecoveryPointType.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The recovery point type. - */ -public final class InMageV2RpRecoveryPointType extends ExpandableStringEnum { - /** - * Static value Latest for InMageV2RpRecoveryPointType. - */ - public static final InMageV2RpRecoveryPointType LATEST = fromString("Latest"); - - /** - * Static value LatestApplicationConsistent for InMageV2RpRecoveryPointType. - */ - public static final InMageV2RpRecoveryPointType LATEST_APPLICATION_CONSISTENT - = fromString("LatestApplicationConsistent"); - - /** - * Static value LatestCrashConsistent for InMageV2RpRecoveryPointType. - */ - public static final InMageV2RpRecoveryPointType LATEST_CRASH_CONSISTENT = fromString("LatestCrashConsistent"); - - /** - * Static value LatestProcessed for InMageV2RpRecoveryPointType. - */ - public static final InMageV2RpRecoveryPointType LATEST_PROCESSED = fromString("LatestProcessed"); - - /** - * Creates a new instance of InMageV2RpRecoveryPointType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public InMageV2RpRecoveryPointType() { - } - - /** - * Creates or finds a InMageV2RpRecoveryPointType from its string representation. - * - * @param name a name to look for. - * @return the corresponding InMageV2RpRecoveryPointType. - */ - public static InMageV2RpRecoveryPointType fromString(String name) { - return fromString(name, InMageV2RpRecoveryPointType.class); - } - - /** - * Gets known InMageV2RpRecoveryPointType values. - * - * @return known InMageV2RpRecoveryPointType values. - */ - public static Collection values() { - return values(InMageV2RpRecoveryPointType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageVolumeExclusionOptions.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageVolumeExclusionOptions.java deleted file mode 100644 index 7478a58a56bc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InMageVolumeExclusionOptions.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Guest disk signature based disk exclusion option when doing enable protection of virtual machine in InMage provider. - */ -@Fluent -public final class InMageVolumeExclusionOptions implements JsonSerializable { - /* - * The volume label. The disk having any volume with this label will be excluded from replication. - */ - 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. - */ - private String onlyExcludeIfSingleVolume; - - /** - * Creates an instance of InMageVolumeExclusionOptions class. - */ - public InMageVolumeExclusionOptions() { - } - - /** - * Get the volumeLabel property: 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 volumeLabel property: 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 onlyExcludeIfSingleVolume property: 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 onlyExcludeIfSingleVolume property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("volumeLabel", this.volumeLabel); - jsonWriter.writeStringField("onlyExcludeIfSingleVolume", this.onlyExcludeIfSingleVolume); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InMageVolumeExclusionOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InMageVolumeExclusionOptions if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InMageVolumeExclusionOptions. - */ - public static InMageVolumeExclusionOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InMageVolumeExclusionOptions deserializedInMageVolumeExclusionOptions = new InMageVolumeExclusionOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("volumeLabel".equals(fieldName)) { - deserializedInMageVolumeExclusionOptions.volumeLabel = reader.getString(); - } else if ("onlyExcludeIfSingleVolume".equals(fieldName)) { - deserializedInMageVolumeExclusionOptions.onlyExcludeIfSingleVolume = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInMageVolumeExclusionOptions; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InconsistentVmDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InconsistentVmDetails.java deleted file mode 100644 index accd8c4856dc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InconsistentVmDetails.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * This class stores the monitoring details for consistency check of inconsistent Protected Entity. - */ -@Fluent -public final class InconsistentVmDetails implements JsonSerializable { - /* - * The Vm name. - */ - private String vmName; - - /* - * The Cloud name. - */ - private String cloudName; - - /* - * The list of details regarding state of the Protected Entity in SRS and On prem. - */ - private List details; - - /* - * The list of error ids. - */ - private List errorIds; - - /** - * Creates an instance of InconsistentVmDetails class. - */ - public InconsistentVmDetails() { - } - - /** - * Get the vmName property: The Vm name. - * - * @return the vmName value. - */ - public String vmName() { - return this.vmName; - } - - /** - * Set the vmName property: 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 cloudName property: The Cloud name. - * - * @return the cloudName value. - */ - public String cloudName() { - return this.cloudName; - } - - /** - * Set the cloudName property: 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 details property: 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 details property: 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 errorIds property: The list of error ids. - * - * @return the errorIds value. - */ - public List errorIds() { - return this.errorIds; - } - - /** - * Set the errorIds property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("vmName", this.vmName); - jsonWriter.writeStringField("cloudName", this.cloudName); - jsonWriter.writeArrayField("details", this.details, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("errorIds", this.errorIds, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InconsistentVmDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InconsistentVmDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the InconsistentVmDetails. - */ - public static InconsistentVmDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InconsistentVmDetails deserializedInconsistentVmDetails = new InconsistentVmDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("vmName".equals(fieldName)) { - deserializedInconsistentVmDetails.vmName = reader.getString(); - } else if ("cloudName".equals(fieldName)) { - deserializedInconsistentVmDetails.cloudName = reader.getString(); - } else if ("details".equals(fieldName)) { - List details = reader.readArray(reader1 -> reader1.getString()); - deserializedInconsistentVmDetails.details = details; - } else if ("errorIds".equals(fieldName)) { - List errorIds = reader.readArray(reader1 -> reader1.getString()); - deserializedInconsistentVmDetails.errorIds = errorIds; - } else { - reader.skipChildren(); - } - } - - return deserializedInconsistentVmDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InitialReplicationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InitialReplicationDetails.java deleted file mode 100644 index 229a4c3628d5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InitialReplicationDetails.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Initial replication details. - */ -@Fluent -public final class InitialReplicationDetails implements JsonSerializable { - /* - * Initial replication type. - */ - private String initialReplicationType; - - /* - * The initial replication progress percentage. - */ - private String initialReplicationProgressPercentage; - - /** - * Creates an instance of InitialReplicationDetails class. - */ - public InitialReplicationDetails() { - } - - /** - * Get the initialReplicationType property: Initial replication type. - * - * @return the initialReplicationType value. - */ - public String initialReplicationType() { - return this.initialReplicationType; - } - - /** - * Set the initialReplicationType property: 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 initialReplicationProgressPercentage property: The initial replication progress percentage. - * - * @return the initialReplicationProgressPercentage value. - */ - public String initialReplicationProgressPercentage() { - return this.initialReplicationProgressPercentage; - } - - /** - * Set the initialReplicationProgressPercentage property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("initialReplicationType", this.initialReplicationType); - jsonWriter.writeStringField("initialReplicationProgressPercentage", this.initialReplicationProgressPercentage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InitialReplicationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InitialReplicationDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InitialReplicationDetails. - */ - public static InitialReplicationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InitialReplicationDetails deserializedInitialReplicationDetails = new InitialReplicationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("initialReplicationType".equals(fieldName)) { - deserializedInitialReplicationDetails.initialReplicationType = reader.getString(); - } else if ("initialReplicationProgressPercentage".equals(fieldName)) { - deserializedInitialReplicationDetails.initialReplicationProgressPercentage = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInitialReplicationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InlineWorkflowTaskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InlineWorkflowTaskDetails.java deleted file mode 100644 index 65dd4d56cf85..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InlineWorkflowTaskDetails.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * This class represents the inline workflow task details. - */ -@Fluent -public final class InlineWorkflowTaskDetails extends GroupTaskDetails { - /* - * The type of task details. - */ - private String instanceType = "InlineWorkflowTaskDetails"; - - /* - * The list of child workflow ids. - */ - private List workflowIds; - - /** - * Creates an instance of InlineWorkflowTaskDetails class. - */ - public InlineWorkflowTaskDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the workflowIds property: The list of child workflow ids. - * - * @return the workflowIds value. - */ - public List workflowIds() { - return this.workflowIds; - } - - /** - * Set the workflowIds property: 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; - } - - /** - * {@inheritDoc} - */ - @Override - public InlineWorkflowTaskDetails withChildTasks(List childTasks) { - super.withChildTasks(childTasks); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (childTasks() != null) { - childTasks().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("childTasks", childTasks(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("workflowIds", this.workflowIds, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InlineWorkflowTaskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InlineWorkflowTaskDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InlineWorkflowTaskDetails. - */ - public static InlineWorkflowTaskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InlineWorkflowTaskDetails deserializedInlineWorkflowTaskDetails = new InlineWorkflowTaskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("childTasks".equals(fieldName)) { - List childTasks = reader.readArray(reader1 -> AsrTask.fromJson(reader1)); - deserializedInlineWorkflowTaskDetails.withChildTasks(childTasks); - } else if ("instanceType".equals(fieldName)) { - deserializedInlineWorkflowTaskDetails.instanceType = reader.getString(); - } else if ("workflowIds".equals(fieldName)) { - List workflowIds = reader.readArray(reader1 -> reader1.getString()); - deserializedInlineWorkflowTaskDetails.workflowIds = workflowIds; - } else { - reader.skipChildren(); - } - } - - return deserializedInlineWorkflowTaskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InnerHealthError.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InnerHealthError.java deleted file mode 100644 index 33dd502f1102..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InnerHealthError.java +++ /dev/null @@ -1,467 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Implements InnerHealthError class. HealthError object has a list of InnerHealthErrors as child errors. - * InnerHealthError is used because this will prevent an infinite loop of structures when Hydra tries to auto-generate - * the contract. We are exposing the related health errors as inner health errors and all API consumers can utilize this - * in the same fashion as Exception -&gt; InnerException. - */ -@Fluent -public final class InnerHealthError implements JsonSerializable { - /* - * Source of error. - */ - private String errorSource; - - /* - * Type of error. - */ - private String errorType; - - /* - * Level of error. - */ - private String errorLevel; - - /* - * Category of error. - */ - private String errorCategory; - - /* - * Error code. - */ - private String errorCode; - - /* - * Summary message of the entity. - */ - private String summaryMessage; - - /* - * Error message. - */ - private String errorMessage; - - /* - * Possible causes of error. - */ - private String possibleCauses; - - /* - * Recommended action to resolve error. - */ - private String recommendedAction; - - /* - * Error creation time (UTC). - */ - private OffsetDateTime creationTimeUtc; - - /* - * DRA error message. - */ - private String recoveryProviderErrorMessage; - - /* - * ID of the entity. - */ - private String entityId; - - /* - * The health error unique id. - */ - private String errorId; - - /* - * Value indicating whether the health error is customer resolvable. - */ - private HealthErrorCustomerResolvability customerResolvability; - - /** - * Creates an instance of InnerHealthError class. - */ - public InnerHealthError() { - } - - /** - * Get the errorSource property: Source of error. - * - * @return the errorSource value. - */ - public String errorSource() { - return this.errorSource; - } - - /** - * Set the errorSource property: Source of error. - * - * @param errorSource the errorSource value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withErrorSource(String errorSource) { - this.errorSource = errorSource; - return this; - } - - /** - * Get the errorType property: Type of error. - * - * @return the errorType value. - */ - public String errorType() { - return this.errorType; - } - - /** - * Set the errorType property: Type of error. - * - * @param errorType the errorType value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withErrorType(String errorType) { - this.errorType = errorType; - return this; - } - - /** - * Get the errorLevel property: Level of error. - * - * @return the errorLevel value. - */ - public String errorLevel() { - return this.errorLevel; - } - - /** - * Set the errorLevel property: Level of error. - * - * @param errorLevel the errorLevel value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withErrorLevel(String errorLevel) { - this.errorLevel = errorLevel; - return this; - } - - /** - * Get the errorCategory property: Category of error. - * - * @return the errorCategory value. - */ - public String errorCategory() { - return this.errorCategory; - } - - /** - * Set the errorCategory property: Category of error. - * - * @param errorCategory the errorCategory value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withErrorCategory(String errorCategory) { - this.errorCategory = errorCategory; - return this; - } - - /** - * Get the errorCode property: Error code. - * - * @return the errorCode value. - */ - public String errorCode() { - return this.errorCode; - } - - /** - * Set the errorCode property: Error code. - * - * @param errorCode the errorCode value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } - - /** - * Get the summaryMessage property: Summary message of the entity. - * - * @return the summaryMessage value. - */ - public String summaryMessage() { - return this.summaryMessage; - } - - /** - * Set the summaryMessage property: Summary message of the entity. - * - * @param summaryMessage the summaryMessage value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withSummaryMessage(String summaryMessage) { - this.summaryMessage = summaryMessage; - return this; - } - - /** - * Get the errorMessage property: Error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: Error message. - * - * @param errorMessage the errorMessage value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - - /** - * Get the possibleCauses property: Possible causes of error. - * - * @return the possibleCauses value. - */ - public String possibleCauses() { - return this.possibleCauses; - } - - /** - * Set the possibleCauses property: Possible causes of error. - * - * @param possibleCauses the possibleCauses value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withPossibleCauses(String possibleCauses) { - this.possibleCauses = possibleCauses; - return this; - } - - /** - * Get the recommendedAction property: Recommended action to resolve error. - * - * @return the recommendedAction value. - */ - public String recommendedAction() { - return this.recommendedAction; - } - - /** - * Set the recommendedAction property: Recommended action to resolve error. - * - * @param recommendedAction the recommendedAction value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withRecommendedAction(String recommendedAction) { - this.recommendedAction = recommendedAction; - return this; - } - - /** - * Get the creationTimeUtc property: Error creation time (UTC). - * - * @return the creationTimeUtc value. - */ - public OffsetDateTime creationTimeUtc() { - return this.creationTimeUtc; - } - - /** - * Set the creationTimeUtc property: Error creation time (UTC). - * - * @param creationTimeUtc the creationTimeUtc value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withCreationTimeUtc(OffsetDateTime creationTimeUtc) { - this.creationTimeUtc = creationTimeUtc; - return this; - } - - /** - * Get the recoveryProviderErrorMessage property: DRA error message. - * - * @return the recoveryProviderErrorMessage value. - */ - public String recoveryProviderErrorMessage() { - return this.recoveryProviderErrorMessage; - } - - /** - * Set the recoveryProviderErrorMessage property: DRA error message. - * - * @param recoveryProviderErrorMessage the recoveryProviderErrorMessage value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withRecoveryProviderErrorMessage(String recoveryProviderErrorMessage) { - this.recoveryProviderErrorMessage = recoveryProviderErrorMessage; - return this; - } - - /** - * Get the entityId property: ID of the entity. - * - * @return the entityId value. - */ - public String entityId() { - return this.entityId; - } - - /** - * Set the entityId property: ID of the entity. - * - * @param entityId the entityId value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withEntityId(String entityId) { - this.entityId = entityId; - return this; - } - - /** - * Get the errorId property: The health error unique id. - * - * @return the errorId value. - */ - public String errorId() { - return this.errorId; - } - - /** - * Set the errorId property: The health error unique id. - * - * @param errorId the errorId value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withErrorId(String errorId) { - this.errorId = errorId; - return this; - } - - /** - * Get the customerResolvability property: Value indicating whether the health error is customer resolvable. - * - * @return the customerResolvability value. - */ - public HealthErrorCustomerResolvability customerResolvability() { - return this.customerResolvability; - } - - /** - * Set the customerResolvability property: Value indicating whether the health error is customer resolvable. - * - * @param customerResolvability the customerResolvability value to set. - * @return the InnerHealthError object itself. - */ - public InnerHealthError withCustomerResolvability(HealthErrorCustomerResolvability customerResolvability) { - this.customerResolvability = customerResolvability; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("errorSource", this.errorSource); - jsonWriter.writeStringField("errorType", this.errorType); - jsonWriter.writeStringField("errorLevel", this.errorLevel); - jsonWriter.writeStringField("errorCategory", this.errorCategory); - jsonWriter.writeStringField("errorCode", this.errorCode); - jsonWriter.writeStringField("summaryMessage", this.summaryMessage); - jsonWriter.writeStringField("errorMessage", this.errorMessage); - jsonWriter.writeStringField("possibleCauses", this.possibleCauses); - jsonWriter.writeStringField("recommendedAction", this.recommendedAction); - jsonWriter.writeStringField("creationTimeUtc", - this.creationTimeUtc == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.creationTimeUtc)); - jsonWriter.writeStringField("recoveryProviderErrorMessage", this.recoveryProviderErrorMessage); - jsonWriter.writeStringField("entityId", this.entityId); - jsonWriter.writeStringField("errorId", this.errorId); - jsonWriter.writeStringField("customerResolvability", - this.customerResolvability == null ? null : this.customerResolvability.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InnerHealthError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InnerHealthError if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the InnerHealthError. - */ - public static InnerHealthError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InnerHealthError deserializedInnerHealthError = new InnerHealthError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("errorSource".equals(fieldName)) { - deserializedInnerHealthError.errorSource = reader.getString(); - } else if ("errorType".equals(fieldName)) { - deserializedInnerHealthError.errorType = reader.getString(); - } else if ("errorLevel".equals(fieldName)) { - deserializedInnerHealthError.errorLevel = reader.getString(); - } else if ("errorCategory".equals(fieldName)) { - deserializedInnerHealthError.errorCategory = reader.getString(); - } else if ("errorCode".equals(fieldName)) { - deserializedInnerHealthError.errorCode = reader.getString(); - } else if ("summaryMessage".equals(fieldName)) { - deserializedInnerHealthError.summaryMessage = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedInnerHealthError.errorMessage = reader.getString(); - } else if ("possibleCauses".equals(fieldName)) { - deserializedInnerHealthError.possibleCauses = reader.getString(); - } else if ("recommendedAction".equals(fieldName)) { - deserializedInnerHealthError.recommendedAction = reader.getString(); - } else if ("creationTimeUtc".equals(fieldName)) { - deserializedInnerHealthError.creationTimeUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("recoveryProviderErrorMessage".equals(fieldName)) { - deserializedInnerHealthError.recoveryProviderErrorMessage = reader.getString(); - } else if ("entityId".equals(fieldName)) { - deserializedInnerHealthError.entityId = reader.getString(); - } else if ("errorId".equals(fieldName)) { - deserializedInnerHealthError.errorId = reader.getString(); - } else if ("customerResolvability".equals(fieldName)) { - deserializedInnerHealthError.customerResolvability - = HealthErrorCustomerResolvability.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedInnerHealthError; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InputEndpoint.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InputEndpoint.java deleted file mode 100644 index f88988d95b5e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/InputEndpoint.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The InputEndpoint model. - */ -@Fluent -public final class InputEndpoint implements JsonSerializable { - /* - * The endpointName property. - */ - private String endpointName; - - /* - * The privatePort property. - */ - private Integer privatePort; - - /* - * The publicPort property. - */ - private Integer publicPort; - - /* - * The protocol property. - */ - private String protocol; - - /** - * Creates an instance of InputEndpoint class. - */ - public InputEndpoint() { - } - - /** - * Get the endpointName property: The endpointName property. - * - * @return the endpointName value. - */ - public String endpointName() { - return this.endpointName; - } - - /** - * Set the endpointName property: The endpointName property. - * - * @param endpointName the endpointName value to set. - * @return the InputEndpoint object itself. - */ - public InputEndpoint withEndpointName(String endpointName) { - this.endpointName = endpointName; - return this; - } - - /** - * Get the privatePort property: The privatePort property. - * - * @return the privatePort value. - */ - public Integer privatePort() { - return this.privatePort; - } - - /** - * Set the privatePort property: The privatePort property. - * - * @param privatePort the privatePort value to set. - * @return the InputEndpoint object itself. - */ - public InputEndpoint withPrivatePort(Integer privatePort) { - this.privatePort = privatePort; - return this; - } - - /** - * Get the publicPort property: The publicPort property. - * - * @return the publicPort value. - */ - public Integer publicPort() { - return this.publicPort; - } - - /** - * Set the publicPort property: The publicPort property. - * - * @param publicPort the publicPort value to set. - * @return the InputEndpoint object itself. - */ - public InputEndpoint withPublicPort(Integer publicPort) { - this.publicPort = publicPort; - return this; - } - - /** - * Get the protocol property: The protocol property. - * - * @return the protocol value. - */ - public String protocol() { - return this.protocol; - } - - /** - * Set the protocol property: The protocol property. - * - * @param protocol the protocol value to set. - * @return the InputEndpoint object itself. - */ - public InputEndpoint withProtocol(String protocol) { - this.protocol = protocol; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("endpointName", this.endpointName); - jsonWriter.writeNumberField("privatePort", this.privatePort); - jsonWriter.writeNumberField("publicPort", this.publicPort); - jsonWriter.writeStringField("protocol", this.protocol); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InputEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InputEndpoint if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the InputEndpoint. - */ - public static InputEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InputEndpoint deserializedInputEndpoint = new InputEndpoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("endpointName".equals(fieldName)) { - deserializedInputEndpoint.endpointName = reader.getString(); - } else if ("privatePort".equals(fieldName)) { - deserializedInputEndpoint.privatePort = reader.getNullable(JsonReader::getInt); - } else if ("publicPort".equals(fieldName)) { - deserializedInputEndpoint.publicPort = reader.getNullable(JsonReader::getInt); - } else if ("protocol".equals(fieldName)) { - deserializedInputEndpoint.protocol = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInputEndpoint; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/IpConfigDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/IpConfigDetails.java deleted file mode 100644 index 06f04bfea8ad..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/IpConfigDetails.java +++ /dev/null @@ -1,490 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The IpConfigDetails model. - */ -@Fluent -public final class IpConfigDetails implements JsonSerializable { - /* - * The name property. - */ - private String name; - - /* - * The isPrimary property. - */ - private Boolean isPrimary; - - /* - * The subnetName property. - */ - private String subnetName; - - /* - * The staticIPAddress property. - */ - private String staticIpAddress; - - /* - * The ipAddressType property. - */ - private String ipAddressType; - - /* - * The isSeletedForFailover property. - */ - private Boolean isSeletedForFailover; - - /* - * The recoverySubnetName property. - */ - private String recoverySubnetName; - - /* - * The recoveryStaticIPAddress property. - */ - private String recoveryStaticIpAddress; - - /* - * The recoveryIPAddressType property. - */ - private String recoveryIpAddressType; - - /* - * The recoveryPublicIPAddressId property. - */ - private String recoveryPublicIpAddressId; - - /* - * The recoveryLBBackendAddressPoolIds property. - */ - private List recoveryLBBackendAddressPoolIds; - - /* - * The tfoSubnetName property. - */ - private String tfoSubnetName; - - /* - * The tfoStaticIPAddress property. - */ - private String tfoStaticIpAddress; - - /* - * The tfoPublicIPAddressId property. - */ - private String tfoPublicIpAddressId; - - /* - * The tfoLBBackendAddressPoolIds property. - */ - private List tfoLBBackendAddressPoolIds; - - /** - * Creates an instance of IpConfigDetails class. - */ - public IpConfigDetails() { - } - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name property. - * - * @param name the name value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withName(String name) { - this.name = name; - return this; - } - - /** - * Get the isPrimary property: The isPrimary property. - * - * @return the isPrimary value. - */ - public Boolean isPrimary() { - return this.isPrimary; - } - - /** - * Set the isPrimary property: The isPrimary property. - * - * @param isPrimary the isPrimary value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withIsPrimary(Boolean isPrimary) { - this.isPrimary = isPrimary; - return this; - } - - /** - * Get the subnetName property: The subnetName property. - * - * @return the subnetName value. - */ - public String subnetName() { - return this.subnetName; - } - - /** - * Set the subnetName property: The subnetName property. - * - * @param subnetName the subnetName value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withSubnetName(String subnetName) { - this.subnetName = subnetName; - return this; - } - - /** - * Get the staticIpAddress property: The staticIPAddress property. - * - * @return the staticIpAddress value. - */ - public String staticIpAddress() { - return this.staticIpAddress; - } - - /** - * Set the staticIpAddress property: The staticIPAddress property. - * - * @param staticIpAddress the staticIpAddress value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withStaticIpAddress(String staticIpAddress) { - this.staticIpAddress = staticIpAddress; - return this; - } - - /** - * Get the ipAddressType property: The ipAddressType property. - * - * @return the ipAddressType value. - */ - public String ipAddressType() { - return this.ipAddressType; - } - - /** - * Set the ipAddressType property: The ipAddressType property. - * - * @param ipAddressType the ipAddressType value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withIpAddressType(String ipAddressType) { - this.ipAddressType = ipAddressType; - return this; - } - - /** - * Get the isSeletedForFailover property: The isSeletedForFailover property. - * - * @return the isSeletedForFailover value. - */ - public Boolean isSeletedForFailover() { - return this.isSeletedForFailover; - } - - /** - * Set the isSeletedForFailover property: The isSeletedForFailover property. - * - * @param isSeletedForFailover the isSeletedForFailover value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withIsSeletedForFailover(Boolean isSeletedForFailover) { - this.isSeletedForFailover = isSeletedForFailover; - return this; - } - - /** - * Get the recoverySubnetName property: The recoverySubnetName property. - * - * @return the recoverySubnetName value. - */ - public String recoverySubnetName() { - return this.recoverySubnetName; - } - - /** - * Set the recoverySubnetName property: The recoverySubnetName property. - * - * @param recoverySubnetName the recoverySubnetName value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withRecoverySubnetName(String recoverySubnetName) { - this.recoverySubnetName = recoverySubnetName; - return this; - } - - /** - * Get the recoveryStaticIpAddress property: The recoveryStaticIPAddress property. - * - * @return the recoveryStaticIpAddress value. - */ - public String recoveryStaticIpAddress() { - return this.recoveryStaticIpAddress; - } - - /** - * Set the recoveryStaticIpAddress property: The recoveryStaticIPAddress property. - * - * @param recoveryStaticIpAddress the recoveryStaticIpAddress value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withRecoveryStaticIpAddress(String recoveryStaticIpAddress) { - this.recoveryStaticIpAddress = recoveryStaticIpAddress; - return this; - } - - /** - * Get the recoveryIpAddressType property: The recoveryIPAddressType property. - * - * @return the recoveryIpAddressType value. - */ - public String recoveryIpAddressType() { - return this.recoveryIpAddressType; - } - - /** - * Set the recoveryIpAddressType property: The recoveryIPAddressType property. - * - * @param recoveryIpAddressType the recoveryIpAddressType value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withRecoveryIpAddressType(String recoveryIpAddressType) { - this.recoveryIpAddressType = recoveryIpAddressType; - return this; - } - - /** - * Get the recoveryPublicIpAddressId property: The recoveryPublicIPAddressId property. - * - * @return the recoveryPublicIpAddressId value. - */ - public String recoveryPublicIpAddressId() { - return this.recoveryPublicIpAddressId; - } - - /** - * Set the recoveryPublicIpAddressId property: The recoveryPublicIPAddressId property. - * - * @param recoveryPublicIpAddressId the recoveryPublicIpAddressId value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withRecoveryPublicIpAddressId(String recoveryPublicIpAddressId) { - this.recoveryPublicIpAddressId = recoveryPublicIpAddressId; - return this; - } - - /** - * Get the recoveryLBBackendAddressPoolIds property: The recoveryLBBackendAddressPoolIds property. - * - * @return the recoveryLBBackendAddressPoolIds value. - */ - public List recoveryLBBackendAddressPoolIds() { - return this.recoveryLBBackendAddressPoolIds; - } - - /** - * Set the recoveryLBBackendAddressPoolIds property: The recoveryLBBackendAddressPoolIds property. - * - * @param recoveryLBBackendAddressPoolIds the recoveryLBBackendAddressPoolIds value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withRecoveryLBBackendAddressPoolIds(List recoveryLBBackendAddressPoolIds) { - this.recoveryLBBackendAddressPoolIds = recoveryLBBackendAddressPoolIds; - return this; - } - - /** - * Get the tfoSubnetName property: The tfoSubnetName property. - * - * @return the tfoSubnetName value. - */ - public String tfoSubnetName() { - return this.tfoSubnetName; - } - - /** - * Set the tfoSubnetName property: The tfoSubnetName property. - * - * @param tfoSubnetName the tfoSubnetName value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withTfoSubnetName(String tfoSubnetName) { - this.tfoSubnetName = tfoSubnetName; - return this; - } - - /** - * Get the tfoStaticIpAddress property: The tfoStaticIPAddress property. - * - * @return the tfoStaticIpAddress value. - */ - public String tfoStaticIpAddress() { - return this.tfoStaticIpAddress; - } - - /** - * Set the tfoStaticIpAddress property: The tfoStaticIPAddress property. - * - * @param tfoStaticIpAddress the tfoStaticIpAddress value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withTfoStaticIpAddress(String tfoStaticIpAddress) { - this.tfoStaticIpAddress = tfoStaticIpAddress; - return this; - } - - /** - * Get the tfoPublicIpAddressId property: The tfoPublicIPAddressId property. - * - * @return the tfoPublicIpAddressId value. - */ - public String tfoPublicIpAddressId() { - return this.tfoPublicIpAddressId; - } - - /** - * Set the tfoPublicIpAddressId property: The tfoPublicIPAddressId property. - * - * @param tfoPublicIpAddressId the tfoPublicIpAddressId value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withTfoPublicIpAddressId(String tfoPublicIpAddressId) { - this.tfoPublicIpAddressId = tfoPublicIpAddressId; - return this; - } - - /** - * Get the tfoLBBackendAddressPoolIds property: The tfoLBBackendAddressPoolIds property. - * - * @return the tfoLBBackendAddressPoolIds value. - */ - public List tfoLBBackendAddressPoolIds() { - return this.tfoLBBackendAddressPoolIds; - } - - /** - * Set the tfoLBBackendAddressPoolIds property: The tfoLBBackendAddressPoolIds property. - * - * @param tfoLBBackendAddressPoolIds the tfoLBBackendAddressPoolIds value to set. - * @return the IpConfigDetails object itself. - */ - public IpConfigDetails withTfoLBBackendAddressPoolIds(List tfoLBBackendAddressPoolIds) { - this.tfoLBBackendAddressPoolIds = tfoLBBackendAddressPoolIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeBooleanField("isPrimary", this.isPrimary); - jsonWriter.writeStringField("subnetName", this.subnetName); - jsonWriter.writeStringField("staticIPAddress", this.staticIpAddress); - jsonWriter.writeStringField("ipAddressType", this.ipAddressType); - jsonWriter.writeBooleanField("isSeletedForFailover", this.isSeletedForFailover); - jsonWriter.writeStringField("recoverySubnetName", this.recoverySubnetName); - jsonWriter.writeStringField("recoveryStaticIPAddress", this.recoveryStaticIpAddress); - jsonWriter.writeStringField("recoveryIPAddressType", this.recoveryIpAddressType); - jsonWriter.writeStringField("recoveryPublicIPAddressId", this.recoveryPublicIpAddressId); - jsonWriter.writeArrayField("recoveryLBBackendAddressPoolIds", this.recoveryLBBackendAddressPoolIds, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("tfoSubnetName", this.tfoSubnetName); - jsonWriter.writeStringField("tfoStaticIPAddress", this.tfoStaticIpAddress); - jsonWriter.writeStringField("tfoPublicIPAddressId", this.tfoPublicIpAddressId); - jsonWriter.writeArrayField("tfoLBBackendAddressPoolIds", this.tfoLBBackendAddressPoolIds, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpConfigDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpConfigDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the IpConfigDetails. - */ - public static IpConfigDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpConfigDetails deserializedIpConfigDetails = new IpConfigDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedIpConfigDetails.name = reader.getString(); - } else if ("isPrimary".equals(fieldName)) { - deserializedIpConfigDetails.isPrimary = reader.getNullable(JsonReader::getBoolean); - } else if ("subnetName".equals(fieldName)) { - deserializedIpConfigDetails.subnetName = reader.getString(); - } else if ("staticIPAddress".equals(fieldName)) { - deserializedIpConfigDetails.staticIpAddress = reader.getString(); - } else if ("ipAddressType".equals(fieldName)) { - deserializedIpConfigDetails.ipAddressType = reader.getString(); - } else if ("isSeletedForFailover".equals(fieldName)) { - deserializedIpConfigDetails.isSeletedForFailover = reader.getNullable(JsonReader::getBoolean); - } else if ("recoverySubnetName".equals(fieldName)) { - deserializedIpConfigDetails.recoverySubnetName = reader.getString(); - } else if ("recoveryStaticIPAddress".equals(fieldName)) { - deserializedIpConfigDetails.recoveryStaticIpAddress = reader.getString(); - } else if ("recoveryIPAddressType".equals(fieldName)) { - deserializedIpConfigDetails.recoveryIpAddressType = reader.getString(); - } else if ("recoveryPublicIPAddressId".equals(fieldName)) { - deserializedIpConfigDetails.recoveryPublicIpAddressId = reader.getString(); - } else if ("recoveryLBBackendAddressPoolIds".equals(fieldName)) { - List recoveryLBBackendAddressPoolIds = reader.readArray(reader1 -> reader1.getString()); - deserializedIpConfigDetails.recoveryLBBackendAddressPoolIds = recoveryLBBackendAddressPoolIds; - } else if ("tfoSubnetName".equals(fieldName)) { - deserializedIpConfigDetails.tfoSubnetName = reader.getString(); - } else if ("tfoStaticIPAddress".equals(fieldName)) { - deserializedIpConfigDetails.tfoStaticIpAddress = reader.getString(); - } else if ("tfoPublicIPAddressId".equals(fieldName)) { - deserializedIpConfigDetails.tfoPublicIpAddressId = reader.getString(); - } else if ("tfoLBBackendAddressPoolIds".equals(fieldName)) { - List tfoLBBackendAddressPoolIds = reader.readArray(reader1 -> reader1.getString()); - deserializedIpConfigDetails.tfoLBBackendAddressPoolIds = tfoLBBackendAddressPoolIds; - } else { - reader.skipChildren(); - } - } - - return deserializedIpConfigDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/IpConfigInputDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/IpConfigInputDetails.java deleted file mode 100644 index 9338a71c6583..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/IpConfigInputDetails.java +++ /dev/null @@ -1,378 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The IpConfigInputDetails model. - */ -@Fluent -public final class IpConfigInputDetails implements JsonSerializable { - /* - * The ipConfigName property. - */ - private String ipConfigName; - - /* - * The isPrimary property. - */ - private Boolean isPrimary; - - /* - * The isSeletedForFailover property. - */ - private Boolean isSeletedForFailover; - - /* - * The recoverySubnetName property. - */ - private String recoverySubnetName; - - /* - * The recoveryStaticIPAddress property. - */ - private String recoveryStaticIpAddress; - - /* - * The recoveryPublicIPAddressId property. - */ - private String recoveryPublicIpAddressId; - - /* - * The recoveryLBBackendAddressPoolIds property. - */ - private List recoveryLBBackendAddressPoolIds; - - /* - * The tfoSubnetName property. - */ - private String tfoSubnetName; - - /* - * The tfoStaticIPAddress property. - */ - private String tfoStaticIpAddress; - - /* - * The tfoPublicIPAddressId property. - */ - private String tfoPublicIpAddressId; - - /* - * The tfoLBBackendAddressPoolIds property. - */ - private List tfoLBBackendAddressPoolIds; - - /** - * Creates an instance of IpConfigInputDetails class. - */ - public IpConfigInputDetails() { - } - - /** - * Get the ipConfigName property: The ipConfigName property. - * - * @return the ipConfigName value. - */ - public String ipConfigName() { - return this.ipConfigName; - } - - /** - * Set the ipConfigName property: The ipConfigName property. - * - * @param ipConfigName the ipConfigName value to set. - * @return the IpConfigInputDetails object itself. - */ - public IpConfigInputDetails withIpConfigName(String ipConfigName) { - this.ipConfigName = ipConfigName; - return this; - } - - /** - * Get the isPrimary property: The isPrimary property. - * - * @return the isPrimary value. - */ - public Boolean isPrimary() { - return this.isPrimary; - } - - /** - * Set the isPrimary property: The isPrimary property. - * - * @param isPrimary the isPrimary value to set. - * @return the IpConfigInputDetails object itself. - */ - public IpConfigInputDetails withIsPrimary(Boolean isPrimary) { - this.isPrimary = isPrimary; - return this; - } - - /** - * Get the isSeletedForFailover property: The isSeletedForFailover property. - * - * @return the isSeletedForFailover value. - */ - public Boolean isSeletedForFailover() { - return this.isSeletedForFailover; - } - - /** - * Set the isSeletedForFailover property: The isSeletedForFailover property. - * - * @param isSeletedForFailover the isSeletedForFailover value to set. - * @return the IpConfigInputDetails object itself. - */ - public IpConfigInputDetails withIsSeletedForFailover(Boolean isSeletedForFailover) { - this.isSeletedForFailover = isSeletedForFailover; - return this; - } - - /** - * Get the recoverySubnetName property: The recoverySubnetName property. - * - * @return the recoverySubnetName value. - */ - public String recoverySubnetName() { - return this.recoverySubnetName; - } - - /** - * Set the recoverySubnetName property: The recoverySubnetName property. - * - * @param recoverySubnetName the recoverySubnetName value to set. - * @return the IpConfigInputDetails object itself. - */ - public IpConfigInputDetails withRecoverySubnetName(String recoverySubnetName) { - this.recoverySubnetName = recoverySubnetName; - return this; - } - - /** - * Get the recoveryStaticIpAddress property: The recoveryStaticIPAddress property. - * - * @return the recoveryStaticIpAddress value. - */ - public String recoveryStaticIpAddress() { - return this.recoveryStaticIpAddress; - } - - /** - * Set the recoveryStaticIpAddress property: The recoveryStaticIPAddress property. - * - * @param recoveryStaticIpAddress the recoveryStaticIpAddress value to set. - * @return the IpConfigInputDetails object itself. - */ - public IpConfigInputDetails withRecoveryStaticIpAddress(String recoveryStaticIpAddress) { - this.recoveryStaticIpAddress = recoveryStaticIpAddress; - return this; - } - - /** - * Get the recoveryPublicIpAddressId property: The recoveryPublicIPAddressId property. - * - * @return the recoveryPublicIpAddressId value. - */ - public String recoveryPublicIpAddressId() { - return this.recoveryPublicIpAddressId; - } - - /** - * Set the recoveryPublicIpAddressId property: The recoveryPublicIPAddressId property. - * - * @param recoveryPublicIpAddressId the recoveryPublicIpAddressId value to set. - * @return the IpConfigInputDetails object itself. - */ - public IpConfigInputDetails withRecoveryPublicIpAddressId(String recoveryPublicIpAddressId) { - this.recoveryPublicIpAddressId = recoveryPublicIpAddressId; - return this; - } - - /** - * Get the recoveryLBBackendAddressPoolIds property: The recoveryLBBackendAddressPoolIds property. - * - * @return the recoveryLBBackendAddressPoolIds value. - */ - public List recoveryLBBackendAddressPoolIds() { - return this.recoveryLBBackendAddressPoolIds; - } - - /** - * Set the recoveryLBBackendAddressPoolIds property: The recoveryLBBackendAddressPoolIds property. - * - * @param recoveryLBBackendAddressPoolIds the recoveryLBBackendAddressPoolIds value to set. - * @return the IpConfigInputDetails object itself. - */ - public IpConfigInputDetails withRecoveryLBBackendAddressPoolIds(List recoveryLBBackendAddressPoolIds) { - this.recoveryLBBackendAddressPoolIds = recoveryLBBackendAddressPoolIds; - return this; - } - - /** - * Get the tfoSubnetName property: The tfoSubnetName property. - * - * @return the tfoSubnetName value. - */ - public String tfoSubnetName() { - return this.tfoSubnetName; - } - - /** - * Set the tfoSubnetName property: The tfoSubnetName property. - * - * @param tfoSubnetName the tfoSubnetName value to set. - * @return the IpConfigInputDetails object itself. - */ - public IpConfigInputDetails withTfoSubnetName(String tfoSubnetName) { - this.tfoSubnetName = tfoSubnetName; - return this; - } - - /** - * Get the tfoStaticIpAddress property: The tfoStaticIPAddress property. - * - * @return the tfoStaticIpAddress value. - */ - public String tfoStaticIpAddress() { - return this.tfoStaticIpAddress; - } - - /** - * Set the tfoStaticIpAddress property: The tfoStaticIPAddress property. - * - * @param tfoStaticIpAddress the tfoStaticIpAddress value to set. - * @return the IpConfigInputDetails object itself. - */ - public IpConfigInputDetails withTfoStaticIpAddress(String tfoStaticIpAddress) { - this.tfoStaticIpAddress = tfoStaticIpAddress; - return this; - } - - /** - * Get the tfoPublicIpAddressId property: The tfoPublicIPAddressId property. - * - * @return the tfoPublicIpAddressId value. - */ - public String tfoPublicIpAddressId() { - return this.tfoPublicIpAddressId; - } - - /** - * Set the tfoPublicIpAddressId property: The tfoPublicIPAddressId property. - * - * @param tfoPublicIpAddressId the tfoPublicIpAddressId value to set. - * @return the IpConfigInputDetails object itself. - */ - public IpConfigInputDetails withTfoPublicIpAddressId(String tfoPublicIpAddressId) { - this.tfoPublicIpAddressId = tfoPublicIpAddressId; - return this; - } - - /** - * Get the tfoLBBackendAddressPoolIds property: The tfoLBBackendAddressPoolIds property. - * - * @return the tfoLBBackendAddressPoolIds value. - */ - public List tfoLBBackendAddressPoolIds() { - return this.tfoLBBackendAddressPoolIds; - } - - /** - * Set the tfoLBBackendAddressPoolIds property: The tfoLBBackendAddressPoolIds property. - * - * @param tfoLBBackendAddressPoolIds the tfoLBBackendAddressPoolIds value to set. - * @return the IpConfigInputDetails object itself. - */ - public IpConfigInputDetails withTfoLBBackendAddressPoolIds(List tfoLBBackendAddressPoolIds) { - this.tfoLBBackendAddressPoolIds = tfoLBBackendAddressPoolIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("ipConfigName", this.ipConfigName); - jsonWriter.writeBooleanField("isPrimary", this.isPrimary); - jsonWriter.writeBooleanField("isSeletedForFailover", this.isSeletedForFailover); - jsonWriter.writeStringField("recoverySubnetName", this.recoverySubnetName); - jsonWriter.writeStringField("recoveryStaticIPAddress", this.recoveryStaticIpAddress); - jsonWriter.writeStringField("recoveryPublicIPAddressId", this.recoveryPublicIpAddressId); - jsonWriter.writeArrayField("recoveryLBBackendAddressPoolIds", this.recoveryLBBackendAddressPoolIds, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("tfoSubnetName", this.tfoSubnetName); - jsonWriter.writeStringField("tfoStaticIPAddress", this.tfoStaticIpAddress); - jsonWriter.writeStringField("tfoPublicIPAddressId", this.tfoPublicIpAddressId); - jsonWriter.writeArrayField("tfoLBBackendAddressPoolIds", this.tfoLBBackendAddressPoolIds, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpConfigInputDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpConfigInputDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpConfigInputDetails. - */ - public static IpConfigInputDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpConfigInputDetails deserializedIpConfigInputDetails = new IpConfigInputDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipConfigName".equals(fieldName)) { - deserializedIpConfigInputDetails.ipConfigName = reader.getString(); - } else if ("isPrimary".equals(fieldName)) { - deserializedIpConfigInputDetails.isPrimary = reader.getNullable(JsonReader::getBoolean); - } else if ("isSeletedForFailover".equals(fieldName)) { - deserializedIpConfigInputDetails.isSeletedForFailover = reader.getNullable(JsonReader::getBoolean); - } else if ("recoverySubnetName".equals(fieldName)) { - deserializedIpConfigInputDetails.recoverySubnetName = reader.getString(); - } else if ("recoveryStaticIPAddress".equals(fieldName)) { - deserializedIpConfigInputDetails.recoveryStaticIpAddress = reader.getString(); - } else if ("recoveryPublicIPAddressId".equals(fieldName)) { - deserializedIpConfigInputDetails.recoveryPublicIpAddressId = reader.getString(); - } else if ("recoveryLBBackendAddressPoolIds".equals(fieldName)) { - List recoveryLBBackendAddressPoolIds = reader.readArray(reader1 -> reader1.getString()); - deserializedIpConfigInputDetails.recoveryLBBackendAddressPoolIds = recoveryLBBackendAddressPoolIds; - } else if ("tfoSubnetName".equals(fieldName)) { - deserializedIpConfigInputDetails.tfoSubnetName = reader.getString(); - } else if ("tfoStaticIPAddress".equals(fieldName)) { - deserializedIpConfigInputDetails.tfoStaticIpAddress = reader.getString(); - } else if ("tfoPublicIPAddressId".equals(fieldName)) { - deserializedIpConfigInputDetails.tfoPublicIpAddressId = reader.getString(); - } else if ("tfoLBBackendAddressPoolIds".equals(fieldName)) { - List tfoLBBackendAddressPoolIds = reader.readArray(reader1 -> reader1.getString()); - deserializedIpConfigInputDetails.tfoLBBackendAddressPoolIds = tfoLBBackendAddressPoolIds; - } else { - reader.skipChildren(); - } - } - - return deserializedIpConfigInputDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Job.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Job.java deleted file mode 100644 index 5e433cce3cb7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Job.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.JobInner; - -/** - * An immutable client-side representation of Job. - */ -public interface Job { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The custom data. - * - * @return the properties value. - */ - JobProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.JobInner object. - * - * @return the inner object. - */ - JobInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobCollection.java deleted file mode 100644 index 886d23026b4f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobCollection.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.JobInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of jobs. - */ -@Fluent -public final class JobCollection implements JsonSerializable { - /* - * The list of jobs. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of JobCollection class. - */ - public JobCollection() { - } - - /** - * Get the value property: The list of jobs. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of jobs. - * - * @param value the value value to set. - * @return the JobCollection object itself. - */ - public JobCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the JobCollection object itself. - */ - public JobCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the JobCollection. - */ - public static JobCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobCollection deserializedJobCollection = new JobCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> JobInner.fromJson(reader1)); - deserializedJobCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedJobCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobDetails.java deleted file mode 100644 index 4df01f39f47c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobDetails.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Job details based on specific job type. - */ -@Fluent -public class JobDetails implements JsonSerializable { - /* - * Gets the type of job details (see JobDetailsTypes enum for possible values). - */ - private String instanceType = "JobDetails"; - - /* - * The affected object properties like source server, source cloud, target server, target cloud etc. based on the - * workflow object details. - */ - private Map affectedObjectDetails; - - /** - * Creates an instance of JobDetails class. - */ - public JobDetails() { - } - - /** - * Get the instanceType property: Gets the type of job details (see JobDetailsTypes enum for possible values). - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Get the affectedObjectDetails property: 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 affectedObjectDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeMapField("affectedObjectDetails", this.affectedObjectDetails, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobDetails if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the JobDetails. - */ - public static JobDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AsrJobDetails".equals(discriminatorValue)) { - return AsrJobDetails.fromJson(readerToUse.reset()); - } else if ("ExportJobDetails".equals(discriminatorValue)) { - return ExportJobDetails.fromJson(readerToUse.reset()); - } else if ("FailoverJobDetails".equals(discriminatorValue)) { - return FailoverJobDetails.fromJson(readerToUse.reset()); - } else if ("SwitchProtectionJobDetails".equals(discriminatorValue)) { - return SwitchProtectionJobDetails.fromJson(readerToUse.reset()); - } else if ("TestFailoverJobDetails".equals(discriminatorValue)) { - return TestFailoverJobDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static JobDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobDetails deserializedJobDetails = new JobDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedJobDetails.instanceType = reader.getString(); - } else if ("affectedObjectDetails".equals(fieldName)) { - Map affectedObjectDetails = reader.readMap(reader1 -> reader1.getString()); - deserializedJobDetails.affectedObjectDetails = affectedObjectDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedJobDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobEntity.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobEntity.java deleted file mode 100644 index 5749fe2fd015..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobEntity.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * This class contains the minimal job details required to navigate to the desired drill down. - */ -@Fluent -public final class JobEntity implements JsonSerializable { - /* - * The job id. - */ - private String jobId; - - /* - * The job display name. - */ - private String jobFriendlyName; - - /* - * The object id. - */ - private String targetObjectId; - - /* - * The object name. - */ - private String targetObjectName; - - /* - * The workflow affected object type. - */ - private String targetInstanceType; - - /* - * The job name. Enum type ScenarioName. - */ - private String jobScenarioName; - - /** - * Creates an instance of JobEntity class. - */ - public JobEntity() { - } - - /** - * Get the jobId property: The job id. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Set the jobId property: 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 jobFriendlyName property: The job display name. - * - * @return the jobFriendlyName value. - */ - public String jobFriendlyName() { - return this.jobFriendlyName; - } - - /** - * Set the jobFriendlyName property: 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 targetObjectId property: The object id. - * - * @return the targetObjectId value. - */ - public String targetObjectId() { - return this.targetObjectId; - } - - /** - * Set the targetObjectId property: 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 targetObjectName property: The object name. - * - * @return the targetObjectName value. - */ - public String targetObjectName() { - return this.targetObjectName; - } - - /** - * Set the targetObjectName property: 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 targetInstanceType property: The workflow affected object type. - * - * @return the targetInstanceType value. - */ - public String targetInstanceType() { - return this.targetInstanceType; - } - - /** - * Set the targetInstanceType property: 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 jobScenarioName property: The job name. Enum type ScenarioName. - * - * @return the jobScenarioName value. - */ - public String jobScenarioName() { - return this.jobScenarioName; - } - - /** - * Set the jobScenarioName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobId", this.jobId); - jsonWriter.writeStringField("jobFriendlyName", this.jobFriendlyName); - jsonWriter.writeStringField("targetObjectId", this.targetObjectId); - jsonWriter.writeStringField("targetObjectName", this.targetObjectName); - jsonWriter.writeStringField("targetInstanceType", this.targetInstanceType); - jsonWriter.writeStringField("jobScenarioName", this.jobScenarioName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobEntity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobEntity if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the JobEntity. - */ - public static JobEntity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobEntity deserializedJobEntity = new JobEntity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobId".equals(fieldName)) { - deserializedJobEntity.jobId = reader.getString(); - } else if ("jobFriendlyName".equals(fieldName)) { - deserializedJobEntity.jobFriendlyName = reader.getString(); - } else if ("targetObjectId".equals(fieldName)) { - deserializedJobEntity.targetObjectId = reader.getString(); - } else if ("targetObjectName".equals(fieldName)) { - deserializedJobEntity.targetObjectName = reader.getString(); - } else if ("targetInstanceType".equals(fieldName)) { - deserializedJobEntity.targetInstanceType = reader.getString(); - } else if ("jobScenarioName".equals(fieldName)) { - deserializedJobEntity.jobScenarioName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobEntity; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobErrorDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobErrorDetails.java deleted file mode 100644 index c09625a77392..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobErrorDetails.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * This class contains the error details per object. - */ -@Fluent -public final class JobErrorDetails implements JsonSerializable { - /* - * The Service error details. - */ - private ServiceError serviceErrorDetails; - - /* - * The Provider error details. - */ - private ProviderError providerErrorDetails; - - /* - * Error level of error. - */ - private String errorLevel; - - /* - * The creation time of job error. - */ - private OffsetDateTime creationTime; - - /* - * The Id of the task. - */ - private String taskId; - - /** - * Creates an instance of JobErrorDetails class. - */ - public JobErrorDetails() { - } - - /** - * Get the serviceErrorDetails property: The Service error details. - * - * @return the serviceErrorDetails value. - */ - public ServiceError serviceErrorDetails() { - return this.serviceErrorDetails; - } - - /** - * Set the serviceErrorDetails property: 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 providerErrorDetails property: The Provider error details. - * - * @return the providerErrorDetails value. - */ - public ProviderError providerErrorDetails() { - return this.providerErrorDetails; - } - - /** - * Set the providerErrorDetails property: 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 the errorLevel property: Error level of error. - * - * @return the errorLevel value. - */ - public String errorLevel() { - return this.errorLevel; - } - - /** - * Set the errorLevel property: 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 creationTime property: The creation time of job error. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Set the creationTime property: The creation time of job error. - * - * @param creationTime the creationTime value to set. - * @return the JobErrorDetails object itself. - */ - public JobErrorDetails withCreationTime(OffsetDateTime creationTime) { - this.creationTime = creationTime; - return this; - } - - /** - * Get the taskId property: The Id of the task. - * - * @return the taskId value. - */ - public String taskId() { - return this.taskId; - } - - /** - * Set the taskId property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceErrorDetails() != null) { - serviceErrorDetails().validate(); - } - if (providerErrorDetails() != null) { - providerErrorDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("serviceErrorDetails", this.serviceErrorDetails); - jsonWriter.writeJsonField("providerErrorDetails", this.providerErrorDetails); - jsonWriter.writeStringField("errorLevel", this.errorLevel); - jsonWriter.writeStringField("creationTime", - this.creationTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.creationTime)); - jsonWriter.writeStringField("taskId", this.taskId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobErrorDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobErrorDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the JobErrorDetails. - */ - public static JobErrorDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobErrorDetails deserializedJobErrorDetails = new JobErrorDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serviceErrorDetails".equals(fieldName)) { - deserializedJobErrorDetails.serviceErrorDetails = ServiceError.fromJson(reader); - } else if ("providerErrorDetails".equals(fieldName)) { - deserializedJobErrorDetails.providerErrorDetails = ProviderError.fromJson(reader); - } else if ("errorLevel".equals(fieldName)) { - deserializedJobErrorDetails.errorLevel = reader.getString(); - } else if ("creationTime".equals(fieldName)) { - deserializedJobErrorDetails.creationTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("taskId".equals(fieldName)) { - deserializedJobErrorDetails.taskId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobErrorDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobProperties.java deleted file mode 100644 index b0b2a1c95d30..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobProperties.java +++ /dev/null @@ -1,486 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * Job custom data details. - */ -@Fluent -public final class JobProperties implements JsonSerializable { - /* - * The activity id. - */ - private String activityId; - - /* - * The ScenarioName. - */ - private String scenarioName; - - /* - * The DisplayName. - */ - private String friendlyName; - - /* - * The status of the Job. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, - * Suspended or Other. - */ - 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. - */ - private String stateDescription; - - /* - * The tasks. - */ - private List tasks; - - /* - * The errors. - */ - private List errors; - - /* - * The start time. - */ - private OffsetDateTime startTime; - - /* - * The end time. - */ - private OffsetDateTime endTime; - - /* - * The Allowed action the job. - */ - private List allowedActions; - - /* - * The affected Object Id. - */ - private String targetObjectId; - - /* - * The name of the affected object. - */ - private String targetObjectName; - - /* - * The type of the affected object which is of Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType class. - */ - private String targetInstanceType; - - /* - * The custom job details like test failover job details. - */ - private JobDetails customDetails; - - /** - * Creates an instance of JobProperties class. - */ - public JobProperties() { - } - - /** - * Get the activityId property: The activity id. - * - * @return the activityId value. - */ - public String activityId() { - return this.activityId; - } - - /** - * Set the activityId property: 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 property: The ScenarioName. - * - * @return the scenarioName value. - */ - public String scenarioName() { - return this.scenarioName; - } - - /** - * Set the scenarioName property: 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 friendlyName property: The DisplayName. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 state property: 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 state property: 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 stateDescription property: 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 stateDescription property: 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 property: The tasks. - * - * @return the tasks value. - */ - public List tasks() { - return this.tasks; - } - - /** - * Set the tasks property: 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 property: The errors. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Set the errors property: 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 startTime property: The start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start time. - * - * @param startTime the startTime value to set. - * @return the JobProperties object itself. - */ - public JobProperties withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: The end time. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The end time. - * - * @param endTime the endTime value to set. - * @return the JobProperties object itself. - */ - public JobProperties withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the allowedActions property: The Allowed action the job. - * - * @return the allowedActions value. - */ - public List allowedActions() { - return this.allowedActions; - } - - /** - * Set the allowedActions property: 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 targetObjectId property: The affected Object Id. - * - * @return the targetObjectId value. - */ - public String targetObjectId() { - return this.targetObjectId; - } - - /** - * Set the targetObjectId property: 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 targetObjectName property: The name of the affected object. - * - * @return the targetObjectName value. - */ - public String targetObjectName() { - return this.targetObjectName; - } - - /** - * Set the targetObjectName property: 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 targetInstanceType property: 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 targetInstanceType property: 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 customDetails property: The custom job details like test failover job details. - * - * @return the customDetails value. - */ - public JobDetails customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tasks() != null) { - tasks().forEach(e -> e.validate()); - } - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - if (customDetails() != null) { - customDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("activityId", this.activityId); - jsonWriter.writeStringField("scenarioName", this.scenarioName); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("state", this.state); - jsonWriter.writeStringField("stateDescription", this.stateDescription); - jsonWriter.writeArrayField("tasks", this.tasks, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("errors", this.errors, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("startTime", - this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); - jsonWriter.writeStringField("endTime", - this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); - jsonWriter.writeArrayField("allowedActions", this.allowedActions, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("targetObjectId", this.targetObjectId); - jsonWriter.writeStringField("targetObjectName", this.targetObjectName); - jsonWriter.writeStringField("targetInstanceType", this.targetInstanceType); - jsonWriter.writeJsonField("customDetails", this.customDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the JobProperties. - */ - public static JobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobProperties deserializedJobProperties = new JobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("activityId".equals(fieldName)) { - deserializedJobProperties.activityId = reader.getString(); - } else if ("scenarioName".equals(fieldName)) { - deserializedJobProperties.scenarioName = reader.getString(); - } else if ("friendlyName".equals(fieldName)) { - deserializedJobProperties.friendlyName = reader.getString(); - } else if ("state".equals(fieldName)) { - deserializedJobProperties.state = reader.getString(); - } else if ("stateDescription".equals(fieldName)) { - deserializedJobProperties.stateDescription = reader.getString(); - } else if ("tasks".equals(fieldName)) { - List tasks = reader.readArray(reader1 -> AsrTask.fromJson(reader1)); - deserializedJobProperties.tasks = tasks; - } else if ("errors".equals(fieldName)) { - List errors = reader.readArray(reader1 -> JobErrorDetails.fromJson(reader1)); - deserializedJobProperties.errors = errors; - } else if ("startTime".equals(fieldName)) { - deserializedJobProperties.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTime".equals(fieldName)) { - deserializedJobProperties.endTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("allowedActions".equals(fieldName)) { - List allowedActions = reader.readArray(reader1 -> reader1.getString()); - deserializedJobProperties.allowedActions = allowedActions; - } else if ("targetObjectId".equals(fieldName)) { - deserializedJobProperties.targetObjectId = reader.getString(); - } else if ("targetObjectName".equals(fieldName)) { - deserializedJobProperties.targetObjectName = reader.getString(); - } else if ("targetInstanceType".equals(fieldName)) { - deserializedJobProperties.targetInstanceType = reader.getString(); - } else if ("customDetails".equals(fieldName)) { - deserializedJobProperties.customDetails = JobDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobQueryParameter.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobQueryParameter.java deleted file mode 100644 index da8376598af4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobQueryParameter.java +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Query parameter to enumerate jobs. - */ -@Fluent -public final class JobQueryParameter implements JsonSerializable { - /* - * Date time to get jobs from. - */ - private String startTime; - - /* - * Date time to get jobs upto. - */ - private String endTime; - - /* - * The Id of the fabric to search jobs under. - */ - private String fabricId; - - /* - * The type of objects. - */ - private String affectedObjectTypes; - - /* - * The states of the job to be filtered can be in. - */ - private String jobStatus; - - /* - * The output type of the jobs. - */ - private ExportJobOutputSerializationType jobOutputType; - - /* - * The job Name. - */ - private String jobName; - - /* - * The timezone offset for the location of the request (in minutes). - */ - private Double timezoneOffset; - - /** - * Creates an instance of JobQueryParameter class. - */ - public JobQueryParameter() { - } - - /** - * Get the startTime property: Date time to get jobs from. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Set the startTime property: 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 the endTime property: Date time to get jobs upto. - * - * @return the endTime value. - */ - public String endTime() { - return this.endTime; - } - - /** - * Set the endTime property: 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 fabricId property: The Id of the fabric to search jobs under. - * - * @return the fabricId value. - */ - public String fabricId() { - return this.fabricId; - } - - /** - * Set the fabricId property: 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 affectedObjectTypes property: The type of objects. - * - * @return the affectedObjectTypes value. - */ - public String affectedObjectTypes() { - return this.affectedObjectTypes; - } - - /** - * Set the affectedObjectTypes property: The type of objects. - * - * @param affectedObjectTypes the affectedObjectTypes value to set. - * @return the JobQueryParameter object itself. - */ - public JobQueryParameter withAffectedObjectTypes(String affectedObjectTypes) { - this.affectedObjectTypes = affectedObjectTypes; - return this; - } - - /** - * Get the jobStatus property: The states of the job to be filtered can be in. - * - * @return the jobStatus value. - */ - public String jobStatus() { - return this.jobStatus; - } - - /** - * Set the jobStatus property: 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(String jobStatus) { - this.jobStatus = jobStatus; - return this; - } - - /** - * Get the jobOutputType property: The output type of the jobs. - * - * @return the jobOutputType value. - */ - public ExportJobOutputSerializationType jobOutputType() { - return this.jobOutputType; - } - - /** - * Set the jobOutputType property: The output type of the jobs. - * - * @param jobOutputType the jobOutputType value to set. - * @return the JobQueryParameter object itself. - */ - public JobQueryParameter withJobOutputType(ExportJobOutputSerializationType jobOutputType) { - this.jobOutputType = jobOutputType; - return this; - } - - /** - * Get the jobName property: The job Name. - * - * @return the jobName value. - */ - public String jobName() { - return this.jobName; - } - - /** - * Set the jobName property: The job Name. - * - * @param jobName the jobName value to set. - * @return the JobQueryParameter object itself. - */ - public JobQueryParameter withJobName(String jobName) { - this.jobName = jobName; - return this; - } - - /** - * Get the timezoneOffset property: The timezone offset for the location of the request (in minutes). - * - * @return the timezoneOffset value. - */ - public Double timezoneOffset() { - return this.timezoneOffset; - } - - /** - * Set the timezoneOffset property: The timezone offset for the location of the request (in minutes). - * - * @param timezoneOffset the timezoneOffset value to set. - * @return the JobQueryParameter object itself. - */ - public JobQueryParameter withTimezoneOffset(Double timezoneOffset) { - this.timezoneOffset = timezoneOffset; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("startTime", this.startTime); - jsonWriter.writeStringField("endTime", this.endTime); - jsonWriter.writeStringField("fabricId", this.fabricId); - jsonWriter.writeStringField("affectedObjectTypes", this.affectedObjectTypes); - jsonWriter.writeStringField("jobStatus", this.jobStatus); - jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("jobName", this.jobName); - jsonWriter.writeNumberField("timezoneOffset", this.timezoneOffset); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobQueryParameter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobQueryParameter if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the JobQueryParameter. - */ - public static JobQueryParameter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobQueryParameter deserializedJobQueryParameter = new JobQueryParameter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("startTime".equals(fieldName)) { - deserializedJobQueryParameter.startTime = reader.getString(); - } else if ("endTime".equals(fieldName)) { - deserializedJobQueryParameter.endTime = reader.getString(); - } else if ("fabricId".equals(fieldName)) { - deserializedJobQueryParameter.fabricId = reader.getString(); - } else if ("affectedObjectTypes".equals(fieldName)) { - deserializedJobQueryParameter.affectedObjectTypes = reader.getString(); - } else if ("jobStatus".equals(fieldName)) { - deserializedJobQueryParameter.jobStatus = reader.getString(); - } else if ("jobOutputType".equals(fieldName)) { - deserializedJobQueryParameter.jobOutputType - = ExportJobOutputSerializationType.fromString(reader.getString()); - } else if ("jobName".equals(fieldName)) { - deserializedJobQueryParameter.jobName = reader.getString(); - } else if ("timezoneOffset".equals(fieldName)) { - deserializedJobQueryParameter.timezoneOffset = reader.getNullable(JsonReader::getDouble); - } else { - reader.skipChildren(); - } - } - - return deserializedJobQueryParameter; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobStatusEventDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobStatusEventDetails.java deleted file mode 100644 index fa3673b6a757..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobStatusEventDetails.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model class for event details of a job status event. - */ -@Fluent -public final class JobStatusEventDetails extends EventSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "JobStatus"; - - /* - * Job arm id for the event. - */ - private String jobId; - - /* - * JobName for the Event. - */ - private String jobFriendlyName; - - /* - * JobStatus for the Event. - */ - private String jobStatus; - - /* - * AffectedObjectType for the event. - */ - private String affectedObjectType; - - /** - * Creates an instance of JobStatusEventDetails class. - */ - public JobStatusEventDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the jobId property: Job arm id for the event. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Set the jobId property: 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 the jobFriendlyName property: JobName for the Event. - * - * @return the jobFriendlyName value. - */ - public String jobFriendlyName() { - return this.jobFriendlyName; - } - - /** - * Set the jobFriendlyName property: 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 the jobStatus property: JobStatus for the Event. - * - * @return the jobStatus value. - */ - public String jobStatus() { - return this.jobStatus; - } - - /** - * Set the jobStatus property: 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 the affectedObjectType property: AffectedObjectType for the event. - * - * @return the affectedObjectType value. - */ - public String affectedObjectType() { - return this.affectedObjectType; - } - - /** - * Set the affectedObjectType property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("jobId", this.jobId); - jsonWriter.writeStringField("jobFriendlyName", this.jobFriendlyName); - jsonWriter.writeStringField("jobStatus", this.jobStatus); - jsonWriter.writeStringField("affectedObjectType", this.affectedObjectType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobStatusEventDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobStatusEventDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the JobStatusEventDetails. - */ - public static JobStatusEventDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobStatusEventDetails deserializedJobStatusEventDetails = new JobStatusEventDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedJobStatusEventDetails.instanceType = reader.getString(); - } else if ("jobId".equals(fieldName)) { - deserializedJobStatusEventDetails.jobId = reader.getString(); - } else if ("jobFriendlyName".equals(fieldName)) { - deserializedJobStatusEventDetails.jobFriendlyName = reader.getString(); - } else if ("jobStatus".equals(fieldName)) { - deserializedJobStatusEventDetails.jobStatus = reader.getString(); - } else if ("affectedObjectType".equals(fieldName)) { - deserializedJobStatusEventDetails.affectedObjectType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobStatusEventDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobTaskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobTaskDetails.java deleted file mode 100644 index 27b1f2c0e672..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/JobTaskDetails.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * This class represents a task which is actually a workflow so that one can navigate to its individual drill down. - */ -@Fluent -public class JobTaskDetails extends TaskTypeDetails { - /* - * The type of task details. - */ - private String instanceType = "JobTaskDetails"; - - /* - * The job entity. - */ - private JobEntity jobTask; - - /** - * Creates an instance of JobTaskDetails class. - */ - public JobTaskDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the jobTask property: The job entity. - * - * @return the jobTask value. - */ - public JobEntity jobTask() { - return this.jobTask; - } - - /** - * Set the jobTask property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (jobTask() != null) { - jobTask().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeJsonField("jobTask", this.jobTask); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobTaskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobTaskDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the JobTaskDetails. - */ - public static JobTaskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("FabricReplicationGroupTaskDetails".equals(discriminatorValue)) { - return FabricReplicationGroupTaskDetails.fromJson(readerToUse.reset()); - } else if ("VirtualMachineTaskDetails".equals(discriminatorValue)) { - return VirtualMachineTaskDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static JobTaskDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobTaskDetails deserializedJobTaskDetails = new JobTaskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedJobTaskDetails.instanceType = reader.getString(); - } else if ("jobTask".equals(fieldName)) { - deserializedJobTaskDetails.jobTask = JobEntity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobTaskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/KeyEncryptionKeyInfo.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/KeyEncryptionKeyInfo.java deleted file mode 100644 index 73bc1ddf0ed9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/KeyEncryptionKeyInfo.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Key Encryption Key (KEK) information. - */ -@Fluent -public final class KeyEncryptionKeyInfo implements JsonSerializable { - /* - * The key URL / identifier. - */ - private String keyIdentifier; - - /* - * The KeyVault resource ARM Id for key. - */ - private String keyVaultResourceArmId; - - /** - * Creates an instance of KeyEncryptionKeyInfo class. - */ - public KeyEncryptionKeyInfo() { - } - - /** - * Get the keyIdentifier property: The key URL / identifier. - * - * @return the keyIdentifier value. - */ - public String keyIdentifier() { - return this.keyIdentifier; - } - - /** - * Set the keyIdentifier property: The key URL / identifier. - * - * @param keyIdentifier the keyIdentifier value to set. - * @return the KeyEncryptionKeyInfo object itself. - */ - public KeyEncryptionKeyInfo withKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - return this; - } - - /** - * Get the keyVaultResourceArmId property: The KeyVault resource ARM Id for key. - * - * @return the keyVaultResourceArmId value. - */ - public String keyVaultResourceArmId() { - return this.keyVaultResourceArmId; - } - - /** - * Set the keyVaultResourceArmId property: The KeyVault resource ARM Id for key. - * - * @param keyVaultResourceArmId the keyVaultResourceArmId value to set. - * @return the KeyEncryptionKeyInfo object itself. - */ - public KeyEncryptionKeyInfo withKeyVaultResourceArmId(String keyVaultResourceArmId) { - this.keyVaultResourceArmId = keyVaultResourceArmId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("keyIdentifier", this.keyIdentifier); - jsonWriter.writeStringField("keyVaultResourceArmId", this.keyVaultResourceArmId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KeyEncryptionKeyInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KeyEncryptionKeyInfo if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the KeyEncryptionKeyInfo. - */ - public static KeyEncryptionKeyInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KeyEncryptionKeyInfo deserializedKeyEncryptionKeyInfo = new KeyEncryptionKeyInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keyIdentifier".equals(fieldName)) { - deserializedKeyEncryptionKeyInfo.keyIdentifier = reader.getString(); - } else if ("keyVaultResourceArmId".equals(fieldName)) { - deserializedKeyEncryptionKeyInfo.keyVaultResourceArmId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedKeyEncryptionKeyInfo; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/LicenseType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/LicenseType.java deleted file mode 100644 index 0ed686f84e03..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/LicenseType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * License type. - */ -public final class LicenseType extends ExpandableStringEnum { - /** - * Static value NotSpecified for LicenseType. - */ - public static final LicenseType NOT_SPECIFIED = fromString("NotSpecified"); - - /** - * Static value NoLicenseType for LicenseType. - */ - public static final LicenseType NO_LICENSE_TYPE = fromString("NoLicenseType"); - - /** - * Static value WindowsServer for LicenseType. - */ - public static final LicenseType WINDOWS_SERVER = fromString("WindowsServer"); - - /** - * Creates a new instance of LicenseType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LicenseType() { - } - - /** - * Creates or finds a LicenseType from its string representation. - * - * @param name a name to look for. - * @return the corresponding LicenseType. - */ - public static LicenseType fromString(String name) { - return fromString(name, LicenseType.class); - } - - /** - * Gets known LicenseType values. - * - * @return known LicenseType values. - */ - public static Collection values() { - return values(LicenseType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/LogicalNetwork.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/LogicalNetwork.java deleted file mode 100644 index eed24bade767..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/LogicalNetwork.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.LogicalNetworkInner; - -/** - * An immutable client-side representation of LogicalNetwork. - */ -public interface LogicalNetwork { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The Logical Network Properties. - * - * @return the properties value. - */ - LogicalNetworkProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.LogicalNetworkInner object. - * - * @return the inner object. - */ - LogicalNetworkInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/LogicalNetworkCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/LogicalNetworkCollection.java deleted file mode 100644 index 32130de8e7d3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/LogicalNetworkCollection.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.LogicalNetworkInner; -import java.io.IOException; -import java.util.List; - -/** - * List of logical networks. - */ -@Fluent -public final class LogicalNetworkCollection implements JsonSerializable { - /* - * The Logical Networks list details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of LogicalNetworkCollection class. - */ - public LogicalNetworkCollection() { - } - - /** - * Get the value property: The Logical Networks list details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The Logical Networks list details. - * - * @param value the value value to set. - * @return the LogicalNetworkCollection object itself. - */ - public LogicalNetworkCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the LogicalNetworkCollection object itself. - */ - public LogicalNetworkCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LogicalNetworkCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LogicalNetworkCollection if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the LogicalNetworkCollection. - */ - public static LogicalNetworkCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LogicalNetworkCollection deserializedLogicalNetworkCollection = new LogicalNetworkCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> LogicalNetworkInner.fromJson(reader1)); - deserializedLogicalNetworkCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedLogicalNetworkCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedLogicalNetworkCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/LogicalNetworkProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/LogicalNetworkProperties.java deleted file mode 100644 index 1a2e72474145..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/LogicalNetworkProperties.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Logical Network Properties. - */ -@Fluent -public final class LogicalNetworkProperties implements JsonSerializable { - /* - * The Friendly Name. - */ - private String friendlyName; - - /* - * A value indicating whether Network Virtualization is enabled for the logical network. - */ - private String networkVirtualizationStatus; - - /* - * A value indicating whether logical network is used as private test network by test failover. - */ - private String logicalNetworkUsage; - - /* - * A value indicating whether logical network definitions are isolated. - */ - private String logicalNetworkDefinitionsStatus; - - /** - * Creates an instance of LogicalNetworkProperties class. - */ - public LogicalNetworkProperties() { - } - - /** - * Get the friendlyName property: The Friendly Name. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 the networkVirtualizationStatus property: A value indicating whether Network Virtualization is enabled for - * the logical network. - * - * @return the networkVirtualizationStatus value. - */ - public String networkVirtualizationStatus() { - return this.networkVirtualizationStatus; - } - - /** - * Set the networkVirtualizationStatus property: 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 the logicalNetworkUsage property: 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 the logicalNetworkUsage property: 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 the logicalNetworkDefinitionsStatus property: A value indicating whether logical network definitions are - * isolated. - * - * @return the logicalNetworkDefinitionsStatus value. - */ - public String logicalNetworkDefinitionsStatus() { - return this.logicalNetworkDefinitionsStatus; - } - - /** - * Set the logicalNetworkDefinitionsStatus property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("networkVirtualizationStatus", this.networkVirtualizationStatus); - jsonWriter.writeStringField("logicalNetworkUsage", this.logicalNetworkUsage); - jsonWriter.writeStringField("logicalNetworkDefinitionsStatus", this.logicalNetworkDefinitionsStatus); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LogicalNetworkProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LogicalNetworkProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the LogicalNetworkProperties. - */ - public static LogicalNetworkProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LogicalNetworkProperties deserializedLogicalNetworkProperties = new LogicalNetworkProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedLogicalNetworkProperties.friendlyName = reader.getString(); - } else if ("networkVirtualizationStatus".equals(fieldName)) { - deserializedLogicalNetworkProperties.networkVirtualizationStatus = reader.getString(); - } else if ("logicalNetworkUsage".equals(fieldName)) { - deserializedLogicalNetworkProperties.logicalNetworkUsage = reader.getString(); - } else if ("logicalNetworkDefinitionsStatus".equals(fieldName)) { - deserializedLogicalNetworkProperties.logicalNetworkDefinitionsStatus = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedLogicalNetworkProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ManualActionTaskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ManualActionTaskDetails.java deleted file mode 100644 index 477a02033198..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ManualActionTaskDetails.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * This class represents the manual action task details. - */ -@Fluent -public final class ManualActionTaskDetails extends TaskTypeDetails { - /* - * The type of task details. - */ - private String instanceType = "ManualActionTaskDetails"; - - /* - * The name. - */ - private String name; - - /* - * The instructions. - */ - private String instructions; - - /* - * The observation. - */ - private String observation; - - /** - * Creates an instance of ManualActionTaskDetails class. - */ - public ManualActionTaskDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the name property: The name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 property: The instructions. - * - * @return the instructions value. - */ - public String instructions() { - return this.instructions; - } - - /** - * Set the instructions property: 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 property: The observation. - * - * @return the observation value. - */ - public String observation() { - return this.observation; - } - - /** - * Set the observation property: The observation. - * - * @param observation the observation value to set. - * @return the ManualActionTaskDetails object itself. - */ - public ManualActionTaskDetails withObservation(String observation) { - this.observation = observation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("instructions", this.instructions); - jsonWriter.writeStringField("observation", this.observation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManualActionTaskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManualActionTaskDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManualActionTaskDetails. - */ - public static ManualActionTaskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManualActionTaskDetails deserializedManualActionTaskDetails = new ManualActionTaskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedManualActionTaskDetails.instanceType = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManualActionTaskDetails.name = reader.getString(); - } else if ("instructions".equals(fieldName)) { - deserializedManualActionTaskDetails.instructions = reader.getString(); - } else if ("observation".equals(fieldName)) { - deserializedManualActionTaskDetails.observation = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManualActionTaskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MarsAgentDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MarsAgentDetails.java deleted file mode 100644 index bcc041bd9c4d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MarsAgentDetails.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Mars agent details. - */ -@Immutable -public final class MarsAgentDetails implements JsonSerializable { - /* - * The Mars agent Id. - */ - private String id; - - /* - * The Mars agent name. - */ - private String name; - - /* - * The Mars agent Bios Id. - */ - private String biosId; - - /* - * The fabric object Id. - */ - private String fabricObjectId; - - /* - * The Mars agent Fqdn. - */ - private String fqdn; - - /* - * The version. - */ - private String version; - - /* - * The last heartbeat received from the Mars agent. - */ - private OffsetDateTime lastHeartbeatUtc; - - /* - * The health of the Mars agent. - */ - private ProtectionHealth health; - - /* - * The health errors. - */ - private List healthErrors; - - /** - * Creates an instance of MarsAgentDetails class. - */ - public MarsAgentDetails() { - } - - /** - * Get the id property: The Mars agent Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The Mars agent name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the biosId property: The Mars agent Bios Id. - * - * @return the biosId value. - */ - public String biosId() { - return this.biosId; - } - - /** - * Get the fabricObjectId property: The fabric object Id. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Get the fqdn property: The Mars agent Fqdn. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the version property: The version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the lastHeartbeatUtc property: The last heartbeat received from the Mars agent. - * - * @return the lastHeartbeatUtc value. - */ - public OffsetDateTime lastHeartbeatUtc() { - return this.lastHeartbeatUtc; - } - - /** - * Get the health property: The health of the Mars agent. - * - * @return the health value. - */ - public ProtectionHealth health() { - return this.health; - } - - /** - * Get the healthErrors property: The health errors. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MarsAgentDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MarsAgentDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the MarsAgentDetails. - */ - public static MarsAgentDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MarsAgentDetails deserializedMarsAgentDetails = new MarsAgentDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedMarsAgentDetails.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedMarsAgentDetails.name = reader.getString(); - } else if ("biosId".equals(fieldName)) { - deserializedMarsAgentDetails.biosId = reader.getString(); - } else if ("fabricObjectId".equals(fieldName)) { - deserializedMarsAgentDetails.fabricObjectId = reader.getString(); - } else if ("fqdn".equals(fieldName)) { - deserializedMarsAgentDetails.fqdn = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedMarsAgentDetails.version = reader.getString(); - } else if ("lastHeartbeatUtc".equals(fieldName)) { - deserializedMarsAgentDetails.lastHeartbeatUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("health".equals(fieldName)) { - deserializedMarsAgentDetails.health = ProtectionHealth.fromString(reader.getString()); - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedMarsAgentDetails.healthErrors = healthErrors; - } else { - reader.skipChildren(); - } - } - - return deserializedMarsAgentDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MasterTargetServer.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MasterTargetServer.java deleted file mode 100644 index 3b786a4624cc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MasterTargetServer.java +++ /dev/null @@ -1,606 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * Details of a Master Target Server. - */ -@Fluent -public final class MasterTargetServer implements JsonSerializable { - /* - * The server Id. - */ - private String id; - - /* - * The IP address of the server. - */ - private String ipAddress; - - /* - * The server name. - */ - private String name; - - /* - * The OS type of the server. - */ - private String osType; - - /* - * The version of the scout component on the server. - */ - private String agentVersion; - - /* - * The last heartbeat received from the server. - */ - private OffsetDateTime lastHeartbeat; - - /* - * Version status. - */ - private String versionStatus; - - /* - * The retention volumes of Master target Server. - */ - private List retentionVolumes; - - /* - * The list of data stores in the fabric. - */ - private List dataStores; - - /* - * Validation errors. - */ - private List validationErrors; - - /* - * Health errors. - */ - private List healthErrors; - - /* - * Disk count of the master target. - */ - private Integer diskCount; - - /* - * OS Version of the master target. - */ - private String osVersion; - - /* - * Agent expiry date. - */ - private OffsetDateTime agentExpiryDate; - - /* - * MARS agent version. - */ - private String marsAgentVersion; - - /* - * MARS agent expiry date. - */ - private OffsetDateTime marsAgentExpiryDate; - - /* - * Agent version details. - */ - private VersionDetails agentVersionDetails; - - /* - * Mars agent version details. - */ - private VersionDetails marsAgentVersionDetails; - - /** - * Creates an instance of MasterTargetServer class. - */ - public MasterTargetServer() { - } - - /** - * Get the id property: The server Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: 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 ipAddress property: The IP address of the server. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: 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 name property: The server name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 osType property: The OS type of the server. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: 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 agentVersion property: The version of the scout component on the server. - * - * @return the agentVersion value. - */ - public String agentVersion() { - return this.agentVersion; - } - - /** - * Set the agentVersion property: 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 lastHeartbeat property: The last heartbeat received from the server. - * - * @return the lastHeartbeat value. - */ - public OffsetDateTime lastHeartbeat() { - return this.lastHeartbeat; - } - - /** - * Set the lastHeartbeat property: The last heartbeat received from the server. - * - * @param lastHeartbeat the lastHeartbeat value to set. - * @return the MasterTargetServer object itself. - */ - public MasterTargetServer withLastHeartbeat(OffsetDateTime lastHeartbeat) { - this.lastHeartbeat = lastHeartbeat; - return this; - } - - /** - * Get the versionStatus property: Version status. - * - * @return the versionStatus value. - */ - public String versionStatus() { - return this.versionStatus; - } - - /** - * Set the versionStatus property: 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 retentionVolumes property: The retention volumes of Master target Server. - * - * @return the retentionVolumes value. - */ - public List retentionVolumes() { - return this.retentionVolumes; - } - - /** - * Set the retentionVolumes property: 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 dataStores property: The list of data stores in the fabric. - * - * @return the dataStores value. - */ - public List dataStores() { - return this.dataStores; - } - - /** - * Set the dataStores property: 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 the validationErrors property: Validation errors. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Set the validationErrors property: 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 the healthErrors property: Health errors. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Set the healthErrors property: Health errors. - * - * @param healthErrors the healthErrors value to set. - * @return the MasterTargetServer object itself. - */ - public MasterTargetServer withHealthErrors(List healthErrors) { - this.healthErrors = healthErrors; - return this; - } - - /** - * Get the diskCount property: Disk count of the master target. - * - * @return the diskCount value. - */ - public Integer diskCount() { - return this.diskCount; - } - - /** - * Set the diskCount property: 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 the osVersion property: OS Version of the master target. - * - * @return the osVersion value. - */ - public String osVersion() { - return this.osVersion; - } - - /** - * Set the osVersion property: 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; - } - - /** - * Get the agentExpiryDate property: Agent expiry date. - * - * @return the agentExpiryDate value. - */ - public OffsetDateTime agentExpiryDate() { - return this.agentExpiryDate; - } - - /** - * Set the agentExpiryDate property: Agent expiry date. - * - * @param agentExpiryDate the agentExpiryDate value to set. - * @return the MasterTargetServer object itself. - */ - public MasterTargetServer withAgentExpiryDate(OffsetDateTime agentExpiryDate) { - this.agentExpiryDate = agentExpiryDate; - return this; - } - - /** - * Get the marsAgentVersion property: MARS agent version. - * - * @return the marsAgentVersion value. - */ - public String marsAgentVersion() { - return this.marsAgentVersion; - } - - /** - * Set the marsAgentVersion property: MARS agent version. - * - * @param marsAgentVersion the marsAgentVersion value to set. - * @return the MasterTargetServer object itself. - */ - public MasterTargetServer withMarsAgentVersion(String marsAgentVersion) { - this.marsAgentVersion = marsAgentVersion; - return this; - } - - /** - * Get the marsAgentExpiryDate property: MARS agent expiry date. - * - * @return the marsAgentExpiryDate value. - */ - public OffsetDateTime marsAgentExpiryDate() { - return this.marsAgentExpiryDate; - } - - /** - * Set the marsAgentExpiryDate property: MARS agent expiry date. - * - * @param marsAgentExpiryDate the marsAgentExpiryDate value to set. - * @return the MasterTargetServer object itself. - */ - public MasterTargetServer withMarsAgentExpiryDate(OffsetDateTime marsAgentExpiryDate) { - this.marsAgentExpiryDate = marsAgentExpiryDate; - return this; - } - - /** - * Get the agentVersionDetails property: Agent version details. - * - * @return the agentVersionDetails value. - */ - public VersionDetails agentVersionDetails() { - return this.agentVersionDetails; - } - - /** - * Set the agentVersionDetails property: Agent version details. - * - * @param agentVersionDetails the agentVersionDetails value to set. - * @return the MasterTargetServer object itself. - */ - public MasterTargetServer withAgentVersionDetails(VersionDetails agentVersionDetails) { - this.agentVersionDetails = agentVersionDetails; - return this; - } - - /** - * Get the marsAgentVersionDetails property: Mars agent version details. - * - * @return the marsAgentVersionDetails value. - */ - public VersionDetails marsAgentVersionDetails() { - return this.marsAgentVersionDetails; - } - - /** - * Set the marsAgentVersionDetails property: Mars agent version details. - * - * @param marsAgentVersionDetails the marsAgentVersionDetails value to set. - * @return the MasterTargetServer object itself. - */ - public MasterTargetServer withMarsAgentVersionDetails(VersionDetails marsAgentVersionDetails) { - this.marsAgentVersionDetails = marsAgentVersionDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (retentionVolumes() != null) { - retentionVolumes().forEach(e -> e.validate()); - } - if (dataStores() != null) { - dataStores().forEach(e -> e.validate()); - } - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - if (agentVersionDetails() != null) { - agentVersionDetails().validate(); - } - if (marsAgentVersionDetails() != null) { - marsAgentVersionDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeStringField("agentVersion", this.agentVersion); - jsonWriter.writeStringField("lastHeartbeat", - this.lastHeartbeat == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastHeartbeat)); - jsonWriter.writeStringField("versionStatus", this.versionStatus); - jsonWriter.writeArrayField("retentionVolumes", this.retentionVolumes, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("dataStores", this.dataStores, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("validationErrors", this.validationErrors, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("healthErrors", this.healthErrors, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeNumberField("diskCount", this.diskCount); - jsonWriter.writeStringField("osVersion", this.osVersion); - jsonWriter.writeStringField("agentExpiryDate", - this.agentExpiryDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.agentExpiryDate)); - jsonWriter.writeStringField("marsAgentVersion", this.marsAgentVersion); - jsonWriter.writeStringField("marsAgentExpiryDate", - this.marsAgentExpiryDate == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.marsAgentExpiryDate)); - jsonWriter.writeJsonField("agentVersionDetails", this.agentVersionDetails); - jsonWriter.writeJsonField("marsAgentVersionDetails", this.marsAgentVersionDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MasterTargetServer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MasterTargetServer if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the MasterTargetServer. - */ - public static MasterTargetServer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MasterTargetServer deserializedMasterTargetServer = new MasterTargetServer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedMasterTargetServer.id = reader.getString(); - } else if ("ipAddress".equals(fieldName)) { - deserializedMasterTargetServer.ipAddress = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedMasterTargetServer.name = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedMasterTargetServer.osType = reader.getString(); - } else if ("agentVersion".equals(fieldName)) { - deserializedMasterTargetServer.agentVersion = reader.getString(); - } else if ("lastHeartbeat".equals(fieldName)) { - deserializedMasterTargetServer.lastHeartbeat = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("versionStatus".equals(fieldName)) { - deserializedMasterTargetServer.versionStatus = reader.getString(); - } else if ("retentionVolumes".equals(fieldName)) { - List retentionVolumes - = reader.readArray(reader1 -> RetentionVolume.fromJson(reader1)); - deserializedMasterTargetServer.retentionVolumes = retentionVolumes; - } else if ("dataStores".equals(fieldName)) { - List dataStores = reader.readArray(reader1 -> DataStore.fromJson(reader1)); - deserializedMasterTargetServer.dataStores = dataStores; - } else if ("validationErrors".equals(fieldName)) { - List validationErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedMasterTargetServer.validationErrors = validationErrors; - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedMasterTargetServer.healthErrors = healthErrors; - } else if ("diskCount".equals(fieldName)) { - deserializedMasterTargetServer.diskCount = reader.getNullable(JsonReader::getInt); - } else if ("osVersion".equals(fieldName)) { - deserializedMasterTargetServer.osVersion = reader.getString(); - } else if ("agentExpiryDate".equals(fieldName)) { - deserializedMasterTargetServer.agentExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("marsAgentVersion".equals(fieldName)) { - deserializedMasterTargetServer.marsAgentVersion = reader.getString(); - } else if ("marsAgentExpiryDate".equals(fieldName)) { - deserializedMasterTargetServer.marsAgentExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("agentVersionDetails".equals(fieldName)) { - deserializedMasterTargetServer.agentVersionDetails = VersionDetails.fromJson(reader); - } else if ("marsAgentVersionDetails".equals(fieldName)) { - deserializedMasterTargetServer.marsAgentVersionDetails = VersionDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMasterTargetServer; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrateInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrateInput.java deleted file mode 100644 index cd452e6568fe..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrateInput.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input for migrate. - */ -@Fluent -public final class MigrateInput implements JsonSerializable { - /* - * Migrate input properties. - */ - private MigrateInputProperties properties; - - /** - * Creates an instance of MigrateInput class. - */ - public MigrateInput() { - } - - /** - * Get the properties property: Migrate input properties. - * - * @return the properties value. - */ - public MigrateInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Migrate input properties. - * - * @param properties the properties value to set. - * @return the MigrateInput object itself. - */ - public MigrateInput withProperties(MigrateInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model MigrateInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MigrateInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MigrateInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MigrateInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MigrateInput. - */ - public static MigrateInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MigrateInput deserializedMigrateInput = new MigrateInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedMigrateInput.properties = MigrateInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMigrateInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrateInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrateInputProperties.java deleted file mode 100644 index fcbdeae8d068..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrateInputProperties.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Migrate input properties. - */ -@Fluent -public final class MigrateInputProperties implements JsonSerializable { - /* - * The provider specific details. - */ - private MigrateProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of MigrateInputProperties class. - */ - public MigrateInputProperties() { - } - - /** - * Get the providerSpecificDetails property: The provider specific details. - * - * @return the providerSpecificDetails value. - */ - public MigrateProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: The provider specific details. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the MigrateInputProperties object itself. - */ - public MigrateInputProperties withProviderSpecificDetails(MigrateProviderSpecificInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property providerSpecificDetails in model MigrateInputProperties")); - } else { - providerSpecificDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MigrateInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MigrateInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MigrateInputProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MigrateInputProperties. - */ - public static MigrateInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MigrateInputProperties deserializedMigrateInputProperties = new MigrateInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificDetails".equals(fieldName)) { - deserializedMigrateInputProperties.providerSpecificDetails - = MigrateProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMigrateInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrateProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrateProviderSpecificInput.java deleted file mode 100644 index 8ee2b4b3dfed..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrateProviderSpecificInput.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Migrate provider specific input. - */ -@Immutable -public class MigrateProviderSpecificInput implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "MigrateProviderSpecificInput"; - - /** - * Creates an instance of MigrateProviderSpecificInput class. - */ - public MigrateProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MigrateProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MigrateProviderSpecificInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrateProviderSpecificInput. - */ - public static MigrateProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("VMwareCbt".equals(discriminatorValue)) { - return VMwareCbtMigrateInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static MigrateProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MigrateProviderSpecificInput deserializedMigrateProviderSpecificInput = new MigrateProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedMigrateProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMigrateProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationItem.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationItem.java deleted file mode 100644 index 3de8085df97f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationItem.java +++ /dev/null @@ -1,368 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationItemInner; - -/** - * An immutable client-side representation of MigrationItem. - */ -public interface MigrationItem { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The migration item properties. - * - * @return the properties value. - */ - MigrationItemProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationItemInner object. - * - * @return the inner object. - */ - MigrationItemInner innerModel(); - - /** - * The entirety of the MigrationItem definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The MigrationItem definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the MigrationItem definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the MigrationItem definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName, fabricName, protectionContainerName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @return the next definition stage. - */ - WithProperties withExistingReplicationProtectionContainer(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName); - } - - /** - * The stage of the MigrationItem definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Enable migration input properties.. - * - * @param properties Enable migration input properties. - * @return the next definition stage. - */ - WithCreate withProperties(EnableMigrationInputProperties properties); - } - - /** - * The stage of the MigrationItem definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - MigrationItem create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - MigrationItem create(Context context); - } - } - - /** - * Begins update for the MigrationItem resource. - * - * @return the stage of resource update. - */ - MigrationItem.Update update(); - - /** - * The template for MigrationItem update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - MigrationItem apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - MigrationItem apply(Context context); - } - - /** - * The MigrationItem update stages. - */ - interface UpdateStages { - /** - * The stage of the MigrationItem update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Update migration item input properties.. - * - * @param properties Update migration item input properties. - * @return the next definition stage. - */ - Update withProperties(UpdateMigrationItemInputProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - MigrationItem refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - MigrationItem refresh(Context context); - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param migrateInput Migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem migrate(MigrateInput migrateInput); - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param migrateInput Migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem migrate(MigrateInput migrateInput, Context context); - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param pauseReplicationInput Pause replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem pauseReplication(PauseReplicationInput pauseReplicationInput); - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param pauseReplicationInput Pause replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem pauseReplication(PauseReplicationInput pauseReplicationInput, Context context); - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resumeReplicationInput Resume replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem resumeReplication(ResumeReplicationInput resumeReplicationInput); - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resumeReplicationInput Resume replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem resumeReplication(ResumeReplicationInput resumeReplicationInput, Context context); - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param input Resync input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem resync(ResyncInput input); - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param input Resync input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem resync(ResyncInput input, Context context); - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param testMigrateInput Test migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem testMigrate(TestMigrateInput testMigrateInput); - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param testMigrateInput Test migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem testMigrate(TestMigrateInput testMigrateInput, Context context); - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param testMigrateCleanupInput Test migrate cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem testMigrateCleanup(TestMigrateCleanupInput testMigrateCleanupInput); - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param testMigrateCleanupInput Test migrate cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem testMigrateCleanup(TestMigrateCleanupInput testMigrateCleanupInput, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationItemCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationItemCollection.java deleted file mode 100644 index b07c2cb47f67..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationItemCollection.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationItemInner; -import java.io.IOException; -import java.util.List; - -/** - * Migration item collection. - */ -@Fluent -public final class MigrationItemCollection implements JsonSerializable { - /* - * The list of migration items. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of MigrationItemCollection class. - */ - public MigrationItemCollection() { - } - - /** - * Get the value property: The list of migration items. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of migration items. - * - * @param value the value value to set. - * @return the MigrationItemCollection object itself. - */ - public MigrationItemCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the MigrationItemCollection object itself. - */ - public MigrationItemCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MigrationItemCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MigrationItemCollection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationItemCollection. - */ - public static MigrationItemCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MigrationItemCollection deserializedMigrationItemCollection = new MigrationItemCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> MigrationItemInner.fromJson(reader1)); - deserializedMigrationItemCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedMigrationItemCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMigrationItemCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationItemOperation.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationItemOperation.java deleted file mode 100644 index 9a1f4df6be0d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationItemOperation.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for MigrationItemOperation. - */ -public final class MigrationItemOperation extends ExpandableStringEnum { - /** - * Static value DisableMigration for MigrationItemOperation. - */ - public static final MigrationItemOperation DISABLE_MIGRATION = fromString("DisableMigration"); - - /** - * Static value TestMigrate for MigrationItemOperation. - */ - public static final MigrationItemOperation TEST_MIGRATE = fromString("TestMigrate"); - - /** - * Static value TestMigrateCleanup for MigrationItemOperation. - */ - public static final MigrationItemOperation TEST_MIGRATE_CLEANUP = fromString("TestMigrateCleanup"); - - /** - * Static value Migrate for MigrationItemOperation. - */ - public static final MigrationItemOperation MIGRATE = fromString("Migrate"); - - /** - * Static value StartResync for MigrationItemOperation. - */ - public static final MigrationItemOperation START_RESYNC = fromString("StartResync"); - - /** - * Static value PauseReplication for MigrationItemOperation. - */ - public static final MigrationItemOperation PAUSE_REPLICATION = fromString("PauseReplication"); - - /** - * Static value ResumeReplication for MigrationItemOperation. - */ - public static final MigrationItemOperation RESUME_REPLICATION = fromString("ResumeReplication"); - - /** - * Creates a new instance of MigrationItemOperation value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MigrationItemOperation() { - } - - /** - * Creates or finds a MigrationItemOperation from its string representation. - * - * @param name a name to look for. - * @return the corresponding MigrationItemOperation. - */ - public static MigrationItemOperation fromString(String name) { - return fromString(name, MigrationItemOperation.class); - } - - /** - * Gets known MigrationItemOperation values. - * - * @return known MigrationItemOperation values. - */ - public static Collection values() { - return values(MigrationItemOperation.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationItemProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationItemProperties.java deleted file mode 100644 index 0eaaef25b8ae..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationItemProperties.java +++ /dev/null @@ -1,423 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Migration item properties. - */ -@Fluent -public final class MigrationItemProperties implements JsonSerializable { - /* - * The on-premise virtual machine name. - */ - private String machineName; - - /* - * The ARM Id of policy governing this item. - */ - private String policyId; - - /* - * The name of policy governing this item. - */ - private String policyFriendlyName; - - /* - * The recovery services provider ARM Id. - */ - private String recoveryServicesProviderId; - - /* - * The replication status. - */ - private String replicationStatus; - - /* - * The migration status. - */ - private MigrationState migrationState; - - /* - * The migration state description. - */ - private String migrationStateDescription; - - /* - * The last test migration time. - */ - private OffsetDateTime lastTestMigrationTime; - - /* - * The status of the last test migration. - */ - private String lastTestMigrationStatus; - - /* - * The last migration time. - */ - private OffsetDateTime lastMigrationTime; - - /* - * The status of the last migration. - */ - private String lastMigrationStatus; - - /* - * The test migrate state. - */ - private TestMigrationState testMigrateState; - - /* - * The test migrate state description. - */ - private String testMigrateStateDescription; - - /* - * The consolidated health. - */ - private ProtectionHealth health; - - /* - * The list of health errors. - */ - private List healthErrors; - - /* - * The allowed operations on the migration item based on the current migration state of the item. - */ - private List allowedOperations; - - /* - * The current job details. - */ - private CurrentJobDetails currentJob; - - /* - * The critical past job details. - */ - private List criticalJobHistory; - - /* - * The correlation Id for events associated with this migration item. - */ - private String eventCorrelationId; - - /* - * The migration provider custom settings. - */ - private MigrationProviderSpecificSettings providerSpecificDetails; - - /** - * Creates an instance of MigrationItemProperties class. - */ - public MigrationItemProperties() { - } - - /** - * Get the machineName property: The on-premise virtual machine name. - * - * @return the machineName value. - */ - public String machineName() { - return this.machineName; - } - - /** - * Get the policyId property: The ARM Id of policy governing this item. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Get the policyFriendlyName property: The name of policy governing this item. - * - * @return the policyFriendlyName value. - */ - public String policyFriendlyName() { - return this.policyFriendlyName; - } - - /** - * Get the recoveryServicesProviderId property: The recovery services provider ARM Id. - * - * @return the recoveryServicesProviderId value. - */ - public String recoveryServicesProviderId() { - return this.recoveryServicesProviderId; - } - - /** - * Get the replicationStatus property: The replication status. - * - * @return the replicationStatus value. - */ - public String replicationStatus() { - return this.replicationStatus; - } - - /** - * Get the migrationState property: The migration status. - * - * @return the migrationState value. - */ - public MigrationState migrationState() { - return this.migrationState; - } - - /** - * Get the migrationStateDescription property: The migration state description. - * - * @return the migrationStateDescription value. - */ - public String migrationStateDescription() { - return this.migrationStateDescription; - } - - /** - * Get the lastTestMigrationTime property: The last test migration time. - * - * @return the lastTestMigrationTime value. - */ - public OffsetDateTime lastTestMigrationTime() { - return this.lastTestMigrationTime; - } - - /** - * Get the lastTestMigrationStatus property: The status of the last test migration. - * - * @return the lastTestMigrationStatus value. - */ - public String lastTestMigrationStatus() { - return this.lastTestMigrationStatus; - } - - /** - * Get the lastMigrationTime property: The last migration time. - * - * @return the lastMigrationTime value. - */ - public OffsetDateTime lastMigrationTime() { - return this.lastMigrationTime; - } - - /** - * Get the lastMigrationStatus property: The status of the last migration. - * - * @return the lastMigrationStatus value. - */ - public String lastMigrationStatus() { - return this.lastMigrationStatus; - } - - /** - * Get the testMigrateState property: The test migrate state. - * - * @return the testMigrateState value. - */ - public TestMigrationState testMigrateState() { - return this.testMigrateState; - } - - /** - * Get the testMigrateStateDescription property: The test migrate state description. - * - * @return the testMigrateStateDescription value. - */ - public String testMigrateStateDescription() { - return this.testMigrateStateDescription; - } - - /** - * Get the health property: The consolidated health. - * - * @return the health value. - */ - public ProtectionHealth health() { - return this.health; - } - - /** - * Get the healthErrors property: The list of health errors. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Get the allowedOperations property: The allowed operations on the migration item based on the current migration - * state of the item. - * - * @return the allowedOperations value. - */ - public List allowedOperations() { - return this.allowedOperations; - } - - /** - * Get the currentJob property: The current job details. - * - * @return the currentJob value. - */ - public CurrentJobDetails currentJob() { - return this.currentJob; - } - - /** - * Get the criticalJobHistory property: The critical past job details. - * - * @return the criticalJobHistory value. - */ - public List criticalJobHistory() { - return this.criticalJobHistory; - } - - /** - * Get the eventCorrelationId property: The correlation Id for events associated with this migration item. - * - * @return the eventCorrelationId value. - */ - public String eventCorrelationId() { - return this.eventCorrelationId; - } - - /** - * Get the providerSpecificDetails property: The migration provider custom settings. - * - * @return the providerSpecificDetails value. - */ - public MigrationProviderSpecificSettings providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: The migration provider custom settings. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the MigrationItemProperties object itself. - */ - public MigrationItemProperties - withProviderSpecificDetails(MigrationProviderSpecificSettings providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - if (currentJob() != null) { - currentJob().validate(); - } - if (criticalJobHistory() != null) { - criticalJobHistory().forEach(e -> e.validate()); - } - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MigrationItemProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MigrationItemProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationItemProperties. - */ - public static MigrationItemProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MigrationItemProperties deserializedMigrationItemProperties = new MigrationItemProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("machineName".equals(fieldName)) { - deserializedMigrationItemProperties.machineName = reader.getString(); - } else if ("policyId".equals(fieldName)) { - deserializedMigrationItemProperties.policyId = reader.getString(); - } else if ("policyFriendlyName".equals(fieldName)) { - deserializedMigrationItemProperties.policyFriendlyName = reader.getString(); - } else if ("recoveryServicesProviderId".equals(fieldName)) { - deserializedMigrationItemProperties.recoveryServicesProviderId = reader.getString(); - } else if ("replicationStatus".equals(fieldName)) { - deserializedMigrationItemProperties.replicationStatus = reader.getString(); - } else if ("migrationState".equals(fieldName)) { - deserializedMigrationItemProperties.migrationState = MigrationState.fromString(reader.getString()); - } else if ("migrationStateDescription".equals(fieldName)) { - deserializedMigrationItemProperties.migrationStateDescription = reader.getString(); - } else if ("lastTestMigrationTime".equals(fieldName)) { - deserializedMigrationItemProperties.lastTestMigrationTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastTestMigrationStatus".equals(fieldName)) { - deserializedMigrationItemProperties.lastTestMigrationStatus = reader.getString(); - } else if ("lastMigrationTime".equals(fieldName)) { - deserializedMigrationItemProperties.lastMigrationTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastMigrationStatus".equals(fieldName)) { - deserializedMigrationItemProperties.lastMigrationStatus = reader.getString(); - } else if ("testMigrateState".equals(fieldName)) { - deserializedMigrationItemProperties.testMigrateState - = TestMigrationState.fromString(reader.getString()); - } else if ("testMigrateStateDescription".equals(fieldName)) { - deserializedMigrationItemProperties.testMigrateStateDescription = reader.getString(); - } else if ("health".equals(fieldName)) { - deserializedMigrationItemProperties.health = ProtectionHealth.fromString(reader.getString()); - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedMigrationItemProperties.healthErrors = healthErrors; - } else if ("allowedOperations".equals(fieldName)) { - List allowedOperations - = reader.readArray(reader1 -> MigrationItemOperation.fromString(reader1.getString())); - deserializedMigrationItemProperties.allowedOperations = allowedOperations; - } else if ("currentJob".equals(fieldName)) { - deserializedMigrationItemProperties.currentJob = CurrentJobDetails.fromJson(reader); - } else if ("criticalJobHistory".equals(fieldName)) { - List criticalJobHistory - = reader.readArray(reader1 -> CriticalJobHistoryDetails.fromJson(reader1)); - deserializedMigrationItemProperties.criticalJobHistory = criticalJobHistory; - } else if ("eventCorrelationId".equals(fieldName)) { - deserializedMigrationItemProperties.eventCorrelationId = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedMigrationItemProperties.providerSpecificDetails - = MigrationProviderSpecificSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMigrationItemProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationProviderSpecificSettings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationProviderSpecificSettings.java deleted file mode 100644 index d3147296cb53..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationProviderSpecificSettings.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Migration provider specific settings. - */ -@Immutable -public class MigrationProviderSpecificSettings implements JsonSerializable { - /* - * Gets the instance type. - */ - private String instanceType = "MigrationProviderSpecificSettings"; - - /** - * Creates an instance of MigrationProviderSpecificSettings class. - */ - public MigrationProviderSpecificSettings() { - } - - /** - * Get the instanceType property: Gets the instance type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MigrationProviderSpecificSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MigrationProviderSpecificSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationProviderSpecificSettings. - */ - public static MigrationProviderSpecificSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("VMwareCbt".equals(discriminatorValue)) { - return VMwareCbtMigrationDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static MigrationProviderSpecificSettings fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MigrationProviderSpecificSettings deserializedMigrationProviderSpecificSettings - = new MigrationProviderSpecificSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedMigrationProviderSpecificSettings.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMigrationProviderSpecificSettings; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPoint.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPoint.java deleted file mode 100644 index 2bd2df60e74e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPoint.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationRecoveryPointInner; - -/** - * An immutable client-side representation of MigrationRecoveryPoint. - */ -public interface MigrationRecoveryPoint { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Recovery point properties. - * - * @return the properties value. - */ - MigrationRecoveryPointProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationRecoveryPointInner - * object. - * - * @return the inner object. - */ - MigrationRecoveryPointInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPointCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPointCollection.java deleted file mode 100644 index 932bb718a82d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPointCollection.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationRecoveryPointInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of migration recovery points. - */ -@Fluent -public final class MigrationRecoveryPointCollection implements JsonSerializable { - /* - * The migration recovery point details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of MigrationRecoveryPointCollection class. - */ - public MigrationRecoveryPointCollection() { - } - - /** - * Get the value property: The migration recovery point details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The migration recovery point details. - * - * @param value the value value to set. - * @return the MigrationRecoveryPointCollection object itself. - */ - public MigrationRecoveryPointCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the MigrationRecoveryPointCollection object itself. - */ - public MigrationRecoveryPointCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MigrationRecoveryPointCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MigrationRecoveryPointCollection if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationRecoveryPointCollection. - */ - public static MigrationRecoveryPointCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MigrationRecoveryPointCollection deserializedMigrationRecoveryPointCollection - = new MigrationRecoveryPointCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> MigrationRecoveryPointInner.fromJson(reader1)); - deserializedMigrationRecoveryPointCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedMigrationRecoveryPointCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMigrationRecoveryPointCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPointProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPointProperties.java deleted file mode 100644 index fbd0c4f89f5c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPointProperties.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Migration item recovery point properties. - */ -@Immutable -public final class MigrationRecoveryPointProperties implements JsonSerializable { - /* - * The recovery point time. - */ - private OffsetDateTime recoveryPointTime; - - /* - * The recovery point type. - */ - private MigrationRecoveryPointType recoveryPointType; - - /** - * Creates an instance of MigrationRecoveryPointProperties class. - */ - public MigrationRecoveryPointProperties() { - } - - /** - * Get the recoveryPointTime property: The recovery point time. - * - * @return the recoveryPointTime value. - */ - public OffsetDateTime recoveryPointTime() { - return this.recoveryPointTime; - } - - /** - * Get the recoveryPointType property: The recovery point type. - * - * @return the recoveryPointType value. - */ - public MigrationRecoveryPointType recoveryPointType() { - return this.recoveryPointType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MigrationRecoveryPointProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MigrationRecoveryPointProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationRecoveryPointProperties. - */ - public static MigrationRecoveryPointProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MigrationRecoveryPointProperties deserializedMigrationRecoveryPointProperties - = new MigrationRecoveryPointProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryPointTime".equals(fieldName)) { - deserializedMigrationRecoveryPointProperties.recoveryPointTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("recoveryPointType".equals(fieldName)) { - deserializedMigrationRecoveryPointProperties.recoveryPointType - = MigrationRecoveryPointType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMigrationRecoveryPointProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPointType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPointType.java deleted file mode 100644 index 30c094b7e4f2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPointType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The recovery point type. - */ -public final class MigrationRecoveryPointType extends ExpandableStringEnum { - /** - * Static value NotSpecified for MigrationRecoveryPointType. - */ - public static final MigrationRecoveryPointType NOT_SPECIFIED = fromString("NotSpecified"); - - /** - * Static value ApplicationConsistent for MigrationRecoveryPointType. - */ - public static final MigrationRecoveryPointType APPLICATION_CONSISTENT = fromString("ApplicationConsistent"); - - /** - * Static value CrashConsistent for MigrationRecoveryPointType. - */ - public static final MigrationRecoveryPointType CRASH_CONSISTENT = fromString("CrashConsistent"); - - /** - * Creates a new instance of MigrationRecoveryPointType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MigrationRecoveryPointType() { - } - - /** - * Creates or finds a MigrationRecoveryPointType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MigrationRecoveryPointType. - */ - public static MigrationRecoveryPointType fromString(String name) { - return fromString(name, MigrationRecoveryPointType.class); - } - - /** - * Gets known MigrationRecoveryPointType values. - * - * @return known MigrationRecoveryPointType values. - */ - public static Collection values() { - return values(MigrationRecoveryPointType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPoints.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPoints.java deleted file mode 100644 index 7e82c618c9fe..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationRecoveryPoints.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of MigrationRecoveryPoints. - */ -public interface MigrationRecoveryPoints { - /** - * Gets the recovery points for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the recovery points for a migration item as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationMigrationItems(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName); - - /** - * Gets the recovery points for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the recovery points for a migration item as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationMigrationItems(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String migrationItemName, Context context); - - /** - * Gets a recovery point for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrationRecoveryPointName The migration recovery point name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recovery point for a migration item along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, String migrationRecoveryPointName, Context context); - - /** - * Gets a recovery point for a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrationRecoveryPointName The migration recovery point name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recovery point for a migration item. - */ - MigrationRecoveryPoint get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, String migrationRecoveryPointName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationState.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationState.java deleted file mode 100644 index f97c226228bf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MigrationState.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The migration status. - */ -public final class MigrationState extends ExpandableStringEnum { - /** - * Static value None for MigrationState. - */ - public static final MigrationState NONE = fromString("None"); - - /** - * Static value EnableMigrationInProgress for MigrationState. - */ - public static final MigrationState ENABLE_MIGRATION_IN_PROGRESS = fromString("EnableMigrationInProgress"); - - /** - * Static value EnableMigrationFailed for MigrationState. - */ - public static final MigrationState ENABLE_MIGRATION_FAILED = fromString("EnableMigrationFailed"); - - /** - * Static value DisableMigrationInProgress for MigrationState. - */ - public static final MigrationState DISABLE_MIGRATION_IN_PROGRESS = fromString("DisableMigrationInProgress"); - - /** - * Static value DisableMigrationFailed for MigrationState. - */ - public static final MigrationState DISABLE_MIGRATION_FAILED = fromString("DisableMigrationFailed"); - - /** - * Static value InitialSeedingInProgress for MigrationState. - */ - public static final MigrationState INITIAL_SEEDING_IN_PROGRESS = fromString("InitialSeedingInProgress"); - - /** - * Static value InitialSeedingFailed for MigrationState. - */ - public static final MigrationState INITIAL_SEEDING_FAILED = fromString("InitialSeedingFailed"); - - /** - * Static value Replicating for MigrationState. - */ - public static final MigrationState REPLICATING = fromString("Replicating"); - - /** - * Static value MigrationInProgress for MigrationState. - */ - public static final MigrationState MIGRATION_IN_PROGRESS = fromString("MigrationInProgress"); - - /** - * Static value MigrationSucceeded for MigrationState. - */ - public static final MigrationState MIGRATION_SUCCEEDED = fromString("MigrationSucceeded"); - - /** - * Static value MigrationFailed for MigrationState. - */ - public static final MigrationState MIGRATION_FAILED = fromString("MigrationFailed"); - - /** - * Static value ResumeInProgress for MigrationState. - */ - public static final MigrationState RESUME_IN_PROGRESS = fromString("ResumeInProgress"); - - /** - * Static value ResumeInitiated for MigrationState. - */ - public static final MigrationState RESUME_INITIATED = fromString("ResumeInitiated"); - - /** - * Static value SuspendingProtection for MigrationState. - */ - public static final MigrationState SUSPENDING_PROTECTION = fromString("SuspendingProtection"); - - /** - * Static value ProtectionSuspended for MigrationState. - */ - public static final MigrationState PROTECTION_SUSPENDED = fromString("ProtectionSuspended"); - - /** - * Static value MigrationCompletedWithInformation for MigrationState. - */ - public static final MigrationState MIGRATION_COMPLETED_WITH_INFORMATION - = fromString("MigrationCompletedWithInformation"); - - /** - * Static value MigrationPartiallySucceeded for MigrationState. - */ - public static final MigrationState MIGRATION_PARTIALLY_SUCCEEDED = fromString("MigrationPartiallySucceeded"); - - /** - * Creates a new instance of MigrationState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MigrationState() { - } - - /** - * Creates or finds a MigrationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding MigrationState. - */ - public static MigrationState fromString(String name) { - return fromString(name, MigrationState.class); - } - - /** - * Gets known MigrationState values. - * - * @return known MigrationState values. - */ - public static Collection values() { - return values(MigrationState.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MobilityAgentUpgradeState.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MobilityAgentUpgradeState.java deleted file mode 100644 index 4dd7b55ce510..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MobilityAgentUpgradeState.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The agent auto upgrade state. - */ -public final class MobilityAgentUpgradeState extends ExpandableStringEnum { - /** - * Static value None for MobilityAgentUpgradeState. - */ - public static final MobilityAgentUpgradeState NONE = fromString("None"); - - /** - * Static value Started for MobilityAgentUpgradeState. - */ - public static final MobilityAgentUpgradeState STARTED = fromString("Started"); - - /** - * Static value Completed for MobilityAgentUpgradeState. - */ - public static final MobilityAgentUpgradeState COMPLETED = fromString("Completed"); - - /** - * Static value Commit for MobilityAgentUpgradeState. - */ - public static final MobilityAgentUpgradeState COMMIT = fromString("Commit"); - - /** - * Creates a new instance of MobilityAgentUpgradeState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MobilityAgentUpgradeState() { - } - - /** - * Creates or finds a MobilityAgentUpgradeState from its string representation. - * - * @param name a name to look for. - * @return the corresponding MobilityAgentUpgradeState. - */ - public static MobilityAgentUpgradeState fromString(String name) { - return fromString(name, MobilityAgentUpgradeState.class); - } - - /** - * Gets known MobilityAgentUpgradeState values. - * - * @return known MobilityAgentUpgradeState values. - */ - public static Collection values() { - return values(MobilityAgentUpgradeState.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MobilityServiceUpdate.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MobilityServiceUpdate.java deleted file mode 100644 index b92e63c3fa7d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MobilityServiceUpdate.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Mobility Service update details. - */ -@Fluent -public final class MobilityServiceUpdate implements JsonSerializable { - /* - * The version of the latest update. - */ - private String version; - - /* - * The reboot status of the update - whether it is required or not. - */ - private String rebootStatus; - - /* - * The OS type. - */ - private String osType; - - /** - * Creates an instance of MobilityServiceUpdate class. - */ - public MobilityServiceUpdate() { - } - - /** - * Get the version property: The version of the latest update. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: 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 rebootStatus property: The reboot status of the update - whether it is required or not. - * - * @return the rebootStatus value. - */ - public String rebootStatus() { - return this.rebootStatus; - } - - /** - * Set the rebootStatus property: 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 osType property: The OS type. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("version", this.version); - jsonWriter.writeStringField("rebootStatus", this.rebootStatus); - jsonWriter.writeStringField("osType", this.osType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MobilityServiceUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MobilityServiceUpdate if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the MobilityServiceUpdate. - */ - public static MobilityServiceUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MobilityServiceUpdate deserializedMobilityServiceUpdate = new MobilityServiceUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("version".equals(fieldName)) { - deserializedMobilityServiceUpdate.version = reader.getString(); - } else if ("rebootStatus".equals(fieldName)) { - deserializedMobilityServiceUpdate.rebootStatus = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedMobilityServiceUpdate.osType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMobilityServiceUpdate; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MultiVmGroupCreateOption.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MultiVmGroupCreateOption.java deleted file mode 100644 index ba620c1873ed..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MultiVmGroupCreateOption.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether Multi VM group is auto created or specified by user. - */ -public final class MultiVmGroupCreateOption extends ExpandableStringEnum { - /** - * Static value AutoCreated for MultiVmGroupCreateOption. - */ - public static final MultiVmGroupCreateOption AUTO_CREATED = fromString("AutoCreated"); - - /** - * Static value UserSpecified for MultiVmGroupCreateOption. - */ - public static final MultiVmGroupCreateOption USER_SPECIFIED = fromString("UserSpecified"); - - /** - * Creates a new instance of MultiVmGroupCreateOption value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MultiVmGroupCreateOption() { - } - - /** - * Creates or finds a MultiVmGroupCreateOption from its string representation. - * - * @param name a name to look for. - * @return the corresponding MultiVmGroupCreateOption. - */ - public static MultiVmGroupCreateOption fromString(String name) { - return fromString(name, MultiVmGroupCreateOption.class); - } - - /** - * Gets known MultiVmGroupCreateOption values. - * - * @return known MultiVmGroupCreateOption values. - */ - public static Collection values() { - return values(MultiVmGroupCreateOption.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MultiVmSyncPointOption.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MultiVmSyncPointOption.java deleted file mode 100644 index dc8c0749dffa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/MultiVmSyncPointOption.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. - */ -public final class MultiVmSyncPointOption extends ExpandableStringEnum { - /** - * Static value UseMultiVmSyncRecoveryPoint for MultiVmSyncPointOption. - */ - public static final MultiVmSyncPointOption USE_MULTI_VM_SYNC_RECOVERY_POINT - = fromString("UseMultiVmSyncRecoveryPoint"); - - /** - * Static value UsePerVmRecoveryPoint for MultiVmSyncPointOption. - */ - public static final MultiVmSyncPointOption USE_PER_VM_RECOVERY_POINT = fromString("UsePerVmRecoveryPoint"); - - /** - * Creates a new instance of MultiVmSyncPointOption value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MultiVmSyncPointOption() { - } - - /** - * Creates or finds a MultiVmSyncPointOption from its string representation. - * - * @param name a name to look for. - * @return the corresponding MultiVmSyncPointOption. - */ - public static MultiVmSyncPointOption fromString(String name) { - return fromString(name, MultiVmSyncPointOption.class); - } - - /** - * Gets known MultiVmSyncPointOption values. - * - * @return known MultiVmSyncPointOption values. - */ - public static Collection values() { - return values(MultiVmSyncPointOption.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Network.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Network.java deleted file mode 100644 index 7dda676ad72b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Network.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkInner; - -/** - * An immutable client-side representation of Network. - */ -public interface Network { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The Network Properties. - * - * @return the properties value. - */ - NetworkProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkInner object. - * - * @return the inner object. - */ - NetworkInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkCollection.java deleted file mode 100644 index 2f1c08d28797..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkCollection.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkInner; -import java.io.IOException; -import java.util.List; - -/** - * List of networks. - */ -@Fluent -public final class NetworkCollection implements JsonSerializable { - /* - * The Networks list details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of NetworkCollection class. - */ - public NetworkCollection() { - } - - /** - * Get the value property: The Networks list details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The Networks list details. - * - * @param value the value value to set. - * @return the NetworkCollection object itself. - */ - public NetworkCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the NetworkCollection object itself. - */ - public NetworkCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkCollection. - */ - public static NetworkCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkCollection deserializedNetworkCollection = new NetworkCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> NetworkInner.fromJson(reader1)); - deserializedNetworkCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkMapping.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkMapping.java deleted file mode 100644 index a38333bc6927..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkMapping.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkMappingInner; - -/** - * An immutable client-side representation of NetworkMapping. - */ -public interface NetworkMapping { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The Network Mapping Properties. - * - * @return the properties value. - */ - NetworkMappingProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkMappingInner object. - * - * @return the inner object. - */ - NetworkMappingInner innerModel(); - - /** - * The entirety of the NetworkMapping definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The NetworkMapping definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the NetworkMapping definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the NetworkMapping definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName, fabricName, networkName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @return the next definition stage. - */ - WithProperties withExistingReplicationNetwork(String resourceName, String resourceGroupName, - String fabricName, String networkName); - } - - /** - * The stage of the NetworkMapping definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Input properties for creating network mapping.. - * - * @param properties Input properties for creating network mapping. - * @return the next definition stage. - */ - WithCreate withProperties(CreateNetworkMappingInputProperties properties); - } - - /** - * The stage of the NetworkMapping definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - NetworkMapping create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - NetworkMapping create(Context context); - } - } - - /** - * Begins update for the NetworkMapping resource. - * - * @return the stage of resource update. - */ - NetworkMapping.Update update(); - - /** - * The template for NetworkMapping update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - NetworkMapping apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - NetworkMapping apply(Context context); - } - - /** - * The NetworkMapping update stages. - */ - interface UpdateStages { - /** - * The stage of the NetworkMapping update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The input properties needed to update network mapping.. - * - * @param properties The input properties needed to update network mapping. - * @return the next definition stage. - */ - Update withProperties(UpdateNetworkMappingInputProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - NetworkMapping refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - NetworkMapping refresh(Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkMappingCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkMappingCollection.java deleted file mode 100644 index 7a0ec5007056..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkMappingCollection.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkMappingInner; -import java.io.IOException; -import java.util.List; - -/** - * List of network mappings. As with NetworkMapping, it should be possible to reuse a prev version of this class. It - * doesn't seem likely this class could be anything more than a slightly bespoke collection of NetworkMapping. Hence it - * makes sense to override Load with Base.NetworkMapping instead of existing CurrentVersion.NetworkMapping. - */ -@Fluent -public final class NetworkMappingCollection implements JsonSerializable { - /* - * The Network Mappings list. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of NetworkMappingCollection class. - */ - public NetworkMappingCollection() { - } - - /** - * Get the value property: The Network Mappings list. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The Network Mappings list. - * - * @param value the value value to set. - * @return the NetworkMappingCollection object itself. - */ - public NetworkMappingCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the NetworkMappingCollection object itself. - */ - public NetworkMappingCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkMappingCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkMappingCollection if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkMappingCollection. - */ - public static NetworkMappingCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkMappingCollection deserializedNetworkMappingCollection = new NetworkMappingCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> NetworkMappingInner.fromJson(reader1)); - deserializedNetworkMappingCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkMappingCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkMappingCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkMappingFabricSpecificSettings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkMappingFabricSpecificSettings.java deleted file mode 100644 index f706488bf922..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkMappingFabricSpecificSettings.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network Mapping fabric specific settings. - */ -@Immutable -public class NetworkMappingFabricSpecificSettings implements JsonSerializable { - /* - * Gets the Instance type. - */ - private String instanceType = "NetworkMappingFabricSpecificSettings"; - - /** - * Creates an instance of NetworkMappingFabricSpecificSettings class. - */ - public NetworkMappingFabricSpecificSettings() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkMappingFabricSpecificSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkMappingFabricSpecificSettings if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkMappingFabricSpecificSettings. - */ - public static NetworkMappingFabricSpecificSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureToAzure".equals(discriminatorValue)) { - return AzureToAzureNetworkMappingSettings.fromJson(readerToUse.reset()); - } else if ("VmmToAzure".equals(discriminatorValue)) { - return VmmToAzureNetworkMappingSettings.fromJson(readerToUse.reset()); - } else if ("VmmToVmm".equals(discriminatorValue)) { - return VmmToVmmNetworkMappingSettings.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static NetworkMappingFabricSpecificSettings fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkMappingFabricSpecificSettings deserializedNetworkMappingFabricSpecificSettings - = new NetworkMappingFabricSpecificSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedNetworkMappingFabricSpecificSettings.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkMappingFabricSpecificSettings; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkMappingProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkMappingProperties.java deleted file mode 100644 index 90be2267b499..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkMappingProperties.java +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network Mapping Properties. - */ -@Fluent -public final class NetworkMappingProperties implements JsonSerializable { - /* - * The pairing state for network mapping. - */ - private String state; - - /* - * The primary network friendly name. - */ - private String primaryNetworkFriendlyName; - - /* - * The primary network id for network mapping. - */ - private String primaryNetworkId; - - /* - * The primary fabric friendly name. - */ - private String primaryFabricFriendlyName; - - /* - * The recovery network friendly name. - */ - private String recoveryNetworkFriendlyName; - - /* - * The recovery network id for network mapping. - */ - private String recoveryNetworkId; - - /* - * The recovery fabric ARM id. - */ - private String recoveryFabricArmId; - - /* - * The recovery fabric friendly name. - */ - private String recoveryFabricFriendlyName; - - /* - * The fabric specific settings. - */ - private NetworkMappingFabricSpecificSettings fabricSpecificSettings; - - /** - * Creates an instance of NetworkMappingProperties class. - */ - public NetworkMappingProperties() { - } - - /** - * Get the state property: The pairing state for network mapping. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Set the state property: 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 primaryNetworkFriendlyName property: The primary network friendly name. - * - * @return the primaryNetworkFriendlyName value. - */ - public String primaryNetworkFriendlyName() { - return this.primaryNetworkFriendlyName; - } - - /** - * Set the primaryNetworkFriendlyName property: 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 primaryNetworkId property: The primary network id for network mapping. - * - * @return the primaryNetworkId value. - */ - public String primaryNetworkId() { - return this.primaryNetworkId; - } - - /** - * Set the primaryNetworkId property: 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 primaryFabricFriendlyName property: The primary fabric friendly name. - * - * @return the primaryFabricFriendlyName value. - */ - public String primaryFabricFriendlyName() { - return this.primaryFabricFriendlyName; - } - - /** - * Set the primaryFabricFriendlyName property: 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 recoveryNetworkFriendlyName property: The recovery network friendly name. - * - * @return the recoveryNetworkFriendlyName value. - */ - public String recoveryNetworkFriendlyName() { - return this.recoveryNetworkFriendlyName; - } - - /** - * Set the recoveryNetworkFriendlyName property: 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 recoveryNetworkId property: The recovery network id for network mapping. - * - * @return the recoveryNetworkId value. - */ - public String recoveryNetworkId() { - return this.recoveryNetworkId; - } - - /** - * Set the recoveryNetworkId property: 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 recoveryFabricArmId property: The recovery fabric ARM id. - * - * @return the recoveryFabricArmId value. - */ - public String recoveryFabricArmId() { - return this.recoveryFabricArmId; - } - - /** - * Set the recoveryFabricArmId property: 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 recoveryFabricFriendlyName property: The recovery fabric friendly name. - * - * @return the recoveryFabricFriendlyName value. - */ - public String recoveryFabricFriendlyName() { - return this.recoveryFabricFriendlyName; - } - - /** - * Set the recoveryFabricFriendlyName property: 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 fabricSpecificSettings property: The fabric specific settings. - * - * @return the fabricSpecificSettings value. - */ - public NetworkMappingFabricSpecificSettings fabricSpecificSettings() { - return this.fabricSpecificSettings; - } - - /** - * Set the fabricSpecificSettings property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fabricSpecificSettings() != null) { - fabricSpecificSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("state", this.state); - jsonWriter.writeStringField("primaryNetworkFriendlyName", this.primaryNetworkFriendlyName); - jsonWriter.writeStringField("primaryNetworkId", this.primaryNetworkId); - jsonWriter.writeStringField("primaryFabricFriendlyName", this.primaryFabricFriendlyName); - jsonWriter.writeStringField("recoveryNetworkFriendlyName", this.recoveryNetworkFriendlyName); - jsonWriter.writeStringField("recoveryNetworkId", this.recoveryNetworkId); - jsonWriter.writeStringField("recoveryFabricArmId", this.recoveryFabricArmId); - jsonWriter.writeStringField("recoveryFabricFriendlyName", this.recoveryFabricFriendlyName); - jsonWriter.writeJsonField("fabricSpecificSettings", this.fabricSpecificSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkMappingProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkMappingProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkMappingProperties. - */ - public static NetworkMappingProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkMappingProperties deserializedNetworkMappingProperties = new NetworkMappingProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("state".equals(fieldName)) { - deserializedNetworkMappingProperties.state = reader.getString(); - } else if ("primaryNetworkFriendlyName".equals(fieldName)) { - deserializedNetworkMappingProperties.primaryNetworkFriendlyName = reader.getString(); - } else if ("primaryNetworkId".equals(fieldName)) { - deserializedNetworkMappingProperties.primaryNetworkId = reader.getString(); - } else if ("primaryFabricFriendlyName".equals(fieldName)) { - deserializedNetworkMappingProperties.primaryFabricFriendlyName = reader.getString(); - } else if ("recoveryNetworkFriendlyName".equals(fieldName)) { - deserializedNetworkMappingProperties.recoveryNetworkFriendlyName = reader.getString(); - } else if ("recoveryNetworkId".equals(fieldName)) { - deserializedNetworkMappingProperties.recoveryNetworkId = reader.getString(); - } else if ("recoveryFabricArmId".equals(fieldName)) { - deserializedNetworkMappingProperties.recoveryFabricArmId = reader.getString(); - } else if ("recoveryFabricFriendlyName".equals(fieldName)) { - deserializedNetworkMappingProperties.recoveryFabricFriendlyName = reader.getString(); - } else if ("fabricSpecificSettings".equals(fieldName)) { - deserializedNetworkMappingProperties.fabricSpecificSettings - = NetworkMappingFabricSpecificSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkMappingProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkProperties.java deleted file mode 100644 index dd2041cd5861..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NetworkProperties.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Network Properties. - */ -@Fluent -public final class NetworkProperties implements JsonSerializable { - /* - * The Fabric Type. - */ - private String fabricType; - - /* - * The List of subnets. - */ - private List subnets; - - /* - * The Friendly Name. - */ - private String friendlyName; - - /* - * The Network Type. - */ - private String networkType; - - /** - * Creates an instance of NetworkProperties class. - */ - public NetworkProperties() { - } - - /** - * Get the fabricType property: The Fabric Type. - * - * @return the fabricType value. - */ - public String fabricType() { - return this.fabricType; - } - - /** - * Set the fabricType property: 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 subnets property: The List of subnets. - * - * @return the subnets value. - */ - public List subnets() { - return this.subnets; - } - - /** - * Set the subnets property: 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 friendlyName property: The Friendly Name. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 networkType property: The Network Type. - * - * @return the networkType value. - */ - public String networkType() { - return this.networkType; - } - - /** - * Set the networkType property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (subnets() != null) { - subnets().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fabricType", this.fabricType); - jsonWriter.writeArrayField("subnets", this.subnets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("networkType", this.networkType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkProperties. - */ - public static NetworkProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkProperties deserializedNetworkProperties = new NetworkProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fabricType".equals(fieldName)) { - deserializedNetworkProperties.fabricType = reader.getString(); - } else if ("subnets".equals(fieldName)) { - List subnets = reader.readArray(reader1 -> Subnet.fromJson(reader1)); - deserializedNetworkProperties.subnets = subnets; - } else if ("friendlyName".equals(fieldName)) { - deserializedNetworkProperties.friendlyName = reader.getString(); - } else if ("networkType".equals(fieldName)) { - deserializedNetworkProperties.networkType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NewProtectionProfile.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NewProtectionProfile.java deleted file mode 100644 index 1602377f8dd1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NewProtectionProfile.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * New Protection profile input. - */ -@Fluent -public final class NewProtectionProfile extends ProtectionProfileCustomDetails { - /* - * The class type. - */ - private String resourceType = "New"; - - /* - * The protection profile input. - */ - private String policyName; - - /* - * The duration in minutes until which the recovery points need to be stored. - */ - private Integer recoveryPointHistory; - - /* - * The crash consistent snapshot frequency (in minutes). - */ - private Integer crashConsistentFrequencyInMinutes; - - /* - * The app consistent snapshot frequency (in minutes). - */ - private Integer appConsistentFrequencyInMinutes; - - /* - * A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. - */ - private SetMultiVmSyncStatus multiVmSyncStatus; - - /** - * Creates an instance of NewProtectionProfile class. - */ - public NewProtectionProfile() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - @Override - public String resourceType() { - return this.resourceType; - } - - /** - * Get the policyName property: The protection profile input. - * - * @return the policyName value. - */ - public String policyName() { - return this.policyName; - } - - /** - * Set the policyName property: The protection profile input. - * - * @param policyName the policyName value to set. - * @return the NewProtectionProfile object itself. - */ - public NewProtectionProfile withPolicyName(String policyName) { - this.policyName = policyName; - return this; - } - - /** - * Get the recoveryPointHistory property: 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 recoveryPointHistory property: The duration in minutes until which the recovery points need to be stored. - * - * @param recoveryPointHistory the recoveryPointHistory value to set. - * @return the NewProtectionProfile object itself. - */ - public NewProtectionProfile withRecoveryPointHistory(Integer recoveryPointHistory) { - this.recoveryPointHistory = recoveryPointHistory; - return this; - } - - /** - * Get the crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency (in minutes). - * - * @return the crashConsistentFrequencyInMinutes value. - */ - public Integer crashConsistentFrequencyInMinutes() { - return this.crashConsistentFrequencyInMinutes; - } - - /** - * Set the crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency (in minutes). - * - * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set. - * @return the NewProtectionProfile object itself. - */ - public NewProtectionProfile withCrashConsistentFrequencyInMinutes(Integer crashConsistentFrequencyInMinutes) { - this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - return this; - } - - /** - * Get the appConsistentFrequencyInMinutes property: The app consistent snapshot frequency (in minutes). - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: The app consistent snapshot frequency (in minutes). - * - * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set. - * @return the NewProtectionProfile object itself. - */ - public NewProtectionProfile withAppConsistentFrequencyInMinutes(Integer appConsistentFrequencyInMinutes) { - this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - return this; - } - - /** - * Get the multiVmSyncStatus property: A value indicating whether multi-VM sync has to be enabled. Value should be - * 'Enabled' or 'Disabled'. - * - * @return the multiVmSyncStatus value. - */ - public SetMultiVmSyncStatus multiVmSyncStatus() { - return this.multiVmSyncStatus; - } - - /** - * Set the multiVmSyncStatus property: A value indicating whether multi-VM sync has to be enabled. Value should be - * 'Enabled' or 'Disabled'. - * - * @param multiVmSyncStatus the multiVmSyncStatus value to set. - * @return the NewProtectionProfile object itself. - */ - public NewProtectionProfile withMultiVmSyncStatus(SetMultiVmSyncStatus multiVmSyncStatus) { - this.multiVmSyncStatus = multiVmSyncStatus; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (policyName() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property policyName in model NewProtectionProfile")); - } - if (multiVmSyncStatus() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property multiVmSyncStatus in model NewProtectionProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NewProtectionProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("policyName", this.policyName); - jsonWriter.writeStringField("multiVmSyncStatus", - this.multiVmSyncStatus == null ? null : this.multiVmSyncStatus.toString()); - jsonWriter.writeStringField("resourceType", this.resourceType); - jsonWriter.writeNumberField("recoveryPointHistory", this.recoveryPointHistory); - jsonWriter.writeNumberField("crashConsistentFrequencyInMinutes", this.crashConsistentFrequencyInMinutes); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NewProtectionProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NewProtectionProfile if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NewProtectionProfile. - */ - public static NewProtectionProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NewProtectionProfile deserializedNewProtectionProfile = new NewProtectionProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("policyName".equals(fieldName)) { - deserializedNewProtectionProfile.policyName = reader.getString(); - } else if ("multiVmSyncStatus".equals(fieldName)) { - deserializedNewProtectionProfile.multiVmSyncStatus - = SetMultiVmSyncStatus.fromString(reader.getString()); - } else if ("resourceType".equals(fieldName)) { - deserializedNewProtectionProfile.resourceType = reader.getString(); - } else if ("recoveryPointHistory".equals(fieldName)) { - deserializedNewProtectionProfile.recoveryPointHistory = reader.getNullable(JsonReader::getInt); - } else if ("crashConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedNewProtectionProfile.crashConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedNewProtectionProfile.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedNewProtectionProfile; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NewRecoveryVirtualNetwork.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NewRecoveryVirtualNetwork.java deleted file mode 100644 index 5500ada284a1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/NewRecoveryVirtualNetwork.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery virtual network input to create new virtual network from given source network. - */ -@Fluent -public final class NewRecoveryVirtualNetwork extends RecoveryVirtualNetworkCustomDetails { - /* - * The class type. - */ - private String resourceType = "New"; - - /* - * The name of the resource group to be used to create the recovery virtual network. If absent, target network would - * be created in the same resource group as target VM. - */ - private String recoveryVirtualNetworkResourceGroupName; - - /* - * The recovery virtual network name. - */ - private String recoveryVirtualNetworkName; - - /** - * Creates an instance of NewRecoveryVirtualNetwork class. - */ - public NewRecoveryVirtualNetwork() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - @Override - public String resourceType() { - return this.resourceType; - } - - /** - * Get the recoveryVirtualNetworkResourceGroupName property: The name of the resource group to be used to create the - * recovery virtual network. If absent, target network would be created in the same resource group as target VM. - * - * @return the recoveryVirtualNetworkResourceGroupName value. - */ - public String recoveryVirtualNetworkResourceGroupName() { - return this.recoveryVirtualNetworkResourceGroupName; - } - - /** - * Set the recoveryVirtualNetworkResourceGroupName property: The name of the resource group to be used to create the - * recovery virtual network. If absent, target network would be created in the same resource group as target VM. - * - * @param recoveryVirtualNetworkResourceGroupName the recoveryVirtualNetworkResourceGroupName value to set. - * @return the NewRecoveryVirtualNetwork object itself. - */ - public NewRecoveryVirtualNetwork - withRecoveryVirtualNetworkResourceGroupName(String recoveryVirtualNetworkResourceGroupName) { - this.recoveryVirtualNetworkResourceGroupName = recoveryVirtualNetworkResourceGroupName; - return this; - } - - /** - * Get the recoveryVirtualNetworkName property: The recovery virtual network name. - * - * @return the recoveryVirtualNetworkName value. - */ - public String recoveryVirtualNetworkName() { - return this.recoveryVirtualNetworkName; - } - - /** - * Set the recoveryVirtualNetworkName property: The recovery virtual network name. - * - * @param recoveryVirtualNetworkName the recoveryVirtualNetworkName value to set. - * @return the NewRecoveryVirtualNetwork object itself. - */ - public NewRecoveryVirtualNetwork withRecoveryVirtualNetworkName(String recoveryVirtualNetworkName) { - this.recoveryVirtualNetworkName = recoveryVirtualNetworkName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceType", this.resourceType); - jsonWriter.writeStringField("recoveryVirtualNetworkResourceGroupName", - this.recoveryVirtualNetworkResourceGroupName); - jsonWriter.writeStringField("recoveryVirtualNetworkName", this.recoveryVirtualNetworkName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NewRecoveryVirtualNetwork from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NewRecoveryVirtualNetwork if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NewRecoveryVirtualNetwork. - */ - public static NewRecoveryVirtualNetwork fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NewRecoveryVirtualNetwork deserializedNewRecoveryVirtualNetwork = new NewRecoveryVirtualNetwork(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceType".equals(fieldName)) { - deserializedNewRecoveryVirtualNetwork.resourceType = reader.getString(); - } else if ("recoveryVirtualNetworkResourceGroupName".equals(fieldName)) { - deserializedNewRecoveryVirtualNetwork.recoveryVirtualNetworkResourceGroupName = reader.getString(); - } else if ("recoveryVirtualNetworkName".equals(fieldName)) { - deserializedNewRecoveryVirtualNetwork.recoveryVirtualNetworkName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNewRecoveryVirtualNetwork; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OSDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OSDetails.java deleted file mode 100644 index a859e5eeb62a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OSDetails.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Disk Details. - */ -@Fluent -public final class OSDetails implements JsonSerializable { - /* - * VM Disk details. - */ - private String osType; - - /* - * Product type. - */ - private String productType; - - /* - * The OSEdition. - */ - private String osEdition; - - /* - * The OS Version. - */ - private String oSVersion; - - /* - * The OS Major Version. - */ - private String oSMajorVersion; - - /* - * The OS Minor Version. - */ - private String oSMinorVersion; - - /** - * Creates an instance of OSDetails class. - */ - public OSDetails() { - } - - /** - * Get the osType property: VM Disk details. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: 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 the productType property: Product type. - * - * @return the productType value. - */ - public String productType() { - return this.productType; - } - - /** - * Set the productType property: 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 property: The OSEdition. - * - * @return the osEdition value. - */ - public String osEdition() { - return this.osEdition; - } - - /** - * Set the osEdition property: 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 oSVersion property: The OS Version. - * - * @return the oSVersion value. - */ - public String oSVersion() { - return this.oSVersion; - } - - /** - * Set the oSVersion property: 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 oSMajorVersion property: The OS Major Version. - * - * @return the oSMajorVersion value. - */ - public String oSMajorVersion() { - return this.oSMajorVersion; - } - - /** - * Set the oSMajorVersion property: 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 oSMinorVersion property: The OS Minor Version. - * - * @return the oSMinorVersion value. - */ - public String oSMinorVersion() { - return this.oSMinorVersion; - } - - /** - * Set the oSMinorVersion property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeStringField("productType", this.productType); - jsonWriter.writeStringField("osEdition", this.osEdition); - jsonWriter.writeStringField("oSVersion", this.oSVersion); - jsonWriter.writeStringField("oSMajorVersion", this.oSMajorVersion); - jsonWriter.writeStringField("oSMinorVersion", this.oSMinorVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OSDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OSDetails if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the OSDetails. - */ - public static OSDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OSDetails deserializedOSDetails = new OSDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("osType".equals(fieldName)) { - deserializedOSDetails.osType = reader.getString(); - } else if ("productType".equals(fieldName)) { - deserializedOSDetails.productType = reader.getString(); - } else if ("osEdition".equals(fieldName)) { - deserializedOSDetails.osEdition = reader.getString(); - } else if ("oSVersion".equals(fieldName)) { - deserializedOSDetails.oSVersion = reader.getString(); - } else if ("oSMajorVersion".equals(fieldName)) { - deserializedOSDetails.oSMajorVersion = reader.getString(); - } else if ("oSMinorVersion".equals(fieldName)) { - deserializedOSDetails.oSMinorVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOSDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OSDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OSDiskDetails.java deleted file mode 100644 index 49da732e082d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OSDiskDetails.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details of the OS Disk. - */ -@Fluent -public final class OSDiskDetails implements JsonSerializable { - /* - * The id of the disk containing the OS. - */ - private String osVhdId; - - /* - * The type of the OS on the VM. - */ - private String osType; - - /* - * The OS disk VHD name. - */ - private String vhdName; - - /** - * Creates an instance of OSDiskDetails class. - */ - public OSDiskDetails() { - } - - /** - * Get the osVhdId property: The id of the disk containing the OS. - * - * @return the osVhdId value. - */ - public String osVhdId() { - return this.osVhdId; - } - - /** - * Set the osVhdId property: 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 osType property: The type of the OS on the VM. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: 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 vhdName property: The OS disk VHD name. - * - * @return the vhdName value. - */ - public String vhdName() { - return this.vhdName; - } - - /** - * Set the vhdName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("osVhdId", this.osVhdId); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeStringField("vhdName", this.vhdName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OSDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OSDiskDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OSDiskDetails. - */ - public static OSDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OSDiskDetails deserializedOSDiskDetails = new OSDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("osVhdId".equals(fieldName)) { - deserializedOSDiskDetails.osVhdId = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedOSDiskDetails.osType = reader.getString(); - } else if ("vhdName".equals(fieldName)) { - deserializedOSDiskDetails.vhdName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOSDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OSUpgradeSupportedVersions.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OSUpgradeSupportedVersions.java deleted file mode 100644 index 8a17b2763c30..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OSUpgradeSupportedVersions.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Supported OS upgrade versions. - */ -@Immutable -public final class OSUpgradeSupportedVersions implements JsonSerializable { - /* - * The source OS version name. - */ - private String supportedSourceOsVersion; - - /* - * The target OS version names. - */ - private List supportedTargetOsVersions; - - /** - * Creates an instance of OSUpgradeSupportedVersions class. - */ - public OSUpgradeSupportedVersions() { - } - - /** - * Get the supportedSourceOsVersion property: The source OS version name. - * - * @return the supportedSourceOsVersion value. - */ - public String supportedSourceOsVersion() { - return this.supportedSourceOsVersion; - } - - /** - * Get the supportedTargetOsVersions property: The target OS version names. - * - * @return the supportedTargetOsVersions value. - */ - public List supportedTargetOsVersions() { - return this.supportedTargetOsVersions; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OSUpgradeSupportedVersions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OSUpgradeSupportedVersions if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OSUpgradeSupportedVersions. - */ - public static OSUpgradeSupportedVersions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OSUpgradeSupportedVersions deserializedOSUpgradeSupportedVersions = new OSUpgradeSupportedVersions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("supportedSourceOsVersion".equals(fieldName)) { - deserializedOSUpgradeSupportedVersions.supportedSourceOsVersion = reader.getString(); - } else if ("supportedTargetOsVersions".equals(fieldName)) { - List supportedTargetOsVersions = reader.readArray(reader1 -> reader1.getString()); - deserializedOSUpgradeSupportedVersions.supportedTargetOsVersions = supportedTargetOsVersions; - } else { - reader.skipChildren(); - } - } - - return deserializedOSUpgradeSupportedVersions; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OSVersionWrapper.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OSVersionWrapper.java deleted file mode 100644 index 842a6e0e3b04..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OSVersionWrapper.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Wrapper model for OSVersion to include version and service pack info. - */ -@Fluent -public final class OSVersionWrapper implements JsonSerializable { - /* - * The version. - */ - private String version; - - /* - * The service pack. - */ - private String servicePack; - - /** - * Creates an instance of OSVersionWrapper class. - */ - public OSVersionWrapper() { - } - - /** - * Get the version property: The version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The version. - * - * @param version the version value to set. - * @return the OSVersionWrapper object itself. - */ - public OSVersionWrapper withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the servicePack property: The service pack. - * - * @return the servicePack value. - */ - public String servicePack() { - return this.servicePack; - } - - /** - * Set the servicePack property: The service pack. - * - * @param servicePack the servicePack value to set. - * @return the OSVersionWrapper object itself. - */ - public OSVersionWrapper withServicePack(String servicePack) { - this.servicePack = servicePack; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("version", this.version); - jsonWriter.writeStringField("servicePack", this.servicePack); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OSVersionWrapper from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OSVersionWrapper if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OSVersionWrapper. - */ - public static OSVersionWrapper fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OSVersionWrapper deserializedOSVersionWrapper = new OSVersionWrapper(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("version".equals(fieldName)) { - deserializedOSVersionWrapper.version = reader.getString(); - } else if ("servicePack".equals(fieldName)) { - deserializedOSVersionWrapper.servicePack = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOSVersionWrapper; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Operations.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Operations.java deleted file mode 100644 index 184ee29849a9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Operations.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of Operations. - */ -public interface Operations { - /** - * Returns the list of available operations. - * - * Operation to return the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Returns the list of available operations. - * - * Operation to return the list of available operations. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OperationsDiscovery.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OperationsDiscovery.java deleted file mode 100644 index f1961e6fe7d2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OperationsDiscovery.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.OperationsDiscoveryInner; - -/** - * An immutable client-side representation of OperationsDiscovery. - */ -public interface OperationsDiscovery { - /** - * Gets the name property: 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. - */ - String name(); - - /** - * Gets the display property: Object type. - * - * @return the display value. - */ - Display display(); - - /** - * Gets the origin property: 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. - */ - String origin(); - - /** - * Gets the properties property: Properties. Reserved for future use. - * - * @return the properties value. - */ - Object properties(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.OperationsDiscoveryInner - * object. - * - * @return the inner object. - */ - OperationsDiscoveryInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OperationsDiscoveryCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OperationsDiscoveryCollection.java deleted file mode 100644 index fee8f8323c45..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/OperationsDiscoveryCollection.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.OperationsDiscoveryInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of ClientDiscovery details. - */ -@Fluent -public final class OperationsDiscoveryCollection implements JsonSerializable { - /* - * The ClientDiscovery details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of OperationsDiscoveryCollection class. - */ - public OperationsDiscoveryCollection() { - } - - /** - * Get the value property: The ClientDiscovery details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The ClientDiscovery details. - * - * @param value the value value to set. - * @return the OperationsDiscoveryCollection object itself. - */ - public OperationsDiscoveryCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the OperationsDiscoveryCollection object itself. - */ - public OperationsDiscoveryCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationsDiscoveryCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationsDiscoveryCollection if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationsDiscoveryCollection. - */ - public static OperationsDiscoveryCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationsDiscoveryCollection deserializedOperationsDiscoveryCollection - = new OperationsDiscoveryCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OperationsDiscoveryInner.fromJson(reader1)); - deserializedOperationsDiscoveryCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationsDiscoveryCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationsDiscoveryCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PauseReplicationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PauseReplicationInput.java deleted file mode 100644 index 6e4b64e16bf7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PauseReplicationInput.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Pause replication input. - */ -@Fluent -public final class PauseReplicationInput implements JsonSerializable { - /* - * Pause replication input properties. - */ - private PauseReplicationInputProperties properties; - - /** - * Creates an instance of PauseReplicationInput class. - */ - public PauseReplicationInput() { - } - - /** - * Get the properties property: Pause replication input properties. - * - * @return the properties value. - */ - public PauseReplicationInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Pause replication input properties. - * - * @param properties the properties value to set. - * @return the PauseReplicationInput object itself. - */ - public PauseReplicationInput withProperties(PauseReplicationInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model PauseReplicationInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PauseReplicationInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PauseReplicationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PauseReplicationInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PauseReplicationInput. - */ - public static PauseReplicationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PauseReplicationInput deserializedPauseReplicationInput = new PauseReplicationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedPauseReplicationInput.properties = PauseReplicationInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPauseReplicationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PauseReplicationInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PauseReplicationInputProperties.java deleted file mode 100644 index c464efc373a5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PauseReplicationInputProperties.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Pause replication input properties. - */ -@Fluent -public final class PauseReplicationInputProperties implements JsonSerializable { - /* - * The class type. - */ - private String instanceType; - - /** - * Creates an instance of PauseReplicationInputProperties class. - */ - public PauseReplicationInputProperties() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Set the instanceType property: The class type. - * - * @param instanceType the instanceType value to set. - * @return the PauseReplicationInputProperties object itself. - */ - public PauseReplicationInputProperties withInstanceType(String instanceType) { - this.instanceType = instanceType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (instanceType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property instanceType in model PauseReplicationInputProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PauseReplicationInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PauseReplicationInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PauseReplicationInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PauseReplicationInputProperties. - */ - public static PauseReplicationInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PauseReplicationInputProperties deserializedPauseReplicationInputProperties - = new PauseReplicationInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedPauseReplicationInputProperties.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPauseReplicationInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PlannedFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PlannedFailoverInput.java deleted file mode 100644 index 3d21a8092945..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PlannedFailoverInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input definition for planned failover. - */ -@Fluent -public final class PlannedFailoverInput implements JsonSerializable { - /* - * Planned failover input properties. - */ - private PlannedFailoverInputProperties properties; - - /** - * Creates an instance of PlannedFailoverInput class. - */ - public PlannedFailoverInput() { - } - - /** - * Get the properties property: Planned failover input properties. - * - * @return the properties value. - */ - public PlannedFailoverInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PlannedFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PlannedFailoverInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the PlannedFailoverInput. - */ - public static PlannedFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PlannedFailoverInput deserializedPlannedFailoverInput = new PlannedFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedPlannedFailoverInput.properties = PlannedFailoverInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPlannedFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PlannedFailoverInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PlannedFailoverInputProperties.java deleted file mode 100644 index f91b4fb3bf81..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PlannedFailoverInputProperties.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input definition for planned failover input properties. - */ -@Fluent -public final class PlannedFailoverInputProperties implements JsonSerializable { - /* - * Failover direction. - */ - private String failoverDirection; - - /* - * Provider specific settings. - */ - private PlannedFailoverProviderSpecificFailoverInput providerSpecificDetails; - - /** - * Creates an instance of PlannedFailoverInputProperties class. - */ - public PlannedFailoverInputProperties() { - } - - /** - * Get the failoverDirection property: Failover direction. - * - * @return the failoverDirection value. - */ - public String failoverDirection() { - return this.failoverDirection; - } - - /** - * Set the failoverDirection property: 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 the providerSpecificDetails property: Provider specific settings. - * - * @return the providerSpecificDetails value. - */ - public PlannedFailoverProviderSpecificFailoverInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: Provider specific settings. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the PlannedFailoverInputProperties object itself. - */ - public PlannedFailoverInputProperties - withProviderSpecificDetails(PlannedFailoverProviderSpecificFailoverInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("failoverDirection", this.failoverDirection); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PlannedFailoverInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PlannedFailoverInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PlannedFailoverInputProperties. - */ - public static PlannedFailoverInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PlannedFailoverInputProperties deserializedPlannedFailoverInputProperties - = new PlannedFailoverInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("failoverDirection".equals(fieldName)) { - deserializedPlannedFailoverInputProperties.failoverDirection = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedPlannedFailoverInputProperties.providerSpecificDetails - = PlannedFailoverProviderSpecificFailoverInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPlannedFailoverInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PlannedFailoverProviderSpecificFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PlannedFailoverProviderSpecificFailoverInput.java deleted file mode 100644 index b8590fc164b6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PlannedFailoverProviderSpecificFailoverInput.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific failover input. - */ -@Immutable -public class PlannedFailoverProviderSpecificFailoverInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "PlannedFailoverProviderSpecificFailoverInput"; - - /** - * Creates an instance of PlannedFailoverProviderSpecificFailoverInput class. - */ - public PlannedFailoverProviderSpecificFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PlannedFailoverProviderSpecificFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PlannedFailoverProviderSpecificFailoverInput if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PlannedFailoverProviderSpecificFailoverInput. - */ - public static PlannedFailoverProviderSpecificFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("HyperVReplicaAzureFailback".equals(discriminatorValue)) { - return HyperVReplicaAzureFailbackProviderInput.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzure".equals(discriminatorValue)) { - return HyperVReplicaAzurePlannedFailoverProviderInput.fromJson(readerToUse.reset()); - } else if ("InMageRcmFailback".equals(discriminatorValue)) { - return InMageRcmFailbackPlannedFailoverProviderInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static PlannedFailoverProviderSpecificFailoverInput fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - PlannedFailoverProviderSpecificFailoverInput deserializedPlannedFailoverProviderSpecificFailoverInput - = new PlannedFailoverProviderSpecificFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedPlannedFailoverProviderSpecificFailoverInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPlannedFailoverProviderSpecificFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PlannedFailoverStatus.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PlannedFailoverStatus.java deleted file mode 100644 index 22dff6d15a67..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PlannedFailoverStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The last planned failover status. - */ -public final class PlannedFailoverStatus extends ExpandableStringEnum { - /** - * Static value Succeeded for PlannedFailoverStatus. - */ - public static final PlannedFailoverStatus SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for PlannedFailoverStatus. - */ - public static final PlannedFailoverStatus FAILED = fromString("Failed"); - - /** - * Static value Cancelled for PlannedFailoverStatus. - */ - public static final PlannedFailoverStatus CANCELLED = fromString("Cancelled"); - - /** - * Static value Unknown for PlannedFailoverStatus. - */ - public static final PlannedFailoverStatus UNKNOWN = fromString("Unknown"); - - /** - * Creates a new instance of PlannedFailoverStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PlannedFailoverStatus() { - } - - /** - * Creates or finds a PlannedFailoverStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PlannedFailoverStatus. - */ - public static PlannedFailoverStatus fromString(String name) { - return fromString(name, PlannedFailoverStatus.class); - } - - /** - * Gets known PlannedFailoverStatus values. - * - * @return known PlannedFailoverStatus values. - */ - public static Collection values() { - return values(PlannedFailoverStatus.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Policy.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Policy.java deleted file mode 100644 index f4577ad2eb8b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Policy.java +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.PolicyInner; - -/** - * An immutable client-side representation of Policy. - */ -public interface Policy { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The custom data. - * - * @return the properties value. - */ - PolicyProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.PolicyInner object. - * - * @return the inner object. - */ - PolicyInner innerModel(); - - /** - * The entirety of the Policy definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Policy definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Policy definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Policy definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @return the next definition stage. - */ - WithCreate withExistingVault(String resourceName, String resourceGroupName); - } - - /** - * The stage of the Policy definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Policy create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Policy create(Context context); - } - - /** - * The stage of the Policy definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Policy creation properties.. - * - * @param properties Policy creation properties. - * @return the next definition stage. - */ - WithCreate withProperties(CreatePolicyInputProperties properties); - } - } - - /** - * Begins update for the Policy resource. - * - * @return the stage of resource update. - */ - Policy.Update update(); - - /** - * The template for Policy update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Policy apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Policy apply(Context context); - } - - /** - * The Policy update stages. - */ - interface UpdateStages { - /** - * The stage of the Policy update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The ReplicationProviderSettings.. - * - * @param properties The ReplicationProviderSettings. - * @return the next definition stage. - */ - Update withProperties(UpdatePolicyInputProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Policy refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Policy refresh(Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PolicyCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PolicyCollection.java deleted file mode 100644 index f1314af94833..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PolicyCollection.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.PolicyInner; -import java.io.IOException; -import java.util.List; - -/** - * Protection Profile Collection details. - */ -@Fluent -public final class PolicyCollection implements JsonSerializable { - /* - * The policy details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of PolicyCollection class. - */ - public PolicyCollection() { - } - - /** - * Get the value property: The policy details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The policy details. - * - * @param value the value value to set. - * @return the PolicyCollection object itself. - */ - public PolicyCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the PolicyCollection object itself. - */ - public PolicyCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PolicyCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PolicyCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PolicyCollection. - */ - public static PolicyCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PolicyCollection deserializedPolicyCollection = new PolicyCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> PolicyInner.fromJson(reader1)); - deserializedPolicyCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPolicyCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPolicyCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PolicyProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PolicyProperties.java deleted file mode 100644 index 158d744338b5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PolicyProperties.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Protection profile custom data details. - */ -@Fluent -public final class PolicyProperties implements JsonSerializable { - /* - * The FriendlyName. - */ - private String friendlyName; - - /* - * The ReplicationChannelSetting. - */ - private PolicyProviderSpecificDetails providerSpecificDetails; - - /** - * Creates an instance of PolicyProperties class. - */ - public PolicyProperties() { - } - - /** - * Get the friendlyName property: The FriendlyName. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 providerSpecificDetails property: The ReplicationChannelSetting. - * - * @return the providerSpecificDetails value. - */ - public PolicyProviderSpecificDetails providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: The ReplicationChannelSetting. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the PolicyProperties object itself. - */ - public PolicyProperties withProviderSpecificDetails(PolicyProviderSpecificDetails providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PolicyProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PolicyProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PolicyProperties. - */ - public static PolicyProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PolicyProperties deserializedPolicyProperties = new PolicyProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedPolicyProperties.friendlyName = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedPolicyProperties.providerSpecificDetails - = PolicyProviderSpecificDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPolicyProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PolicyProviderSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PolicyProviderSpecificDetails.java deleted file mode 100644 index dc816a9b940d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PolicyProviderSpecificDetails.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for Provider specific details for policies. - */ -@Immutable -public class PolicyProviderSpecificDetails implements JsonSerializable { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "PolicyProviderSpecificDetails"; - - /** - * Creates an instance of PolicyProviderSpecificDetails class. - */ - public PolicyProviderSpecificDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PolicyProviderSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PolicyProviderSpecificDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PolicyProviderSpecificDetails. - */ - public static PolicyProviderSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2APolicyDetails.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzure".equals(discriminatorValue)) { - return HyperVReplicaAzurePolicyDetails.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaBasePolicyDetails".equals(discriminatorValue)) { - return HyperVReplicaBasePolicyDetails.fromJson(readerToUse.reset()); - } else if ("HyperVReplica2012R2".equals(discriminatorValue)) { - return HyperVReplicaBluePolicyDetails.fromJson(readerToUse.reset()); - } else if ("HyperVReplica2012".equals(discriminatorValue)) { - return HyperVReplicaPolicyDetails.fromJson(readerToUse.reset()); - } else if ("InMageAzureV2".equals(discriminatorValue)) { - return InMageAzureV2PolicyDetails.fromJson(readerToUse.reset()); - } else if ("InMageBasePolicyDetails".equals(discriminatorValue)) { - return InMageBasePolicyDetails.fromJson(readerToUse.reset()); - } else if ("InMage".equals(discriminatorValue)) { - return InMagePolicyDetails.fromJson(readerToUse.reset()); - } else if ("InMageRcmFailback".equals(discriminatorValue)) { - return InMageRcmFailbackPolicyDetails.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmPolicyDetails.fromJson(readerToUse.reset()); - } else if ("VMwareCbt".equals(discriminatorValue)) { - return VmwareCbtPolicyDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static PolicyProviderSpecificDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PolicyProviderSpecificDetails deserializedPolicyProviderSpecificDetails - = new PolicyProviderSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedPolicyProviderSpecificDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPolicyProviderSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PolicyProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PolicyProviderSpecificInput.java deleted file mode 100644 index 3fbb261609ba..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PolicyProviderSpecificInput.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for provider specific input. - */ -@Immutable -public class PolicyProviderSpecificInput implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "PolicyProviderSpecificInput"; - - /** - * Creates an instance of PolicyProviderSpecificInput class. - */ - public PolicyProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PolicyProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PolicyProviderSpecificInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PolicyProviderSpecificInput. - */ - public static PolicyProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2ACrossClusterMigration".equals(discriminatorValue)) { - return A2ACrossClusterMigrationPolicyCreationInput.fromJson(readerToUse.reset()); - } else if ("A2A".equals(discriminatorValue)) { - return A2APolicyCreationInput.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzure".equals(discriminatorValue)) { - return HyperVReplicaAzurePolicyInput.fromJson(readerToUse.reset()); - } else if ("HyperVReplica2012".equals(discriminatorValue)) { - return HyperVReplicaPolicyInput.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("HyperVReplica2012R2".equals(discriminatorValue)) { - return HyperVReplicaBluePolicyInput.fromJson(readerToUse.reset()); - } else if ("InMageAzureV2".equals(discriminatorValue)) { - return InMageAzureV2PolicyInput.fromJson(readerToUse.reset()); - } else if ("InMage".equals(discriminatorValue)) { - return InMagePolicyInput.fromJson(readerToUse.reset()); - } else if ("InMageRcmFailback".equals(discriminatorValue)) { - return InMageRcmFailbackPolicyCreationInput.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmPolicyCreationInput.fromJson(readerToUse.reset()); - } else if ("VMwareCbt".equals(discriminatorValue)) { - return VMwareCbtPolicyCreationInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static PolicyProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PolicyProviderSpecificInput deserializedPolicyProviderSpecificInput = new PolicyProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedPolicyProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPolicyProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PossibleOperationsDirections.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PossibleOperationsDirections.java deleted file mode 100644 index 9ada2afddd2c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PossibleOperationsDirections.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for PossibleOperationsDirections. - */ -public final class PossibleOperationsDirections extends ExpandableStringEnum { - /** - * Static value PrimaryToRecovery for PossibleOperationsDirections. - */ - public static final PossibleOperationsDirections PRIMARY_TO_RECOVERY = fromString("PrimaryToRecovery"); - - /** - * Static value RecoveryToPrimary for PossibleOperationsDirections. - */ - public static final PossibleOperationsDirections RECOVERY_TO_PRIMARY = fromString("RecoveryToPrimary"); - - /** - * Creates a new instance of PossibleOperationsDirections value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PossibleOperationsDirections() { - } - - /** - * Creates or finds a PossibleOperationsDirections from its string representation. - * - * @param name a name to look for. - * @return the corresponding PossibleOperationsDirections. - */ - public static PossibleOperationsDirections fromString(String name) { - return fromString(name, PossibleOperationsDirections.class); - } - - /** - * Gets known PossibleOperationsDirections values. - * - * @return known PossibleOperationsDirections values. - */ - public static Collection values() { - return values(PossibleOperationsDirections.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PresenceStatus.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PresenceStatus.java deleted file mode 100644 index 4ed9026f8ce7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PresenceStatus.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether the VM has a physical disk attached. String value of SrsDataContract.PresenceStatus enum. - */ -public final class PresenceStatus extends ExpandableStringEnum { - /** - * Static value Unknown for PresenceStatus. - */ - public static final PresenceStatus UNKNOWN = fromString("Unknown"); - - /** - * Static value Present for PresenceStatus. - */ - public static final PresenceStatus PRESENT = fromString("Present"); - - /** - * Static value NotPresent for PresenceStatus. - */ - public static final PresenceStatus NOT_PRESENT = fromString("NotPresent"); - - /** - * Creates a new instance of PresenceStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PresenceStatus() { - } - - /** - * Creates or finds a PresenceStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PresenceStatus. - */ - public static PresenceStatus fromString(String name) { - return fromString(name, PresenceStatus.class); - } - - /** - * Gets known PresenceStatus values. - * - * @return known PresenceStatus values. - */ - public static Collection values() { - return values(PresenceStatus.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProcessServer.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProcessServer.java deleted file mode 100644 index 6e61d6e14193..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProcessServer.java +++ /dev/null @@ -1,1008 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * Details of the Process Server. - */ -@Fluent -public final class ProcessServer implements JsonSerializable { - /* - * The Process Server's friendly name. - */ - private String friendlyName; - - /* - * The Process Server Id. - */ - private String id; - - /* - * The IP address of the server. - */ - private String ipAddress; - - /* - * The OS type of the server. - */ - private String osType; - - /* - * The version of the scout component on the server. - */ - private String agentVersion; - - /* - * The last heartbeat received from the server. - */ - private OffsetDateTime lastHeartbeat; - - /* - * Version status. - */ - private String versionStatus; - - /* - * The list of the mobility service updates available on the Process Server. - */ - private List mobilityServiceUpdates; - - /* - * The agent generated Id. - */ - private String hostId; - - /* - * The servers configured with this PS. - */ - private String machineCount; - - /* - * The number of replication pairs configured in this PS. - */ - private String replicationPairCount; - - /* - * The percentage of the system load. - */ - private String systemLoad; - - /* - * The system load status. - */ - private String systemLoadStatus; - - /* - * The percentage of the CPU load. - */ - private String cpuLoad; - - /* - * The CPU load status. - */ - private String cpuLoadStatus; - - /* - * The total memory. - */ - private Long totalMemoryInBytes; - - /* - * The available memory. - */ - private Long availableMemoryInBytes; - - /* - * The memory usage status. - */ - private String memoryUsageStatus; - - /* - * The total space. - */ - private Long totalSpaceInBytes; - - /* - * The available space. - */ - private Long availableSpaceInBytes; - - /* - * The space usage status. - */ - private String spaceUsageStatus; - - /* - * The PS service status. - */ - private String psServiceStatus; - - /* - * The PS SSL cert expiry date. - */ - private OffsetDateTime sslCertExpiryDate; - - /* - * CS SSL cert expiry date. - */ - 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. - */ - private String osVersion; - - /* - * Health errors. - */ - private List healthErrors; - - /* - * Agent expiry date. - */ - private OffsetDateTime agentExpiryDate; - - /* - * The agent version details. - */ - private VersionDetails agentVersionDetails; - - /* - * The health of Process Server. - */ - private ProtectionHealth health; - - /* - * The process server stats refresh time. - */ - private OffsetDateTime psStatsRefreshTime; - - /* - * The uploading pending data in bytes. - */ - private Long throughputUploadPendingDataInBytes; - - /* - * The throughput in MBps. - */ - private Long throughputInMBps; - - /* - * The throughput in bytes. - */ - private Long throughputInBytes; - - /* - * The throughput status. - */ - private String throughputStatus; - - /* - * The MARS communication status. - */ - private String marsCommunicationStatus; - - /* - * The MARS registration status. - */ - private String marsRegistrationStatus; - - /** - * Creates an instance of ProcessServer class. - */ - public ProcessServer() { - } - - /** - * Get the friendlyName property: The Process Server's friendly name. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 id property: The Process Server Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: 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 ipAddress property: The IP address of the server. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: 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 osType property: The OS type of the server. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: 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 agentVersion property: The version of the scout component on the server. - * - * @return the agentVersion value. - */ - public String agentVersion() { - return this.agentVersion; - } - - /** - * Set the agentVersion property: 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 lastHeartbeat property: The last heartbeat received from the server. - * - * @return the lastHeartbeat value. - */ - public OffsetDateTime lastHeartbeat() { - return this.lastHeartbeat; - } - - /** - * Set the lastHeartbeat property: The last heartbeat received from the server. - * - * @param lastHeartbeat the lastHeartbeat value to set. - * @return the ProcessServer object itself. - */ - public ProcessServer withLastHeartbeat(OffsetDateTime lastHeartbeat) { - this.lastHeartbeat = lastHeartbeat; - return this; - } - - /** - * Get the versionStatus property: Version status. - * - * @return the versionStatus value. - */ - public String versionStatus() { - return this.versionStatus; - } - - /** - * Set the versionStatus property: 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 mobilityServiceUpdates property: The list of the mobility service updates available on the Process - * Server. - * - * @return the mobilityServiceUpdates value. - */ - public List mobilityServiceUpdates() { - return this.mobilityServiceUpdates; - } - - /** - * Set the mobilityServiceUpdates property: 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 hostId property: The agent generated Id. - * - * @return the hostId value. - */ - public String hostId() { - return this.hostId; - } - - /** - * Set the hostId property: 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 machineCount property: The servers configured with this PS. - * - * @return the machineCount value. - */ - public String machineCount() { - return this.machineCount; - } - - /** - * Set the machineCount property: 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 replicationPairCount property: The number of replication pairs configured in this PS. - * - * @return the replicationPairCount value. - */ - public String replicationPairCount() { - return this.replicationPairCount; - } - - /** - * Set the replicationPairCount property: 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 systemLoad property: The percentage of the system load. - * - * @return the systemLoad value. - */ - public String systemLoad() { - return this.systemLoad; - } - - /** - * Set the systemLoad property: 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 systemLoadStatus property: The system load status. - * - * @return the systemLoadStatus value. - */ - public String systemLoadStatus() { - return this.systemLoadStatus; - } - - /** - * Set the systemLoadStatus property: 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 cpuLoad property: The percentage of the CPU load. - * - * @return the cpuLoad value. - */ - public String cpuLoad() { - return this.cpuLoad; - } - - /** - * Set the cpuLoad property: 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 cpuLoadStatus property: The CPU load status. - * - * @return the cpuLoadStatus value. - */ - public String cpuLoadStatus() { - return this.cpuLoadStatus; - } - - /** - * Set the cpuLoadStatus property: 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 totalMemoryInBytes property: The total memory. - * - * @return the totalMemoryInBytes value. - */ - public Long totalMemoryInBytes() { - return this.totalMemoryInBytes; - } - - /** - * Set the totalMemoryInBytes property: 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 availableMemoryInBytes property: The available memory. - * - * @return the availableMemoryInBytes value. - */ - public Long availableMemoryInBytes() { - return this.availableMemoryInBytes; - } - - /** - * Set the availableMemoryInBytes property: 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 memoryUsageStatus property: The memory usage status. - * - * @return the memoryUsageStatus value. - */ - public String memoryUsageStatus() { - return this.memoryUsageStatus; - } - - /** - * Set the memoryUsageStatus property: 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 totalSpaceInBytes property: The total space. - * - * @return the totalSpaceInBytes value. - */ - public Long totalSpaceInBytes() { - return this.totalSpaceInBytes; - } - - /** - * Set the totalSpaceInBytes property: 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 availableSpaceInBytes property: The available space. - * - * @return the availableSpaceInBytes value. - */ - public Long availableSpaceInBytes() { - return this.availableSpaceInBytes; - } - - /** - * Set the availableSpaceInBytes property: 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 spaceUsageStatus property: The space usage status. - * - * @return the spaceUsageStatus value. - */ - public String spaceUsageStatus() { - return this.spaceUsageStatus; - } - - /** - * Set the spaceUsageStatus property: 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 psServiceStatus property: The PS service status. - * - * @return the psServiceStatus value. - */ - public String psServiceStatus() { - return this.psServiceStatus; - } - - /** - * Set the psServiceStatus property: 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 sslCertExpiryDate property: The PS SSL cert expiry date. - * - * @return the sslCertExpiryDate value. - */ - public OffsetDateTime sslCertExpiryDate() { - return this.sslCertExpiryDate; - } - - /** - * Set the sslCertExpiryDate property: The PS SSL cert expiry date. - * - * @param sslCertExpiryDate the sslCertExpiryDate value to set. - * @return the ProcessServer object itself. - */ - public ProcessServer withSslCertExpiryDate(OffsetDateTime sslCertExpiryDate) { - this.sslCertExpiryDate = sslCertExpiryDate; - return this; - } - - /** - * Get the sslCertExpiryRemainingDays property: CS SSL cert expiry date. - * - * @return the sslCertExpiryRemainingDays value. - */ - public Integer sslCertExpiryRemainingDays() { - return this.sslCertExpiryRemainingDays; - } - - /** - * Set the sslCertExpiryRemainingDays property: 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 the osVersion property: 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 the osVersion property: 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; - } - - /** - * Get the healthErrors property: Health errors. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Set the healthErrors property: Health errors. - * - * @param healthErrors the healthErrors value to set. - * @return the ProcessServer object itself. - */ - public ProcessServer withHealthErrors(List healthErrors) { - this.healthErrors = healthErrors; - return this; - } - - /** - * Get the agentExpiryDate property: Agent expiry date. - * - * @return the agentExpiryDate value. - */ - public OffsetDateTime agentExpiryDate() { - return this.agentExpiryDate; - } - - /** - * Set the agentExpiryDate property: Agent expiry date. - * - * @param agentExpiryDate the agentExpiryDate value to set. - * @return the ProcessServer object itself. - */ - public ProcessServer withAgentExpiryDate(OffsetDateTime agentExpiryDate) { - this.agentExpiryDate = agentExpiryDate; - return this; - } - - /** - * Get the agentVersionDetails property: The agent version details. - * - * @return the agentVersionDetails value. - */ - public VersionDetails agentVersionDetails() { - return this.agentVersionDetails; - } - - /** - * Set the agentVersionDetails property: The agent version details. - * - * @param agentVersionDetails the agentVersionDetails value to set. - * @return the ProcessServer object itself. - */ - public ProcessServer withAgentVersionDetails(VersionDetails agentVersionDetails) { - this.agentVersionDetails = agentVersionDetails; - return this; - } - - /** - * Get the health property: The health of Process Server. - * - * @return the health value. - */ - public ProtectionHealth health() { - return this.health; - } - - /** - * Get the psStatsRefreshTime property: The process server stats refresh time. - * - * @return the psStatsRefreshTime value. - */ - public OffsetDateTime psStatsRefreshTime() { - return this.psStatsRefreshTime; - } - - /** - * Get the throughputUploadPendingDataInBytes property: The uploading pending data in bytes. - * - * @return the throughputUploadPendingDataInBytes value. - */ - public Long throughputUploadPendingDataInBytes() { - return this.throughputUploadPendingDataInBytes; - } - - /** - * Get the throughputInMBps property: The throughput in MBps. - * - * @return the throughputInMBps value. - */ - public Long throughputInMBps() { - return this.throughputInMBps; - } - - /** - * Get the throughputInBytes property: The throughput in bytes. - * - * @return the throughputInBytes value. - */ - public Long throughputInBytes() { - return this.throughputInBytes; - } - - /** - * Get the throughputStatus property: The throughput status. - * - * @return the throughputStatus value. - */ - public String throughputStatus() { - return this.throughputStatus; - } - - /** - * Get the marsCommunicationStatus property: The MARS communication status. - * - * @return the marsCommunicationStatus value. - */ - public String marsCommunicationStatus() { - return this.marsCommunicationStatus; - } - - /** - * Get the marsRegistrationStatus property: The MARS registration status. - * - * @return the marsRegistrationStatus value. - */ - public String marsRegistrationStatus() { - return this.marsRegistrationStatus; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (mobilityServiceUpdates() != null) { - mobilityServiceUpdates().forEach(e -> e.validate()); - } - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - if (agentVersionDetails() != null) { - agentVersionDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeStringField("agentVersion", this.agentVersion); - jsonWriter.writeStringField("lastHeartbeat", - this.lastHeartbeat == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastHeartbeat)); - jsonWriter.writeStringField("versionStatus", this.versionStatus); - jsonWriter.writeArrayField("mobilityServiceUpdates", this.mobilityServiceUpdates, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("hostId", this.hostId); - jsonWriter.writeStringField("machineCount", this.machineCount); - jsonWriter.writeStringField("replicationPairCount", this.replicationPairCount); - jsonWriter.writeStringField("systemLoad", this.systemLoad); - jsonWriter.writeStringField("systemLoadStatus", this.systemLoadStatus); - jsonWriter.writeStringField("cpuLoad", this.cpuLoad); - jsonWriter.writeStringField("cpuLoadStatus", this.cpuLoadStatus); - jsonWriter.writeNumberField("totalMemoryInBytes", this.totalMemoryInBytes); - jsonWriter.writeNumberField("availableMemoryInBytes", this.availableMemoryInBytes); - jsonWriter.writeStringField("memoryUsageStatus", this.memoryUsageStatus); - jsonWriter.writeNumberField("totalSpaceInBytes", this.totalSpaceInBytes); - jsonWriter.writeNumberField("availableSpaceInBytes", this.availableSpaceInBytes); - jsonWriter.writeStringField("spaceUsageStatus", this.spaceUsageStatus); - jsonWriter.writeStringField("psServiceStatus", this.psServiceStatus); - jsonWriter.writeStringField("sslCertExpiryDate", - this.sslCertExpiryDate == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.sslCertExpiryDate)); - jsonWriter.writeNumberField("sslCertExpiryRemainingDays", this.sslCertExpiryRemainingDays); - jsonWriter.writeStringField("osVersion", this.osVersion); - jsonWriter.writeArrayField("healthErrors", this.healthErrors, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("agentExpiryDate", - this.agentExpiryDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.agentExpiryDate)); - jsonWriter.writeJsonField("agentVersionDetails", this.agentVersionDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProcessServer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProcessServer if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ProcessServer. - */ - public static ProcessServer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProcessServer deserializedProcessServer = new ProcessServer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedProcessServer.friendlyName = reader.getString(); - } else if ("id".equals(fieldName)) { - deserializedProcessServer.id = reader.getString(); - } else if ("ipAddress".equals(fieldName)) { - deserializedProcessServer.ipAddress = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedProcessServer.osType = reader.getString(); - } else if ("agentVersion".equals(fieldName)) { - deserializedProcessServer.agentVersion = reader.getString(); - } else if ("lastHeartbeat".equals(fieldName)) { - deserializedProcessServer.lastHeartbeat = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("versionStatus".equals(fieldName)) { - deserializedProcessServer.versionStatus = reader.getString(); - } else if ("mobilityServiceUpdates".equals(fieldName)) { - List mobilityServiceUpdates - = reader.readArray(reader1 -> MobilityServiceUpdate.fromJson(reader1)); - deserializedProcessServer.mobilityServiceUpdates = mobilityServiceUpdates; - } else if ("hostId".equals(fieldName)) { - deserializedProcessServer.hostId = reader.getString(); - } else if ("machineCount".equals(fieldName)) { - deserializedProcessServer.machineCount = reader.getString(); - } else if ("replicationPairCount".equals(fieldName)) { - deserializedProcessServer.replicationPairCount = reader.getString(); - } else if ("systemLoad".equals(fieldName)) { - deserializedProcessServer.systemLoad = reader.getString(); - } else if ("systemLoadStatus".equals(fieldName)) { - deserializedProcessServer.systemLoadStatus = reader.getString(); - } else if ("cpuLoad".equals(fieldName)) { - deserializedProcessServer.cpuLoad = reader.getString(); - } else if ("cpuLoadStatus".equals(fieldName)) { - deserializedProcessServer.cpuLoadStatus = reader.getString(); - } else if ("totalMemoryInBytes".equals(fieldName)) { - deserializedProcessServer.totalMemoryInBytes = reader.getNullable(JsonReader::getLong); - } else if ("availableMemoryInBytes".equals(fieldName)) { - deserializedProcessServer.availableMemoryInBytes = reader.getNullable(JsonReader::getLong); - } else if ("memoryUsageStatus".equals(fieldName)) { - deserializedProcessServer.memoryUsageStatus = reader.getString(); - } else if ("totalSpaceInBytes".equals(fieldName)) { - deserializedProcessServer.totalSpaceInBytes = reader.getNullable(JsonReader::getLong); - } else if ("availableSpaceInBytes".equals(fieldName)) { - deserializedProcessServer.availableSpaceInBytes = reader.getNullable(JsonReader::getLong); - } else if ("spaceUsageStatus".equals(fieldName)) { - deserializedProcessServer.spaceUsageStatus = reader.getString(); - } else if ("psServiceStatus".equals(fieldName)) { - deserializedProcessServer.psServiceStatus = reader.getString(); - } else if ("sslCertExpiryDate".equals(fieldName)) { - deserializedProcessServer.sslCertExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("sslCertExpiryRemainingDays".equals(fieldName)) { - deserializedProcessServer.sslCertExpiryRemainingDays = reader.getNullable(JsonReader::getInt); - } else if ("osVersion".equals(fieldName)) { - deserializedProcessServer.osVersion = reader.getString(); - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedProcessServer.healthErrors = healthErrors; - } else if ("agentExpiryDate".equals(fieldName)) { - deserializedProcessServer.agentExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("agentVersionDetails".equals(fieldName)) { - deserializedProcessServer.agentVersionDetails = VersionDetails.fromJson(reader); - } else if ("health".equals(fieldName)) { - deserializedProcessServer.health = ProtectionHealth.fromString(reader.getString()); - } else if ("psStatsRefreshTime".equals(fieldName)) { - deserializedProcessServer.psStatsRefreshTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("throughputUploadPendingDataInBytes".equals(fieldName)) { - deserializedProcessServer.throughputUploadPendingDataInBytes - = reader.getNullable(JsonReader::getLong); - } else if ("throughputInMBps".equals(fieldName)) { - deserializedProcessServer.throughputInMBps = reader.getNullable(JsonReader::getLong); - } else if ("throughputInBytes".equals(fieldName)) { - deserializedProcessServer.throughputInBytes = reader.getNullable(JsonReader::getLong); - } else if ("throughputStatus".equals(fieldName)) { - deserializedProcessServer.throughputStatus = reader.getString(); - } else if ("marsCommunicationStatus".equals(fieldName)) { - deserializedProcessServer.marsCommunicationStatus = reader.getString(); - } else if ("marsRegistrationStatus".equals(fieldName)) { - deserializedProcessServer.marsRegistrationStatus = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProcessServer; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProcessServerDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProcessServerDetails.java deleted file mode 100644 index e4eae0e429e6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProcessServerDetails.java +++ /dev/null @@ -1,545 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Process server details. - */ -@Immutable -public final class ProcessServerDetails implements JsonSerializable { - /* - * The process server Id. - */ - private String id; - - /* - * The process server name. - */ - private String name; - - /* - * The process server Bios Id. - */ - private String biosId; - - /* - * The fabric object Id. - */ - private String fabricObjectId; - - /* - * The process server Fqdn. - */ - private String fqdn; - - /* - * The list of IP addresses for communicating with the RCM component. - */ - private List ipAddresses; - - /* - * The version. - */ - private String version; - - /* - * The last heartbeat received from the process server. - */ - private OffsetDateTime lastHeartbeatUtc; - - /* - * The total memory. - */ - private Long totalMemoryInBytes; - - /* - * The available memory. - */ - private Long availableMemoryInBytes; - - /* - * The used memory. - */ - private Long usedMemoryInBytes; - - /* - * The memory usage percentage. - */ - private Double memoryUsagePercentage; - - /* - * The total disk space. - */ - private Long totalSpaceInBytes; - - /* - * The available disk space. - */ - private Long availableSpaceInBytes; - - /* - * The used disk space. - */ - private Long usedSpaceInBytes; - - /* - * The free disk space percentage. - */ - private Double freeSpacePercentage; - - /* - * The uploading pending data in bytes. - */ - private Long throughputUploadPendingDataInBytes; - - /* - * The throughput in bytes. - */ - private Long throughputInBytes; - - /* - * The processor usage percentage. - */ - private Double processorUsagePercentage; - - /* - * The throughput status. - */ - private RcmComponentStatus throughputStatus; - - /* - * The system load. - */ - private Long systemLoad; - - /* - * The system load status. - */ - private RcmComponentStatus systemLoadStatus; - - /* - * The disk usage status. - */ - private RcmComponentStatus diskUsageStatus; - - /* - * The memory usage status. - */ - private RcmComponentStatus memoryUsageStatus; - - /* - * The processor usage status. - */ - private RcmComponentStatus processorUsageStatus; - - /* - * The health of the process server. - */ - private ProtectionHealth health; - - /* - * The health errors. - */ - private List healthErrors; - - /* - * The protected item count. - */ - private Integer protectedItemCount; - - /* - * The historic health of the process server based on the health in last 24 hours. - */ - private ProtectionHealth historicHealth; - - /** - * Creates an instance of ProcessServerDetails class. - */ - public ProcessServerDetails() { - } - - /** - * Get the id property: The process server Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The process server name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the biosId property: The process server Bios Id. - * - * @return the biosId value. - */ - public String biosId() { - return this.biosId; - } - - /** - * Get the fabricObjectId property: The fabric object Id. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Get the fqdn property: The process server Fqdn. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the ipAddresses property: The list of IP addresses for communicating with the RCM component. - * - * @return the ipAddresses value. - */ - public List ipAddresses() { - return this.ipAddresses; - } - - /** - * Get the version property: The version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the lastHeartbeatUtc property: The last heartbeat received from the process server. - * - * @return the lastHeartbeatUtc value. - */ - public OffsetDateTime lastHeartbeatUtc() { - return this.lastHeartbeatUtc; - } - - /** - * Get the totalMemoryInBytes property: The total memory. - * - * @return the totalMemoryInBytes value. - */ - public Long totalMemoryInBytes() { - return this.totalMemoryInBytes; - } - - /** - * Get the availableMemoryInBytes property: The available memory. - * - * @return the availableMemoryInBytes value. - */ - public Long availableMemoryInBytes() { - return this.availableMemoryInBytes; - } - - /** - * Get the usedMemoryInBytes property: The used memory. - * - * @return the usedMemoryInBytes value. - */ - public Long usedMemoryInBytes() { - return this.usedMemoryInBytes; - } - - /** - * Get the memoryUsagePercentage property: The memory usage percentage. - * - * @return the memoryUsagePercentage value. - */ - public Double memoryUsagePercentage() { - return this.memoryUsagePercentage; - } - - /** - * Get the totalSpaceInBytes property: The total disk space. - * - * @return the totalSpaceInBytes value. - */ - public Long totalSpaceInBytes() { - return this.totalSpaceInBytes; - } - - /** - * Get the availableSpaceInBytes property: The available disk space. - * - * @return the availableSpaceInBytes value. - */ - public Long availableSpaceInBytes() { - return this.availableSpaceInBytes; - } - - /** - * Get the usedSpaceInBytes property: The used disk space. - * - * @return the usedSpaceInBytes value. - */ - public Long usedSpaceInBytes() { - return this.usedSpaceInBytes; - } - - /** - * Get the freeSpacePercentage property: The free disk space percentage. - * - * @return the freeSpacePercentage value. - */ - public Double freeSpacePercentage() { - return this.freeSpacePercentage; - } - - /** - * Get the throughputUploadPendingDataInBytes property: The uploading pending data in bytes. - * - * @return the throughputUploadPendingDataInBytes value. - */ - public Long throughputUploadPendingDataInBytes() { - return this.throughputUploadPendingDataInBytes; - } - - /** - * Get the throughputInBytes property: The throughput in bytes. - * - * @return the throughputInBytes value. - */ - public Long throughputInBytes() { - return this.throughputInBytes; - } - - /** - * Get the processorUsagePercentage property: The processor usage percentage. - * - * @return the processorUsagePercentage value. - */ - public Double processorUsagePercentage() { - return this.processorUsagePercentage; - } - - /** - * Get the throughputStatus property: The throughput status. - * - * @return the throughputStatus value. - */ - public RcmComponentStatus throughputStatus() { - return this.throughputStatus; - } - - /** - * Get the systemLoad property: The system load. - * - * @return the systemLoad value. - */ - public Long systemLoad() { - return this.systemLoad; - } - - /** - * Get the systemLoadStatus property: The system load status. - * - * @return the systemLoadStatus value. - */ - public RcmComponentStatus systemLoadStatus() { - return this.systemLoadStatus; - } - - /** - * Get the diskUsageStatus property: The disk usage status. - * - * @return the diskUsageStatus value. - */ - public RcmComponentStatus diskUsageStatus() { - return this.diskUsageStatus; - } - - /** - * Get the memoryUsageStatus property: The memory usage status. - * - * @return the memoryUsageStatus value. - */ - public RcmComponentStatus memoryUsageStatus() { - return this.memoryUsageStatus; - } - - /** - * Get the processorUsageStatus property: The processor usage status. - * - * @return the processorUsageStatus value. - */ - public RcmComponentStatus processorUsageStatus() { - return this.processorUsageStatus; - } - - /** - * Get the health property: The health of the process server. - * - * @return the health value. - */ - public ProtectionHealth health() { - return this.health; - } - - /** - * Get the healthErrors property: The health errors. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Get the protectedItemCount property: The protected item count. - * - * @return the protectedItemCount value. - */ - public Integer protectedItemCount() { - return this.protectedItemCount; - } - - /** - * Get the historicHealth property: The historic health of the process server based on the health in last 24 hours. - * - * @return the historicHealth value. - */ - public ProtectionHealth historicHealth() { - return this.historicHealth; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProcessServerDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProcessServerDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ProcessServerDetails. - */ - public static ProcessServerDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProcessServerDetails deserializedProcessServerDetails = new ProcessServerDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedProcessServerDetails.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedProcessServerDetails.name = reader.getString(); - } else if ("biosId".equals(fieldName)) { - deserializedProcessServerDetails.biosId = reader.getString(); - } else if ("fabricObjectId".equals(fieldName)) { - deserializedProcessServerDetails.fabricObjectId = reader.getString(); - } else if ("fqdn".equals(fieldName)) { - deserializedProcessServerDetails.fqdn = reader.getString(); - } else if ("ipAddresses".equals(fieldName)) { - List ipAddresses = reader.readArray(reader1 -> reader1.getString()); - deserializedProcessServerDetails.ipAddresses = ipAddresses; - } else if ("version".equals(fieldName)) { - deserializedProcessServerDetails.version = reader.getString(); - } else if ("lastHeartbeatUtc".equals(fieldName)) { - deserializedProcessServerDetails.lastHeartbeatUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("totalMemoryInBytes".equals(fieldName)) { - deserializedProcessServerDetails.totalMemoryInBytes = reader.getNullable(JsonReader::getLong); - } else if ("availableMemoryInBytes".equals(fieldName)) { - deserializedProcessServerDetails.availableMemoryInBytes = reader.getNullable(JsonReader::getLong); - } else if ("usedMemoryInBytes".equals(fieldName)) { - deserializedProcessServerDetails.usedMemoryInBytes = reader.getNullable(JsonReader::getLong); - } else if ("memoryUsagePercentage".equals(fieldName)) { - deserializedProcessServerDetails.memoryUsagePercentage = reader.getNullable(JsonReader::getDouble); - } else if ("totalSpaceInBytes".equals(fieldName)) { - deserializedProcessServerDetails.totalSpaceInBytes = reader.getNullable(JsonReader::getLong); - } else if ("availableSpaceInBytes".equals(fieldName)) { - deserializedProcessServerDetails.availableSpaceInBytes = reader.getNullable(JsonReader::getLong); - } else if ("usedSpaceInBytes".equals(fieldName)) { - deserializedProcessServerDetails.usedSpaceInBytes = reader.getNullable(JsonReader::getLong); - } else if ("freeSpacePercentage".equals(fieldName)) { - deserializedProcessServerDetails.freeSpacePercentage = reader.getNullable(JsonReader::getDouble); - } else if ("throughputUploadPendingDataInBytes".equals(fieldName)) { - deserializedProcessServerDetails.throughputUploadPendingDataInBytes - = reader.getNullable(JsonReader::getLong); - } else if ("throughputInBytes".equals(fieldName)) { - deserializedProcessServerDetails.throughputInBytes = reader.getNullable(JsonReader::getLong); - } else if ("processorUsagePercentage".equals(fieldName)) { - deserializedProcessServerDetails.processorUsagePercentage - = reader.getNullable(JsonReader::getDouble); - } else if ("throughputStatus".equals(fieldName)) { - deserializedProcessServerDetails.throughputStatus - = RcmComponentStatus.fromString(reader.getString()); - } else if ("systemLoad".equals(fieldName)) { - deserializedProcessServerDetails.systemLoad = reader.getNullable(JsonReader::getLong); - } else if ("systemLoadStatus".equals(fieldName)) { - deserializedProcessServerDetails.systemLoadStatus - = RcmComponentStatus.fromString(reader.getString()); - } else if ("diskUsageStatus".equals(fieldName)) { - deserializedProcessServerDetails.diskUsageStatus - = RcmComponentStatus.fromString(reader.getString()); - } else if ("memoryUsageStatus".equals(fieldName)) { - deserializedProcessServerDetails.memoryUsageStatus - = RcmComponentStatus.fromString(reader.getString()); - } else if ("processorUsageStatus".equals(fieldName)) { - deserializedProcessServerDetails.processorUsageStatus - = RcmComponentStatus.fromString(reader.getString()); - } else if ("health".equals(fieldName)) { - deserializedProcessServerDetails.health = ProtectionHealth.fromString(reader.getString()); - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedProcessServerDetails.healthErrors = healthErrors; - } else if ("protectedItemCount".equals(fieldName)) { - deserializedProcessServerDetails.protectedItemCount = reader.getNullable(JsonReader::getInt); - } else if ("historicHealth".equals(fieldName)) { - deserializedProcessServerDetails.historicHealth = ProtectionHealth.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedProcessServerDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectableItem.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectableItem.java deleted file mode 100644 index fb8802c8262d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectableItem.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectableItemInner; - -/** - * An immutable client-side representation of ProtectableItem. - */ -public interface ProtectableItem { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The custom data. - * - * @return the properties value. - */ - ProtectableItemProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectableItemInner object. - * - * @return the inner object. - */ - ProtectableItemInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectableItemCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectableItemCollection.java deleted file mode 100644 index 3d286edd2dfc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectableItemCollection.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectableItemInner; -import java.io.IOException; -import java.util.List; - -/** - * Protectable item collection. - */ -@Fluent -public final class ProtectableItemCollection implements JsonSerializable { - /* - * The Protectable item details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of ProtectableItemCollection class. - */ - public ProtectableItemCollection() { - } - - /** - * Get the value property: The Protectable item details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The Protectable item details. - * - * @param value the value value to set. - * @return the ProtectableItemCollection object itself. - */ - public ProtectableItemCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the ProtectableItemCollection object itself. - */ - public ProtectableItemCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProtectableItemCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProtectableItemCollection if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ProtectableItemCollection. - */ - public static ProtectableItemCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProtectableItemCollection deserializedProtectableItemCollection = new ProtectableItemCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ProtectableItemInner.fromJson(reader1)); - deserializedProtectableItemCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedProtectableItemCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProtectableItemCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectableItemProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectableItemProperties.java deleted file mode 100644 index 5aaea7f555bc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectableItemProperties.java +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Replication protected item custom data details. - */ -@Fluent -public final class ProtectableItemProperties implements JsonSerializable { - /* - * The name. - */ - private String friendlyName; - - /* - * The protection status. - */ - private String protectionStatus; - - /* - * The ARM resource of protected items. - */ - private String replicationProtectedItemId; - - /* - * The recovery provider ARM Id. - */ - private String recoveryServicesProviderId; - - /* - * The Current protection readiness errors. - */ - private List protectionReadinessErrors; - - /* - * The list of replication providers supported for the protectable item. - */ - private List supportedReplicationProviders; - - /* - * The Replication provider custom settings. - */ - private ConfigurationSettings customDetails; - - /** - * Creates an instance of ProtectableItemProperties class. - */ - public ProtectableItemProperties() { - } - - /** - * Get the friendlyName property: The name. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 protectionStatus property: The protection status. - * - * @return the protectionStatus value. - */ - public String protectionStatus() { - return this.protectionStatus; - } - - /** - * Set the protectionStatus property: 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 replicationProtectedItemId property: The ARM resource of protected items. - * - * @return the replicationProtectedItemId value. - */ - public String replicationProtectedItemId() { - return this.replicationProtectedItemId; - } - - /** - * Set the replicationProtectedItemId property: 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 recoveryServicesProviderId property: The recovery provider ARM Id. - * - * @return the recoveryServicesProviderId value. - */ - public String recoveryServicesProviderId() { - return this.recoveryServicesProviderId; - } - - /** - * Set the recoveryServicesProviderId property: 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 protectionReadinessErrors property: The Current protection readiness errors. - * - * @return the protectionReadinessErrors value. - */ - public List protectionReadinessErrors() { - return this.protectionReadinessErrors; - } - - /** - * Set the protectionReadinessErrors property: 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 supportedReplicationProviders property: The list of replication providers supported for the protectable - * item. - * - * @return the supportedReplicationProviders value. - */ - public List supportedReplicationProviders() { - return this.supportedReplicationProviders; - } - - /** - * Set the supportedReplicationProviders property: 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 customDetails property: The Replication provider custom settings. - * - * @return the customDetails value. - */ - public ConfigurationSettings customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customDetails() != null) { - customDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("protectionStatus", this.protectionStatus); - jsonWriter.writeStringField("replicationProtectedItemId", this.replicationProtectedItemId); - jsonWriter.writeStringField("recoveryServicesProviderId", this.recoveryServicesProviderId); - jsonWriter.writeArrayField("protectionReadinessErrors", this.protectionReadinessErrors, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("supportedReplicationProviders", this.supportedReplicationProviders, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("customDetails", this.customDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProtectableItemProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProtectableItemProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ProtectableItemProperties. - */ - public static ProtectableItemProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProtectableItemProperties deserializedProtectableItemProperties = new ProtectableItemProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedProtectableItemProperties.friendlyName = reader.getString(); - } else if ("protectionStatus".equals(fieldName)) { - deserializedProtectableItemProperties.protectionStatus = reader.getString(); - } else if ("replicationProtectedItemId".equals(fieldName)) { - deserializedProtectableItemProperties.replicationProtectedItemId = reader.getString(); - } else if ("recoveryServicesProviderId".equals(fieldName)) { - deserializedProtectableItemProperties.recoveryServicesProviderId = reader.getString(); - } else if ("protectionReadinessErrors".equals(fieldName)) { - List protectionReadinessErrors = reader.readArray(reader1 -> reader1.getString()); - deserializedProtectableItemProperties.protectionReadinessErrors = protectionReadinessErrors; - } else if ("supportedReplicationProviders".equals(fieldName)) { - List supportedReplicationProviders = reader.readArray(reader1 -> reader1.getString()); - deserializedProtectableItemProperties.supportedReplicationProviders = supportedReplicationProviders; - } else if ("customDetails".equals(fieldName)) { - deserializedProtectableItemProperties.customDetails = ConfigurationSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedProtectableItemProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainer.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainer.java deleted file mode 100644 index 68a50c00825b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainer.java +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerInner; - -/** - * An immutable client-side representation of ProtectionContainer. - */ -public interface ProtectionContainer { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The custom data. - * - * @return the properties value. - */ - ProtectionContainerProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerInner - * object. - * - * @return the inner object. - */ - ProtectionContainerInner innerModel(); - - /** - * The entirety of the ProtectionContainer definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ProtectionContainer definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ProtectionContainer definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ProtectionContainer definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName, fabricName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @return the next definition stage. - */ - WithCreate withExistingReplicationFabric(String resourceName, String resourceGroupName, String fabricName); - } - - /** - * The stage of the ProtectionContainer definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ProtectionContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ProtectionContainer create(Context context); - } - - /** - * The stage of the ProtectionContainer definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Create protection container input properties.. - * - * @param properties Create protection container input properties. - * @return the next definition stage. - */ - WithCreate withProperties(CreateProtectionContainerInputProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ProtectionContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ProtectionContainer refresh(Context context); - - /** - * 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 discoverProtectableItemRequest The request object to add a protectable item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - ProtectionContainer discoverProtectableItem(DiscoverProtectableItemRequest discoverProtectableItemRequest); - - /** - * 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 discoverProtectableItemRequest The request object to add a protectable item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - ProtectionContainer discoverProtectableItem(DiscoverProtectableItemRequest discoverProtectableItemRequest, - Context context); - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(); - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(Context context); - - /** - * 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 switchInput Switch protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - ProtectionContainer switchProtection(SwitchProtectionInput switchInput); - - /** - * 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 switchInput Switch protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - ProtectionContainer switchProtection(SwitchProtectionInput switchInput, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerCollection.java deleted file mode 100644 index 11a24ed627ba..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerCollection.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerInner; -import java.io.IOException; -import java.util.List; - -/** - * Protection Container collection. - */ -@Fluent -public final class ProtectionContainerCollection implements JsonSerializable { - /* - * The Protection Container details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of ProtectionContainerCollection class. - */ - public ProtectionContainerCollection() { - } - - /** - * Get the value property: The Protection Container details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The Protection Container details. - * - * @param value the value value to set. - * @return the ProtectionContainerCollection object itself. - */ - public ProtectionContainerCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the ProtectionContainerCollection object itself. - */ - public ProtectionContainerCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProtectionContainerCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProtectionContainerCollection if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ProtectionContainerCollection. - */ - public static ProtectionContainerCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProtectionContainerCollection deserializedProtectionContainerCollection - = new ProtectionContainerCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ProtectionContainerInner.fromJson(reader1)); - deserializedProtectionContainerCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedProtectionContainerCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProtectionContainerCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerFabricSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerFabricSpecificDetails.java deleted file mode 100644 index c60558e685f3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerFabricSpecificDetails.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for fabric specific details of container. - */ -@Immutable -public final class ProtectionContainerFabricSpecificDetails - implements JsonSerializable { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType; - - /** - * Creates an instance of ProtectionContainerFabricSpecificDetails class. - */ - public ProtectionContainerFabricSpecificDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProtectionContainerFabricSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProtectionContainerFabricSpecificDetails if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ProtectionContainerFabricSpecificDetails. - */ - public static ProtectionContainerFabricSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProtectionContainerFabricSpecificDetails deserializedProtectionContainerFabricSpecificDetails - = new ProtectionContainerFabricSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedProtectionContainerFabricSpecificDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProtectionContainerFabricSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerMapping.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerMapping.java deleted file mode 100644 index da54b2fd7ff5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerMapping.java +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerMappingInner; - -/** - * An immutable client-side representation of ProtectionContainerMapping. - */ -public interface ProtectionContainerMapping { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The custom data. - * - * @return the properties value. - */ - ProtectionContainerMappingProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner - * com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerMappingInner object. - * - * @return the inner object. - */ - ProtectionContainerMappingInner innerModel(); - - /** - * The entirety of the ProtectionContainerMapping definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ProtectionContainerMapping definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ProtectionContainerMapping definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ProtectionContainerMapping definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName, fabricName, protectionContainerName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @return the next definition stage. - */ - WithCreate withExistingReplicationProtectionContainer(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName); - } - - /** - * The stage of the ProtectionContainerMapping definition which contains all the minimum required properties for - * the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ProtectionContainerMapping create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ProtectionContainerMapping create(Context context); - } - - /** - * The stage of the ProtectionContainerMapping definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Configure protection input properties.. - * - * @param properties Configure protection input properties. - * @return the next definition stage. - */ - WithCreate withProperties(CreateProtectionContainerMappingInputProperties properties); - } - } - - /** - * Begins update for the ProtectionContainerMapping resource. - * - * @return the stage of resource update. - */ - ProtectionContainerMapping.Update update(); - - /** - * The template for ProtectionContainerMapping update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ProtectionContainerMapping apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ProtectionContainerMapping apply(Context context); - } - - /** - * The ProtectionContainerMapping update stages. - */ - interface UpdateStages { - /** - * The stage of the ProtectionContainerMapping update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Update protection container mapping input properties.. - * - * @param properties Update protection container mapping input properties. - * @return the next definition stage. - */ - Update withProperties(UpdateProtectionContainerMappingInputProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ProtectionContainerMapping refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ProtectionContainerMapping refresh(Context context); - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param removalInput Removal input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(RemoveProtectionContainerMappingInput removalInput); - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param removalInput Removal input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(RemoveProtectionContainerMappingInput removalInput, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerMappingCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerMappingCollection.java deleted file mode 100644 index c1aecf3a191e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerMappingCollection.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerMappingInner; -import java.io.IOException; -import java.util.List; - -/** - * Protection container mapping collection class. - */ -@Fluent -public final class ProtectionContainerMappingCollection - implements JsonSerializable { - /* - * List of container mappings. - */ - private List value; - - /* - * Link to fetch rest of the data. - */ - private String nextLink; - - /** - * Creates an instance of ProtectionContainerMappingCollection class. - */ - public ProtectionContainerMappingCollection() { - } - - /** - * Get the value property: List of container mappings. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of container mappings. - * - * @param value the value value to set. - * @return the ProtectionContainerMappingCollection object itself. - */ - public ProtectionContainerMappingCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to fetch rest of the data. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: Link to fetch rest of the data. - * - * @param nextLink the nextLink value to set. - * @return the ProtectionContainerMappingCollection object itself. - */ - public ProtectionContainerMappingCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProtectionContainerMappingCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProtectionContainerMappingCollection if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ProtectionContainerMappingCollection. - */ - public static ProtectionContainerMappingCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProtectionContainerMappingCollection deserializedProtectionContainerMappingCollection - = new ProtectionContainerMappingCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ProtectionContainerMappingInner.fromJson(reader1)); - deserializedProtectionContainerMappingCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedProtectionContainerMappingCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProtectionContainerMappingCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerMappingProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerMappingProperties.java deleted file mode 100644 index 285510e061f8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerMappingProperties.java +++ /dev/null @@ -1,392 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Protection container mapping properties. - */ -@Fluent -public final class ProtectionContainerMappingProperties - implements JsonSerializable { - /* - * Paired protection container ARM ID. - */ - private String targetProtectionContainerId; - - /* - * Friendly name of paired container. - */ - private String targetProtectionContainerFriendlyName; - - /* - * Provider specific provider details. - */ - private ProtectionContainerMappingProviderSpecificDetails providerSpecificDetails; - - /* - * Health of pairing. - */ - private String health; - - /* - * Health error. - */ - private List healthErrorDetails; - - /* - * Policy ARM Id. - */ - private String policyId; - - /* - * Association Status. - */ - private String state; - - /* - * Friendly name of source protection container. - */ - private String sourceProtectionContainerFriendlyName; - - /* - * Friendly name of source fabric. - */ - private String sourceFabricFriendlyName; - - /* - * Friendly name of target fabric. - */ - private String targetFabricFriendlyName; - - /* - * Friendly name of replication policy. - */ - private String policyFriendlyName; - - /** - * Creates an instance of ProtectionContainerMappingProperties class. - */ - public ProtectionContainerMappingProperties() { - } - - /** - * Get the targetProtectionContainerId property: Paired protection container ARM ID. - * - * @return the targetProtectionContainerId value. - */ - public String targetProtectionContainerId() { - return this.targetProtectionContainerId; - } - - /** - * Set the targetProtectionContainerId property: 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 the targetProtectionContainerFriendlyName property: Friendly name of paired container. - * - * @return the targetProtectionContainerFriendlyName value. - */ - public String targetProtectionContainerFriendlyName() { - return this.targetProtectionContainerFriendlyName; - } - - /** - * Set the targetProtectionContainerFriendlyName property: 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 the providerSpecificDetails property: Provider specific provider details. - * - * @return the providerSpecificDetails value. - */ - public ProtectionContainerMappingProviderSpecificDetails providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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 the health property: Health of pairing. - * - * @return the health value. - */ - public String health() { - return this.health; - } - - /** - * Set the health property: 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 the healthErrorDetails property: Health error. - * - * @return the healthErrorDetails value. - */ - public List healthErrorDetails() { - return this.healthErrorDetails; - } - - /** - * Set the healthErrorDetails property: 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 the policyId property: Policy ARM Id. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Set the policyId property: 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 the state property: Association Status. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Set the state property: 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 the sourceProtectionContainerFriendlyName property: Friendly name of source protection container. - * - * @return the sourceProtectionContainerFriendlyName value. - */ - public String sourceProtectionContainerFriendlyName() { - return this.sourceProtectionContainerFriendlyName; - } - - /** - * Set the sourceProtectionContainerFriendlyName property: 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 the sourceFabricFriendlyName property: Friendly name of source fabric. - * - * @return the sourceFabricFriendlyName value. - */ - public String sourceFabricFriendlyName() { - return this.sourceFabricFriendlyName; - } - - /** - * Set the sourceFabricFriendlyName property: 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 the targetFabricFriendlyName property: Friendly name of target fabric. - * - * @return the targetFabricFriendlyName value. - */ - public String targetFabricFriendlyName() { - return this.targetFabricFriendlyName; - } - - /** - * Set the targetFabricFriendlyName property: 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 the policyFriendlyName property: Friendly name of replication policy. - * - * @return the policyFriendlyName value. - */ - public String policyFriendlyName() { - return this.policyFriendlyName; - } - - /** - * Set the policyFriendlyName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - if (healthErrorDetails() != null) { - healthErrorDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetProtectionContainerId", this.targetProtectionContainerId); - jsonWriter.writeStringField("targetProtectionContainerFriendlyName", - this.targetProtectionContainerFriendlyName); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - jsonWriter.writeStringField("health", this.health); - jsonWriter.writeArrayField("healthErrorDetails", this.healthErrorDetails, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("policyId", this.policyId); - jsonWriter.writeStringField("state", this.state); - jsonWriter.writeStringField("sourceProtectionContainerFriendlyName", - this.sourceProtectionContainerFriendlyName); - jsonWriter.writeStringField("sourceFabricFriendlyName", this.sourceFabricFriendlyName); - jsonWriter.writeStringField("targetFabricFriendlyName", this.targetFabricFriendlyName); - jsonWriter.writeStringField("policyFriendlyName", this.policyFriendlyName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProtectionContainerMappingProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProtectionContainerMappingProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ProtectionContainerMappingProperties. - */ - public static ProtectionContainerMappingProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProtectionContainerMappingProperties deserializedProtectionContainerMappingProperties - = new ProtectionContainerMappingProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetProtectionContainerId".equals(fieldName)) { - deserializedProtectionContainerMappingProperties.targetProtectionContainerId = reader.getString(); - } else if ("targetProtectionContainerFriendlyName".equals(fieldName)) { - deserializedProtectionContainerMappingProperties.targetProtectionContainerFriendlyName - = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedProtectionContainerMappingProperties.providerSpecificDetails - = ProtectionContainerMappingProviderSpecificDetails.fromJson(reader); - } else if ("health".equals(fieldName)) { - deserializedProtectionContainerMappingProperties.health = reader.getString(); - } else if ("healthErrorDetails".equals(fieldName)) { - List healthErrorDetails = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedProtectionContainerMappingProperties.healthErrorDetails = healthErrorDetails; - } else if ("policyId".equals(fieldName)) { - deserializedProtectionContainerMappingProperties.policyId = reader.getString(); - } else if ("state".equals(fieldName)) { - deserializedProtectionContainerMappingProperties.state = reader.getString(); - } else if ("sourceProtectionContainerFriendlyName".equals(fieldName)) { - deserializedProtectionContainerMappingProperties.sourceProtectionContainerFriendlyName - = reader.getString(); - } else if ("sourceFabricFriendlyName".equals(fieldName)) { - deserializedProtectionContainerMappingProperties.sourceFabricFriendlyName = reader.getString(); - } else if ("targetFabricFriendlyName".equals(fieldName)) { - deserializedProtectionContainerMappingProperties.targetFabricFriendlyName = reader.getString(); - } else if ("policyFriendlyName".equals(fieldName)) { - deserializedProtectionContainerMappingProperties.policyFriendlyName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProtectionContainerMappingProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerMappingProviderSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerMappingProviderSpecificDetails.java deleted file mode 100644 index d147eb23f8d3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerMappingProviderSpecificDetails.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container mapping provider specific details. - */ -@Immutable -public class ProtectionContainerMappingProviderSpecificDetails - implements JsonSerializable { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "ProtectionContainerMappingProviderSpecificDetails"; - - /** - * Creates an instance of ProtectionContainerMappingProviderSpecificDetails class. - */ - public ProtectionContainerMappingProviderSpecificDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProtectionContainerMappingProviderSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProtectionContainerMappingProviderSpecificDetails if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ProtectionContainerMappingProviderSpecificDetails. - */ - public static ProtectionContainerMappingProviderSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2AProtectionContainerMappingDetails.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmProtectionContainerMappingDetails.fromJson(readerToUse.reset()); - } else if ("VMwareCbt".equals(discriminatorValue)) { - return VMwareCbtProtectionContainerMappingDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ProtectionContainerMappingProviderSpecificDetails fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ProtectionContainerMappingProviderSpecificDetails deserializedProtectionContainerMappingProviderSpecificDetails - = new ProtectionContainerMappingProviderSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedProtectionContainerMappingProviderSpecificDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProtectionContainerMappingProviderSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerProperties.java deleted file mode 100644 index 0691789895fc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionContainerProperties.java +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Protection profile custom data details. - */ -@Fluent -public final class ProtectionContainerProperties implements JsonSerializable { - /* - * Fabric friendly name. - */ - private String fabricFriendlyName; - - /* - * The name. - */ - private String friendlyName; - - /* - * The fabric type. - */ - private String fabricType; - - /* - * Number of protected PEs. - */ - private Integer protectedItemCount; - - /* - * The pairing status of this cloud. - */ - private String pairingStatus; - - /* - * The role of this cloud. - */ - private String role; - - /* - * Fabric specific details. - */ - private ProtectionContainerFabricSpecificDetails fabricSpecificDetails; - - /** - * Creates an instance of ProtectionContainerProperties class. - */ - public ProtectionContainerProperties() { - } - - /** - * Get the fabricFriendlyName property: Fabric friendly name. - * - * @return the fabricFriendlyName value. - */ - public String fabricFriendlyName() { - return this.fabricFriendlyName; - } - - /** - * Set the fabricFriendlyName property: 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 friendlyName property: The name. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 fabricType property: The fabric type. - * - * @return the fabricType value. - */ - public String fabricType() { - return this.fabricType; - } - - /** - * Set the fabricType property: 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 the protectedItemCount property: Number of protected PEs. - * - * @return the protectedItemCount value. - */ - public Integer protectedItemCount() { - return this.protectedItemCount; - } - - /** - * Set the protectedItemCount property: 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 pairingStatus property: The pairing status of this cloud. - * - * @return the pairingStatus value. - */ - public String pairingStatus() { - return this.pairingStatus; - } - - /** - * Set the pairingStatus property: 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 property: The role of this cloud. - * - * @return the role value. - */ - public String role() { - return this.role; - } - - /** - * Set the role property: 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 the fabricSpecificDetails property: Fabric specific details. - * - * @return the fabricSpecificDetails value. - */ - public ProtectionContainerFabricSpecificDetails fabricSpecificDetails() { - return this.fabricSpecificDetails; - } - - /** - * Set the fabricSpecificDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fabricSpecificDetails() != null) { - fabricSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fabricFriendlyName", this.fabricFriendlyName); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("fabricType", this.fabricType); - jsonWriter.writeNumberField("protectedItemCount", this.protectedItemCount); - jsonWriter.writeStringField("pairingStatus", this.pairingStatus); - jsonWriter.writeStringField("role", this.role); - jsonWriter.writeJsonField("fabricSpecificDetails", this.fabricSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProtectionContainerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProtectionContainerProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ProtectionContainerProperties. - */ - public static ProtectionContainerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProtectionContainerProperties deserializedProtectionContainerProperties - = new ProtectionContainerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fabricFriendlyName".equals(fieldName)) { - deserializedProtectionContainerProperties.fabricFriendlyName = reader.getString(); - } else if ("friendlyName".equals(fieldName)) { - deserializedProtectionContainerProperties.friendlyName = reader.getString(); - } else if ("fabricType".equals(fieldName)) { - deserializedProtectionContainerProperties.fabricType = reader.getString(); - } else if ("protectedItemCount".equals(fieldName)) { - deserializedProtectionContainerProperties.protectedItemCount - = reader.getNullable(JsonReader::getInt); - } else if ("pairingStatus".equals(fieldName)) { - deserializedProtectionContainerProperties.pairingStatus = reader.getString(); - } else if ("role".equals(fieldName)) { - deserializedProtectionContainerProperties.role = reader.getString(); - } else if ("fabricSpecificDetails".equals(fieldName)) { - deserializedProtectionContainerProperties.fabricSpecificDetails - = ProtectionContainerFabricSpecificDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedProtectionContainerProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionHealth.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionHealth.java deleted file mode 100644 index 4c6afa4e4ba9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionHealth.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The health. - */ -public final class ProtectionHealth extends ExpandableStringEnum { - /** - * Static value None for ProtectionHealth. - */ - public static final ProtectionHealth NONE = fromString("None"); - - /** - * Static value Normal for ProtectionHealth. - */ - public static final ProtectionHealth NORMAL = fromString("Normal"); - - /** - * Static value Warning for ProtectionHealth. - */ - public static final ProtectionHealth WARNING = fromString("Warning"); - - /** - * Static value Critical for ProtectionHealth. - */ - public static final ProtectionHealth CRITICAL = fromString("Critical"); - - /** - * Creates a new instance of ProtectionHealth value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ProtectionHealth() { - } - - /** - * Creates or finds a ProtectionHealth from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProtectionHealth. - */ - public static ProtectionHealth fromString(String name) { - return fromString(name, ProtectionHealth.class); - } - - /** - * Gets known ProtectionHealth values. - * - * @return known ProtectionHealth values. - */ - public static Collection values() { - return values(ProtectionHealth.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionProfileCustomDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionProfileCustomDetails.java deleted file mode 100644 index 8219cb990c6b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProtectionProfileCustomDetails.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Protection Profile custom input. - */ -@Immutable -public class ProtectionProfileCustomDetails implements JsonSerializable { - /* - * The class type. - */ - private String resourceType = "ProtectionProfileCustomDetails"; - - /** - * Creates an instance of ProtectionProfileCustomDetails class. - */ - public ProtectionProfileCustomDetails() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceType", this.resourceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProtectionProfileCustomDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProtectionProfileCustomDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ProtectionProfileCustomDetails. - */ - public static ProtectionProfileCustomDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("resourceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Existing".equals(discriminatorValue)) { - return ExistingProtectionProfile.fromJson(readerToUse.reset()); - } else if ("New".equals(discriminatorValue)) { - return NewProtectionProfile.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ProtectionProfileCustomDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProtectionProfileCustomDetails deserializedProtectionProfileCustomDetails - = new ProtectionProfileCustomDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceType".equals(fieldName)) { - deserializedProtectionProfileCustomDetails.resourceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProtectionProfileCustomDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProviderError.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProviderError.java deleted file mode 100644 index 96082cd9c031..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProviderError.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * This class contains the error details per object. - */ -@Fluent -public final class ProviderError implements JsonSerializable { - /* - * The Error code. - */ - private Integer errorCode; - - /* - * The Error message. - */ - private String errorMessage; - - /* - * The Provider error Id. - */ - private String errorId; - - /* - * The possible causes for the error. - */ - private String possibleCauses; - - /* - * The recommended action to resolve the error. - */ - private String recommendedAction; - - /** - * Creates an instance of ProviderError class. - */ - public ProviderError() { - } - - /** - * Get the errorCode property: The Error code. - * - * @return the errorCode value. - */ - public Integer errorCode() { - return this.errorCode; - } - - /** - * Set the errorCode property: 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 errorMessage property: The Error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: 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 errorId property: The Provider error Id. - * - * @return the errorId value. - */ - public String errorId() { - return this.errorId; - } - - /** - * Set the errorId property: 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 possibleCauses property: The possible causes for the error. - * - * @return the possibleCauses value. - */ - public String possibleCauses() { - return this.possibleCauses; - } - - /** - * Set the possibleCauses property: 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 recommendedAction property: The recommended action to resolve the error. - * - * @return the recommendedAction value. - */ - public String recommendedAction() { - return this.recommendedAction; - } - - /** - * Set the recommendedAction property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("errorCode", this.errorCode); - jsonWriter.writeStringField("errorMessage", this.errorMessage); - jsonWriter.writeStringField("errorId", this.errorId); - jsonWriter.writeStringField("possibleCauses", this.possibleCauses); - jsonWriter.writeStringField("recommendedAction", this.recommendedAction); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProviderError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProviderError if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ProviderError. - */ - public static ProviderError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProviderError deserializedProviderError = new ProviderError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("errorCode".equals(fieldName)) { - deserializedProviderError.errorCode = reader.getNullable(JsonReader::getInt); - } else if ("errorMessage".equals(fieldName)) { - deserializedProviderError.errorMessage = reader.getString(); - } else if ("errorId".equals(fieldName)) { - deserializedProviderError.errorId = reader.getString(); - } else if ("possibleCauses".equals(fieldName)) { - deserializedProviderError.possibleCauses = reader.getString(); - } else if ("recommendedAction".equals(fieldName)) { - deserializedProviderError.recommendedAction = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProviderError; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProviderSpecificRecoveryPointDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProviderSpecificRecoveryPointDetails.java deleted file mode 100644 index 4a8b8fe275c9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ProviderSpecificRecoveryPointDetails.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Replication provider specific recovery point details. - */ -@Immutable -public class ProviderSpecificRecoveryPointDetails implements JsonSerializable { - /* - * Gets the provider type. - */ - private String instanceType = "ProviderSpecificRecoveryPointDetails"; - - /** - * Creates an instance of ProviderSpecificRecoveryPointDetails class. - */ - public ProviderSpecificRecoveryPointDetails() { - } - - /** - * Get the instanceType property: Gets the provider type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProviderSpecificRecoveryPointDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProviderSpecificRecoveryPointDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ProviderSpecificRecoveryPointDetails. - */ - public static ProviderSpecificRecoveryPointDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2ARecoveryPointDetails.fromJson(readerToUse.reset()); - } else if ("InMageAzureV2".equals(discriminatorValue)) { - return InMageAzureV2RecoveryPointDetails.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmRecoveryPointDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ProviderSpecificRecoveryPointDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProviderSpecificRecoveryPointDetails deserializedProviderSpecificRecoveryPointDetails - = new ProviderSpecificRecoveryPointDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedProviderSpecificRecoveryPointDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProviderSpecificRecoveryPointDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PushInstallerDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PushInstallerDetails.java deleted file mode 100644 index 62a17b57cb45..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/PushInstallerDetails.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Push installer details. - */ -@Immutable -public final class PushInstallerDetails implements JsonSerializable { - /* - * The push installer Id. - */ - private String id; - - /* - * The push installer name. - */ - private String name; - - /* - * The push installer Bios Id. - */ - private String biosId; - - /* - * The fabric object Id. - */ - private String fabricObjectId; - - /* - * The push installer Fqdn. - */ - private String fqdn; - - /* - * The version. - */ - private String version; - - /* - * The last heartbeat received from the push installer. - */ - private OffsetDateTime lastHeartbeatUtc; - - /* - * The health of the push installer. - */ - private ProtectionHealth health; - - /* - * The health errors. - */ - private List healthErrors; - - /** - * Creates an instance of PushInstallerDetails class. - */ - public PushInstallerDetails() { - } - - /** - * Get the id property: The push installer Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The push installer name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the biosId property: The push installer Bios Id. - * - * @return the biosId value. - */ - public String biosId() { - return this.biosId; - } - - /** - * Get the fabricObjectId property: The fabric object Id. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Get the fqdn property: The push installer Fqdn. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the version property: The version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the lastHeartbeatUtc property: The last heartbeat received from the push installer. - * - * @return the lastHeartbeatUtc value. - */ - public OffsetDateTime lastHeartbeatUtc() { - return this.lastHeartbeatUtc; - } - - /** - * Get the health property: The health of the push installer. - * - * @return the health value. - */ - public ProtectionHealth health() { - return this.health; - } - - /** - * Get the healthErrors property: The health errors. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PushInstallerDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PushInstallerDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the PushInstallerDetails. - */ - public static PushInstallerDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PushInstallerDetails deserializedPushInstallerDetails = new PushInstallerDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPushInstallerDetails.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPushInstallerDetails.name = reader.getString(); - } else if ("biosId".equals(fieldName)) { - deserializedPushInstallerDetails.biosId = reader.getString(); - } else if ("fabricObjectId".equals(fieldName)) { - deserializedPushInstallerDetails.fabricObjectId = reader.getString(); - } else if ("fqdn".equals(fieldName)) { - deserializedPushInstallerDetails.fqdn = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedPushInstallerDetails.version = reader.getString(); - } else if ("lastHeartbeatUtc".equals(fieldName)) { - deserializedPushInstallerDetails.lastHeartbeatUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("health".equals(fieldName)) { - deserializedPushInstallerDetails.health = ProtectionHealth.fromString(reader.getString()); - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedPushInstallerDetails.healthErrors = healthErrors; - } else { - reader.skipChildren(); - } - } - - return deserializedPushInstallerDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RcmComponentStatus.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RcmComponentStatus.java deleted file mode 100644 index 08083cd3b8ca..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RcmComponentStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The throughput status. - */ -public final class RcmComponentStatus extends ExpandableStringEnum { - /** - * Static value Healthy for RcmComponentStatus. - */ - public static final RcmComponentStatus HEALTHY = fromString("Healthy"); - - /** - * Static value Warning for RcmComponentStatus. - */ - public static final RcmComponentStatus WARNING = fromString("Warning"); - - /** - * Static value Critical for RcmComponentStatus. - */ - public static final RcmComponentStatus CRITICAL = fromString("Critical"); - - /** - * Static value Unknown for RcmComponentStatus. - */ - public static final RcmComponentStatus UNKNOWN = fromString("Unknown"); - - /** - * Creates a new instance of RcmComponentStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RcmComponentStatus() { - } - - /** - * Creates or finds a RcmComponentStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding RcmComponentStatus. - */ - public static RcmComponentStatus fromString(String name) { - return fromString(name, RcmComponentStatus.class); - } - - /** - * Gets known RcmComponentStatus values. - * - * @return known RcmComponentStatus values. - */ - public static Collection values() { - return values(RcmComponentStatus.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RcmProxyDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RcmProxyDetails.java deleted file mode 100644 index 80320a673072..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RcmProxyDetails.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * RCM proxy details. - */ -@Immutable -public final class RcmProxyDetails implements JsonSerializable { - /* - * The RCM proxy Id. - */ - private String id; - - /* - * The RCM proxy name. - */ - private String name; - - /* - * The RCM proxy Bios Id. - */ - private String biosId; - - /* - * The fabric object Id. - */ - private String fabricObjectId; - - /* - * The RCM proxy Fqdn. - */ - private String fqdn; - - /* - * The client authentication type. - */ - private String clientAuthenticationType; - - /* - * The version. - */ - private String version; - - /* - * The last heartbeat received from the RCM proxy. - */ - private OffsetDateTime lastHeartbeatUtc; - - /* - * The health of the RCM proxy. - */ - private ProtectionHealth health; - - /* - * The health errors. - */ - private List healthErrors; - - /** - * Creates an instance of RcmProxyDetails class. - */ - public RcmProxyDetails() { - } - - /** - * Get the id property: The RCM proxy Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The RCM proxy name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the biosId property: The RCM proxy Bios Id. - * - * @return the biosId value. - */ - public String biosId() { - return this.biosId; - } - - /** - * Get the fabricObjectId property: The fabric object Id. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Get the fqdn property: The RCM proxy Fqdn. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the clientAuthenticationType property: The client authentication type. - * - * @return the clientAuthenticationType value. - */ - public String clientAuthenticationType() { - return this.clientAuthenticationType; - } - - /** - * Get the version property: The version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the lastHeartbeatUtc property: The last heartbeat received from the RCM proxy. - * - * @return the lastHeartbeatUtc value. - */ - public OffsetDateTime lastHeartbeatUtc() { - return this.lastHeartbeatUtc; - } - - /** - * Get the health property: The health of the RCM proxy. - * - * @return the health value. - */ - public ProtectionHealth health() { - return this.health; - } - - /** - * Get the healthErrors property: The health errors. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RcmProxyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RcmProxyDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RcmProxyDetails. - */ - public static RcmProxyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RcmProxyDetails deserializedRcmProxyDetails = new RcmProxyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRcmProxyDetails.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRcmProxyDetails.name = reader.getString(); - } else if ("biosId".equals(fieldName)) { - deserializedRcmProxyDetails.biosId = reader.getString(); - } else if ("fabricObjectId".equals(fieldName)) { - deserializedRcmProxyDetails.fabricObjectId = reader.getString(); - } else if ("fqdn".equals(fieldName)) { - deserializedRcmProxyDetails.fqdn = reader.getString(); - } else if ("clientAuthenticationType".equals(fieldName)) { - deserializedRcmProxyDetails.clientAuthenticationType = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedRcmProxyDetails.version = reader.getString(); - } else if ("lastHeartbeatUtc".equals(fieldName)) { - deserializedRcmProxyDetails.lastHeartbeatUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("health".equals(fieldName)) { - deserializedRcmProxyDetails.health = ProtectionHealth.fromString(reader.getString()); - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedRcmProxyDetails.healthErrors = healthErrors; - } else { - reader.skipChildren(); - } - } - - return deserializedRcmProxyDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryAvailabilitySetCustomDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryAvailabilitySetCustomDetails.java deleted file mode 100644 index 91b7523af3cd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryAvailabilitySetCustomDetails.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery Availability Set custom input. - */ -@Immutable -public class RecoveryAvailabilitySetCustomDetails implements JsonSerializable { - /* - * The class type. - */ - private String resourceType = "RecoveryAvailabilitySetCustomDetails"; - - /** - * Creates an instance of RecoveryAvailabilitySetCustomDetails class. - */ - public RecoveryAvailabilitySetCustomDetails() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceType", this.resourceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryAvailabilitySetCustomDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryAvailabilitySetCustomDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryAvailabilitySetCustomDetails. - */ - public static RecoveryAvailabilitySetCustomDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("resourceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Existing".equals(discriminatorValue)) { - return ExistingRecoveryAvailabilitySet.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static RecoveryAvailabilitySetCustomDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryAvailabilitySetCustomDetails deserializedRecoveryAvailabilitySetCustomDetails - = new RecoveryAvailabilitySetCustomDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceType".equals(fieldName)) { - deserializedRecoveryAvailabilitySetCustomDetails.resourceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryAvailabilitySetCustomDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlan.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlan.java deleted file mode 100644 index 15fe596a8a64..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlan.java +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPlanInner; - -/** - * An immutable client-side representation of RecoveryPlan. - */ -public interface RecoveryPlan { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The custom details. - * - * @return the properties value. - */ - RecoveryPlanProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPlanInner object. - * - * @return the inner object. - */ - RecoveryPlanInner innerModel(); - - /** - * The entirety of the RecoveryPlan definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The RecoveryPlan definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the RecoveryPlan definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the RecoveryPlan definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @return the next definition stage. - */ - WithProperties withExistingVault(String resourceName, String resourceGroupName); - } - - /** - * The stage of the RecoveryPlan definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Recovery plan creation properties.. - * - * @param properties Recovery plan creation properties. - * @return the next definition stage. - */ - WithCreate withProperties(CreateRecoveryPlanInputProperties properties); - } - - /** - * The stage of the RecoveryPlan definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - RecoveryPlan create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - RecoveryPlan create(Context context); - } - } - - /** - * Begins update for the RecoveryPlan resource. - * - * @return the stage of resource update. - */ - RecoveryPlan.Update update(); - - /** - * The template for RecoveryPlan update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - RecoveryPlan apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - RecoveryPlan apply(Context context); - } - - /** - * The RecoveryPlan update stages. - */ - interface UpdateStages { - /** - * The stage of the RecoveryPlan update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Recovery plan update properties.. - * - * @param properties Recovery plan update properties. - * @return the next definition stage. - */ - Update withProperties(UpdateRecoveryPlanInputProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - RecoveryPlan refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - RecoveryPlan refresh(Context context); - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan failoverCancel(); - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan failoverCancel(Context context); - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan failoverCommit(); - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan failoverCommit(Context context); - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param input Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan plannedFailover(RecoveryPlanPlannedFailoverInput input); - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param input Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan plannedFailover(RecoveryPlanPlannedFailoverInput input, Context context); - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan reprotect(); - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan reprotect(Context context); - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param input Recovery plan test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan testFailover(RecoveryPlanTestFailoverInput input); - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param input Recovery plan test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan testFailover(RecoveryPlanTestFailoverInput input, Context context); - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param input Recovery plan test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan testFailoverCleanup(RecoveryPlanTestFailoverCleanupInput input); - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param input Recovery plan test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan testFailoverCleanup(RecoveryPlanTestFailoverCleanupInput input, Context context); - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param input Recovery plan unplanned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan unplannedFailover(RecoveryPlanUnplannedFailoverInput input); - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param input Recovery plan unplanned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan unplannedFailover(RecoveryPlanUnplannedFailoverInput input, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanA2ADetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanA2ADetails.java deleted file mode 100644 index 7930c49f2b74..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanA2ADetails.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan A2A specific details. - */ -@Fluent -public final class RecoveryPlanA2ADetails extends RecoveryPlanProviderSpecificDetails { - /* - * Gets the Instance type. - */ - private String instanceType = "A2A"; - - /* - * The primary zone. - */ - private String primaryZone; - - /* - * The recovery zone. - */ - private String recoveryZone; - - /* - * The primary extended location. - */ - private ExtendedLocation primaryExtendedLocation; - - /* - * The recovery extended location. - */ - private ExtendedLocation recoveryExtendedLocation; - - /** - * Creates an instance of RecoveryPlanA2ADetails class. - */ - public RecoveryPlanA2ADetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the primaryZone property: The primary zone. - * - * @return the primaryZone value. - */ - public String primaryZone() { - return this.primaryZone; - } - - /** - * Set the primaryZone property: The primary zone. - * - * @param primaryZone the primaryZone value to set. - * @return the RecoveryPlanA2ADetails object itself. - */ - public RecoveryPlanA2ADetails withPrimaryZone(String primaryZone) { - this.primaryZone = primaryZone; - return this; - } - - /** - * Get the recoveryZone property: The recovery zone. - * - * @return the recoveryZone value. - */ - public String recoveryZone() { - return this.recoveryZone; - } - - /** - * Set the recoveryZone property: The recovery zone. - * - * @param recoveryZone the recoveryZone value to set. - * @return the RecoveryPlanA2ADetails object itself. - */ - public RecoveryPlanA2ADetails withRecoveryZone(String recoveryZone) { - this.recoveryZone = recoveryZone; - return this; - } - - /** - * Get the primaryExtendedLocation property: The primary extended location. - * - * @return the primaryExtendedLocation value. - */ - public ExtendedLocation primaryExtendedLocation() { - return this.primaryExtendedLocation; - } - - /** - * Set the primaryExtendedLocation property: The primary extended location. - * - * @param primaryExtendedLocation the primaryExtendedLocation value to set. - * @return the RecoveryPlanA2ADetails object itself. - */ - public RecoveryPlanA2ADetails withPrimaryExtendedLocation(ExtendedLocation primaryExtendedLocation) { - this.primaryExtendedLocation = primaryExtendedLocation; - return this; - } - - /** - * Get the recoveryExtendedLocation property: The recovery extended location. - * - * @return the recoveryExtendedLocation value. - */ - public ExtendedLocation recoveryExtendedLocation() { - return this.recoveryExtendedLocation; - } - - /** - * Set the recoveryExtendedLocation property: The recovery extended location. - * - * @param recoveryExtendedLocation the recoveryExtendedLocation value to set. - * @return the RecoveryPlanA2ADetails object itself. - */ - public RecoveryPlanA2ADetails withRecoveryExtendedLocation(ExtendedLocation recoveryExtendedLocation) { - this.recoveryExtendedLocation = recoveryExtendedLocation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (primaryExtendedLocation() != null) { - primaryExtendedLocation().validate(); - } - if (recoveryExtendedLocation() != null) { - recoveryExtendedLocation().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("primaryZone", this.primaryZone); - jsonWriter.writeStringField("recoveryZone", this.recoveryZone); - jsonWriter.writeJsonField("primaryExtendedLocation", this.primaryExtendedLocation); - jsonWriter.writeJsonField("recoveryExtendedLocation", this.recoveryExtendedLocation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanA2ADetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanA2ADetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanA2ADetails. - */ - public static RecoveryPlanA2ADetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanA2ADetails deserializedRecoveryPlanA2ADetails = new RecoveryPlanA2ADetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanA2ADetails.instanceType = reader.getString(); - } else if ("primaryZone".equals(fieldName)) { - deserializedRecoveryPlanA2ADetails.primaryZone = reader.getString(); - } else if ("recoveryZone".equals(fieldName)) { - deserializedRecoveryPlanA2ADetails.recoveryZone = reader.getString(); - } else if ("primaryExtendedLocation".equals(fieldName)) { - deserializedRecoveryPlanA2ADetails.primaryExtendedLocation = ExtendedLocation.fromJson(reader); - } else if ("recoveryExtendedLocation".equals(fieldName)) { - deserializedRecoveryPlanA2ADetails.recoveryExtendedLocation = ExtendedLocation.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanA2ADetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanA2AFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanA2AFailoverInput.java deleted file mode 100644 index 1bcfef460611..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanA2AFailoverInput.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan A2A failover input. - */ -@Fluent -public final class RecoveryPlanA2AFailoverInput extends RecoveryPlanProviderSpecificFailoverInput { - /* - * The class type. - */ - private String instanceType = "A2A"; - - /* - * The recovery point type. - */ - private A2ARpRecoveryPointType recoveryPointType; - - /* - * A value indicating whether to use recovery cloud service for TFO or not. - */ - private String cloudServiceCreationOption; - - /* - * A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. - */ - private MultiVmSyncPointOption multiVmSyncPointOption; - - /** - * Creates an instance of RecoveryPlanA2AFailoverInput class. - */ - public RecoveryPlanA2AFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointType property: The recovery point type. - * - * @return the recoveryPointType value. - */ - public A2ARpRecoveryPointType recoveryPointType() { - return this.recoveryPointType; - } - - /** - * Set the recoveryPointType property: The recovery point type. - * - * @param recoveryPointType the recoveryPointType value to set. - * @return the RecoveryPlanA2AFailoverInput object itself. - */ - public RecoveryPlanA2AFailoverInput withRecoveryPointType(A2ARpRecoveryPointType recoveryPointType) { - this.recoveryPointType = recoveryPointType; - return this; - } - - /** - * Get the cloudServiceCreationOption property: A value indicating whether to use recovery cloud service for TFO or - * not. - * - * @return the cloudServiceCreationOption value. - */ - public String cloudServiceCreationOption() { - return this.cloudServiceCreationOption; - } - - /** - * Set the cloudServiceCreationOption property: 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; - } - - /** - * Get the multiVmSyncPointOption property: A value indicating whether multi VM sync enabled VMs should use multi VM - * sync points for failover. - * - * @return the multiVmSyncPointOption value. - */ - public MultiVmSyncPointOption multiVmSyncPointOption() { - return this.multiVmSyncPointOption; - } - - /** - * Set the multiVmSyncPointOption property: A value indicating whether multi VM sync enabled VMs should use multi VM - * sync points for failover. - * - * @param multiVmSyncPointOption the multiVmSyncPointOption value to set. - * @return the RecoveryPlanA2AFailoverInput object itself. - */ - public RecoveryPlanA2AFailoverInput withMultiVmSyncPointOption(MultiVmSyncPointOption multiVmSyncPointOption) { - this.multiVmSyncPointOption = multiVmSyncPointOption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryPointType in model RecoveryPlanA2AFailoverInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanA2AFailoverInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryPointType", - this.recoveryPointType == null ? null : this.recoveryPointType.toString()); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("cloudServiceCreationOption", this.cloudServiceCreationOption); - jsonWriter.writeStringField("multiVmSyncPointOption", - this.multiVmSyncPointOption == null ? null : this.multiVmSyncPointOption.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanA2AFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanA2AFailoverInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanA2AFailoverInput. - */ - public static RecoveryPlanA2AFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanA2AFailoverInput deserializedRecoveryPlanA2AFailoverInput = new RecoveryPlanA2AFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryPointType".equals(fieldName)) { - deserializedRecoveryPlanA2AFailoverInput.recoveryPointType - = A2ARpRecoveryPointType.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanA2AFailoverInput.instanceType = reader.getString(); - } else if ("cloudServiceCreationOption".equals(fieldName)) { - deserializedRecoveryPlanA2AFailoverInput.cloudServiceCreationOption = reader.getString(); - } else if ("multiVmSyncPointOption".equals(fieldName)) { - deserializedRecoveryPlanA2AFailoverInput.multiVmSyncPointOption - = MultiVmSyncPointOption.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanA2AFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanA2AInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanA2AInput.java deleted file mode 100644 index f2467dffeaaf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanA2AInput.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan A2A input. - */ -@Fluent -public final class RecoveryPlanA2AInput extends RecoveryPlanProviderSpecificInput { - /* - * Gets the Instance type. - */ - private String instanceType = "A2A"; - - /* - * The primary zone. - */ - private String primaryZone; - - /* - * The recovery zone. - */ - private String recoveryZone; - - /* - * The primary extended location. - */ - private ExtendedLocation primaryExtendedLocation; - - /* - * The recovery extended location. - */ - private ExtendedLocation recoveryExtendedLocation; - - /** - * Creates an instance of RecoveryPlanA2AInput class. - */ - public RecoveryPlanA2AInput() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the primaryZone property: The primary zone. - * - * @return the primaryZone value. - */ - public String primaryZone() { - return this.primaryZone; - } - - /** - * Set the primaryZone property: The primary zone. - * - * @param primaryZone the primaryZone value to set. - * @return the RecoveryPlanA2AInput object itself. - */ - public RecoveryPlanA2AInput withPrimaryZone(String primaryZone) { - this.primaryZone = primaryZone; - return this; - } - - /** - * Get the recoveryZone property: The recovery zone. - * - * @return the recoveryZone value. - */ - public String recoveryZone() { - return this.recoveryZone; - } - - /** - * Set the recoveryZone property: The recovery zone. - * - * @param recoveryZone the recoveryZone value to set. - * @return the RecoveryPlanA2AInput object itself. - */ - public RecoveryPlanA2AInput withRecoveryZone(String recoveryZone) { - this.recoveryZone = recoveryZone; - return this; - } - - /** - * Get the primaryExtendedLocation property: The primary extended location. - * - * @return the primaryExtendedLocation value. - */ - public ExtendedLocation primaryExtendedLocation() { - return this.primaryExtendedLocation; - } - - /** - * Set the primaryExtendedLocation property: The primary extended location. - * - * @param primaryExtendedLocation the primaryExtendedLocation value to set. - * @return the RecoveryPlanA2AInput object itself. - */ - public RecoveryPlanA2AInput withPrimaryExtendedLocation(ExtendedLocation primaryExtendedLocation) { - this.primaryExtendedLocation = primaryExtendedLocation; - return this; - } - - /** - * Get the recoveryExtendedLocation property: The recovery extended location. - * - * @return the recoveryExtendedLocation value. - */ - public ExtendedLocation recoveryExtendedLocation() { - return this.recoveryExtendedLocation; - } - - /** - * Set the recoveryExtendedLocation property: The recovery extended location. - * - * @param recoveryExtendedLocation the recoveryExtendedLocation value to set. - * @return the RecoveryPlanA2AInput object itself. - */ - public RecoveryPlanA2AInput withRecoveryExtendedLocation(ExtendedLocation recoveryExtendedLocation) { - this.recoveryExtendedLocation = recoveryExtendedLocation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (primaryExtendedLocation() != null) { - primaryExtendedLocation().validate(); - } - if (recoveryExtendedLocation() != null) { - recoveryExtendedLocation().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("primaryZone", this.primaryZone); - jsonWriter.writeStringField("recoveryZone", this.recoveryZone); - jsonWriter.writeJsonField("primaryExtendedLocation", this.primaryExtendedLocation); - jsonWriter.writeJsonField("recoveryExtendedLocation", this.recoveryExtendedLocation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanA2AInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanA2AInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanA2AInput. - */ - public static RecoveryPlanA2AInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanA2AInput deserializedRecoveryPlanA2AInput = new RecoveryPlanA2AInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanA2AInput.instanceType = reader.getString(); - } else if ("primaryZone".equals(fieldName)) { - deserializedRecoveryPlanA2AInput.primaryZone = reader.getString(); - } else if ("recoveryZone".equals(fieldName)) { - deserializedRecoveryPlanA2AInput.recoveryZone = reader.getString(); - } else if ("primaryExtendedLocation".equals(fieldName)) { - deserializedRecoveryPlanA2AInput.primaryExtendedLocation = ExtendedLocation.fromJson(reader); - } else if ("recoveryExtendedLocation".equals(fieldName)) { - deserializedRecoveryPlanA2AInput.recoveryExtendedLocation = ExtendedLocation.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanA2AInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanAction.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanAction.java deleted file mode 100644 index b490e90c2da1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanAction.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Recovery plan action details. - */ -@Fluent -public final class RecoveryPlanAction implements JsonSerializable { - /* - * The action name. - */ - private String actionName; - - /* - * The list of failover types. - */ - private List failoverTypes; - - /* - * The list of failover directions. - */ - private List failoverDirections; - - /* - * The custom details. - */ - private RecoveryPlanActionDetails customDetails; - - /** - * Creates an instance of RecoveryPlanAction class. - */ - public RecoveryPlanAction() { - } - - /** - * Get the actionName property: The action name. - * - * @return the actionName value. - */ - public String actionName() { - return this.actionName; - } - - /** - * Set the actionName property: 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 failoverTypes property: The list of failover types. - * - * @return the failoverTypes value. - */ - public List failoverTypes() { - return this.failoverTypes; - } - - /** - * Set the failoverTypes property: 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 failoverDirections property: The list of failover directions. - * - * @return the failoverDirections value. - */ - public List failoverDirections() { - return this.failoverDirections; - } - - /** - * Set the failoverDirections property: 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 customDetails property: The custom details. - * - * @return the customDetails value. - */ - public RecoveryPlanActionDetails customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (actionName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property actionName in model RecoveryPlanAction")); - } - if (failoverTypes() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property failoverTypes in model RecoveryPlanAction")); - } - if (failoverDirections() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property failoverDirections in model RecoveryPlanAction")); - } - if (customDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property customDetails in model RecoveryPlanAction")); - } else { - customDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanAction.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("actionName", this.actionName); - jsonWriter.writeArrayField("failoverTypes", this.failoverTypes, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeArrayField("failoverDirections", this.failoverDirections, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeJsonField("customDetails", this.customDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanAction from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanAction if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanAction. - */ - public static RecoveryPlanAction fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanAction deserializedRecoveryPlanAction = new RecoveryPlanAction(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("actionName".equals(fieldName)) { - deserializedRecoveryPlanAction.actionName = reader.getString(); - } else if ("failoverTypes".equals(fieldName)) { - List failoverTypes = reader - .readArray(reader1 -> ReplicationProtectedItemOperation.fromString(reader1.getString())); - deserializedRecoveryPlanAction.failoverTypes = failoverTypes; - } else if ("failoverDirections".equals(fieldName)) { - List failoverDirections - = reader.readArray(reader1 -> PossibleOperationsDirections.fromString(reader1.getString())); - deserializedRecoveryPlanAction.failoverDirections = failoverDirections; - } else if ("customDetails".equals(fieldName)) { - deserializedRecoveryPlanAction.customDetails = RecoveryPlanActionDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanAction; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanActionDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanActionDetails.java deleted file mode 100644 index 9db132842c8c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanActionDetails.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan action custom details. - */ -@Immutable -public class RecoveryPlanActionDetails implements JsonSerializable { - /* - * Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for possible values). - */ - private String instanceType = "RecoveryPlanActionDetails"; - - /** - * Creates an instance of RecoveryPlanActionDetails class. - */ - public RecoveryPlanActionDetails() { - } - - /** - * Get the instanceType property: Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for - * possible values). - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanActionDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanActionDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanActionDetails. - */ - public static RecoveryPlanActionDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AutomationRunbookActionDetails".equals(discriminatorValue)) { - return RecoveryPlanAutomationRunbookActionDetails.fromJson(readerToUse.reset()); - } else if ("ManualActionDetails".equals(discriminatorValue)) { - return RecoveryPlanManualActionDetails.fromJson(readerToUse.reset()); - } else if ("ScriptActionDetails".equals(discriminatorValue)) { - return RecoveryPlanScriptActionDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static RecoveryPlanActionDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanActionDetails deserializedRecoveryPlanActionDetails = new RecoveryPlanActionDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanActionDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanActionDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanActionLocation.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanActionLocation.java deleted file mode 100644 index ac4516648dff..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanActionLocation.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The fabric location. - */ -public final class RecoveryPlanActionLocation extends ExpandableStringEnum { - /** - * Static value Primary for RecoveryPlanActionLocation. - */ - public static final RecoveryPlanActionLocation PRIMARY = fromString("Primary"); - - /** - * Static value Recovery for RecoveryPlanActionLocation. - */ - public static final RecoveryPlanActionLocation RECOVERY = fromString("Recovery"); - - /** - * Creates a new instance of RecoveryPlanActionLocation value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RecoveryPlanActionLocation() { - } - - /** - * Creates or finds a RecoveryPlanActionLocation from its string representation. - * - * @param name a name to look for. - * @return the corresponding RecoveryPlanActionLocation. - */ - public static RecoveryPlanActionLocation fromString(String name) { - return fromString(name, RecoveryPlanActionLocation.class); - } - - /** - * Gets known RecoveryPlanActionLocation values. - * - * @return known RecoveryPlanActionLocation values. - */ - public static Collection values() { - return values(RecoveryPlanActionLocation.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanAutomationRunbookActionDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanAutomationRunbookActionDetails.java deleted file mode 100644 index ea91dbb754e9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanAutomationRunbookActionDetails.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan Automation runbook action details. - */ -@Fluent -public final class RecoveryPlanAutomationRunbookActionDetails extends RecoveryPlanActionDetails { - /* - * Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for possible values). - */ - private String instanceType = "AutomationRunbookActionDetails"; - - /* - * The runbook ARM Id. - */ - private String runbookId; - - /* - * The runbook timeout. - */ - private String timeout; - - /* - * The fabric location. - */ - private RecoveryPlanActionLocation fabricLocation; - - /** - * Creates an instance of RecoveryPlanAutomationRunbookActionDetails class. - */ - public RecoveryPlanAutomationRunbookActionDetails() { - } - - /** - * Get the instanceType property: Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for - * possible values). - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the runbookId property: The runbook ARM Id. - * - * @return the runbookId value. - */ - public String runbookId() { - return this.runbookId; - } - - /** - * Set the runbookId property: 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 timeout property: The runbook timeout. - * - * @return the timeout value. - */ - public String timeout() { - return this.timeout; - } - - /** - * Set the timeout property: 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 fabricLocation property: The fabric location. - * - * @return the fabricLocation value. - */ - public RecoveryPlanActionLocation fabricLocation() { - return this.fabricLocation; - } - - /** - * Set the fabricLocation property: The fabric location. - * - * @param fabricLocation the fabricLocation value to set. - * @return the RecoveryPlanAutomationRunbookActionDetails object itself. - */ - public RecoveryPlanAutomationRunbookActionDetails withFabricLocation(RecoveryPlanActionLocation fabricLocation) { - this.fabricLocation = fabricLocation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (fabricLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property fabricLocation in model RecoveryPlanAutomationRunbookActionDetails")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanAutomationRunbookActionDetails.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fabricLocation", - this.fabricLocation == null ? null : this.fabricLocation.toString()); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("runbookId", this.runbookId); - jsonWriter.writeStringField("timeout", this.timeout); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanAutomationRunbookActionDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanAutomationRunbookActionDetails if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanAutomationRunbookActionDetails. - */ - public static RecoveryPlanAutomationRunbookActionDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanAutomationRunbookActionDetails deserializedRecoveryPlanAutomationRunbookActionDetails - = new RecoveryPlanAutomationRunbookActionDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fabricLocation".equals(fieldName)) { - deserializedRecoveryPlanAutomationRunbookActionDetails.fabricLocation - = RecoveryPlanActionLocation.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanAutomationRunbookActionDetails.instanceType = reader.getString(); - } else if ("runbookId".equals(fieldName)) { - deserializedRecoveryPlanAutomationRunbookActionDetails.runbookId = reader.getString(); - } else if ("timeout".equals(fieldName)) { - deserializedRecoveryPlanAutomationRunbookActionDetails.timeout = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanAutomationRunbookActionDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanCollection.java deleted file mode 100644 index 98339e84a354..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanCollection.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPlanInner; -import java.io.IOException; -import java.util.List; - -/** - * Recovery plan collection details. - */ -@Fluent -public final class RecoveryPlanCollection implements JsonSerializable { - /* - * The list of recovery plans. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of RecoveryPlanCollection class. - */ - public RecoveryPlanCollection() { - } - - /** - * Get the value property: The list of recovery plans. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of recovery plans. - * - * @param value the value value to set. - * @return the RecoveryPlanCollection object itself. - */ - public RecoveryPlanCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the RecoveryPlanCollection object itself. - */ - public RecoveryPlanCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanCollection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanCollection. - */ - public static RecoveryPlanCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanCollection deserializedRecoveryPlanCollection = new RecoveryPlanCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> RecoveryPlanInner.fromJson(reader1)); - deserializedRecoveryPlanCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedRecoveryPlanCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanGroup.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanGroup.java deleted file mode 100644 index 8925a4d0aa2b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanGroup.java +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Recovery plan group details. - */ -@Fluent -public final class RecoveryPlanGroup implements JsonSerializable { - /* - * The group type. - */ - private RecoveryPlanGroupType groupType; - - /* - * The list of protected items. - */ - private List replicationProtectedItems; - - /* - * The start group actions. - */ - private List startGroupActions; - - /* - * The end group actions. - */ - private List endGroupActions; - - /** - * Creates an instance of RecoveryPlanGroup class. - */ - public RecoveryPlanGroup() { - } - - /** - * Get the groupType property: The group type. - * - * @return the groupType value. - */ - public RecoveryPlanGroupType groupType() { - return this.groupType; - } - - /** - * Set the groupType property: The group type. - * - * @param groupType the groupType value to set. - * @return the RecoveryPlanGroup object itself. - */ - public RecoveryPlanGroup withGroupType(RecoveryPlanGroupType groupType) { - this.groupType = groupType; - return this; - } - - /** - * Get the replicationProtectedItems property: The list of protected items. - * - * @return the replicationProtectedItems value. - */ - public List replicationProtectedItems() { - return this.replicationProtectedItems; - } - - /** - * Set the replicationProtectedItems property: 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 startGroupActions property: The start group actions. - * - * @return the startGroupActions value. - */ - public List startGroupActions() { - return this.startGroupActions; - } - - /** - * Set the startGroupActions property: 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 endGroupActions property: The end group actions. - * - * @return the endGroupActions value. - */ - public List endGroupActions() { - return this.endGroupActions; - } - - /** - * Set the endGroupActions property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (groupType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property groupType in model RecoveryPlanGroup")); - } - if (replicationProtectedItems() != null) { - replicationProtectedItems().forEach(e -> e.validate()); - } - if (startGroupActions() != null) { - startGroupActions().forEach(e -> e.validate()); - } - if (endGroupActions() != null) { - endGroupActions().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanGroup.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("groupType", this.groupType == null ? null : this.groupType.toString()); - jsonWriter.writeArrayField("replicationProtectedItems", this.replicationProtectedItems, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("startGroupActions", this.startGroupActions, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("endGroupActions", this.endGroupActions, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanGroup from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanGroup if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanGroup. - */ - public static RecoveryPlanGroup fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanGroup deserializedRecoveryPlanGroup = new RecoveryPlanGroup(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("groupType".equals(fieldName)) { - deserializedRecoveryPlanGroup.groupType = RecoveryPlanGroupType.fromString(reader.getString()); - } else if ("replicationProtectedItems".equals(fieldName)) { - List replicationProtectedItems - = reader.readArray(reader1 -> RecoveryPlanProtectedItem.fromJson(reader1)); - deserializedRecoveryPlanGroup.replicationProtectedItems = replicationProtectedItems; - } else if ("startGroupActions".equals(fieldName)) { - List startGroupActions - = reader.readArray(reader1 -> RecoveryPlanAction.fromJson(reader1)); - deserializedRecoveryPlanGroup.startGroupActions = startGroupActions; - } else if ("endGroupActions".equals(fieldName)) { - List endGroupActions - = reader.readArray(reader1 -> RecoveryPlanAction.fromJson(reader1)); - deserializedRecoveryPlanGroup.endGroupActions = endGroupActions; - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanGroup; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanGroupTaskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanGroupTaskDetails.java deleted file mode 100644 index 96f6c650a13f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanGroupTaskDetails.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * This class represents the recovery plan group task. - */ -@Fluent -public class RecoveryPlanGroupTaskDetails extends GroupTaskDetails { - /* - * The type of task details. - */ - private String instanceType = "RecoveryPlanGroupTaskDetails"; - - /* - * The name. - */ - private String name; - - /* - * The group identifier. - */ - private String groupId; - - /* - * The group type. - */ - private String rpGroupType; - - /** - * Creates an instance of RecoveryPlanGroupTaskDetails class. - */ - public RecoveryPlanGroupTaskDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the name property: The name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 groupId property: The group identifier. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Set the groupId property: 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 rpGroupType property: The group type. - * - * @return the rpGroupType value. - */ - public String rpGroupType() { - return this.rpGroupType; - } - - /** - * Set the rpGroupType property: 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; - } - - /** - * {@inheritDoc} - */ - @Override - public RecoveryPlanGroupTaskDetails withChildTasks(List childTasks) { - super.withChildTasks(childTasks); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (childTasks() != null) { - childTasks().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("childTasks", childTasks(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("groupId", this.groupId); - jsonWriter.writeStringField("rpGroupType", this.rpGroupType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanGroupTaskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanGroupTaskDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanGroupTaskDetails. - */ - public static RecoveryPlanGroupTaskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("RecoveryPlanShutdownGroupTaskDetails".equals(discriminatorValue)) { - return RecoveryPlanShutdownGroupTaskDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static RecoveryPlanGroupTaskDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanGroupTaskDetails deserializedRecoveryPlanGroupTaskDetails = new RecoveryPlanGroupTaskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("childTasks".equals(fieldName)) { - List childTasks = reader.readArray(reader1 -> AsrTask.fromJson(reader1)); - deserializedRecoveryPlanGroupTaskDetails.withChildTasks(childTasks); - } else if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanGroupTaskDetails.instanceType = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRecoveryPlanGroupTaskDetails.name = reader.getString(); - } else if ("groupId".equals(fieldName)) { - deserializedRecoveryPlanGroupTaskDetails.groupId = reader.getString(); - } else if ("rpGroupType".equals(fieldName)) { - deserializedRecoveryPlanGroupTaskDetails.rpGroupType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanGroupTaskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanGroupType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanGroupType.java deleted file mode 100644 index 7f02b6847b0b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanGroupType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The group type. - */ -public final class RecoveryPlanGroupType extends ExpandableStringEnum { - /** - * Static value Shutdown for RecoveryPlanGroupType. - */ - public static final RecoveryPlanGroupType SHUTDOWN = fromString("Shutdown"); - - /** - * Static value Boot for RecoveryPlanGroupType. - */ - public static final RecoveryPlanGroupType BOOT = fromString("Boot"); - - /** - * Static value Failover for RecoveryPlanGroupType. - */ - public static final RecoveryPlanGroupType FAILOVER = fromString("Failover"); - - /** - * Creates a new instance of RecoveryPlanGroupType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RecoveryPlanGroupType() { - } - - /** - * Creates or finds a RecoveryPlanGroupType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RecoveryPlanGroupType. - */ - public static RecoveryPlanGroupType fromString(String name) { - return fromString(name, RecoveryPlanGroupType.class); - } - - /** - * Gets known RecoveryPlanGroupType values. - * - * @return known RecoveryPlanGroupType values. - */ - public static Collection values() { - return values(RecoveryPlanGroupType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanHyperVReplicaAzureFailbackInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanHyperVReplicaAzureFailbackInput.java deleted file mode 100644 index 9e07e4104bdc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanHyperVReplicaAzureFailbackInput.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan HVR Azure failback input. - */ -@Fluent -public final class RecoveryPlanHyperVReplicaAzureFailbackInput extends RecoveryPlanProviderSpecificFailoverInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplicaAzureFailback"; - - /* - * The data sync option. - */ - private DataSyncStatus dataSyncOption; - - /* - * The ALR option. - */ - private AlternateLocationRecoveryOption recoveryVmCreationOption; - - /** - * Creates an instance of RecoveryPlanHyperVReplicaAzureFailbackInput class. - */ - public RecoveryPlanHyperVReplicaAzureFailbackInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the dataSyncOption property: The data sync option. - * - * @return the dataSyncOption value. - */ - public DataSyncStatus dataSyncOption() { - return this.dataSyncOption; - } - - /** - * Set the dataSyncOption property: The data sync option. - * - * @param dataSyncOption the dataSyncOption value to set. - * @return the RecoveryPlanHyperVReplicaAzureFailbackInput object itself. - */ - public RecoveryPlanHyperVReplicaAzureFailbackInput withDataSyncOption(DataSyncStatus dataSyncOption) { - this.dataSyncOption = dataSyncOption; - return this; - } - - /** - * Get the recoveryVmCreationOption property: The ALR option. - * - * @return the recoveryVmCreationOption value. - */ - public AlternateLocationRecoveryOption recoveryVmCreationOption() { - return this.recoveryVmCreationOption; - } - - /** - * Set the recoveryVmCreationOption property: The ALR option. - * - * @param recoveryVmCreationOption the recoveryVmCreationOption value to set. - * @return the RecoveryPlanHyperVReplicaAzureFailbackInput object itself. - */ - public RecoveryPlanHyperVReplicaAzureFailbackInput - withRecoveryVmCreationOption(AlternateLocationRecoveryOption recoveryVmCreationOption) { - this.recoveryVmCreationOption = recoveryVmCreationOption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (dataSyncOption() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property dataSyncOption in model RecoveryPlanHyperVReplicaAzureFailbackInput")); - } - if (recoveryVmCreationOption() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryVmCreationOption in model RecoveryPlanHyperVReplicaAzureFailbackInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanHyperVReplicaAzureFailbackInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataSyncOption", - this.dataSyncOption == null ? null : this.dataSyncOption.toString()); - jsonWriter.writeStringField("recoveryVmCreationOption", - this.recoveryVmCreationOption == null ? null : this.recoveryVmCreationOption.toString()); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanHyperVReplicaAzureFailbackInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanHyperVReplicaAzureFailbackInput if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanHyperVReplicaAzureFailbackInput. - */ - public static RecoveryPlanHyperVReplicaAzureFailbackInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanHyperVReplicaAzureFailbackInput deserializedRecoveryPlanHyperVReplicaAzureFailbackInput - = new RecoveryPlanHyperVReplicaAzureFailbackInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dataSyncOption".equals(fieldName)) { - deserializedRecoveryPlanHyperVReplicaAzureFailbackInput.dataSyncOption - = DataSyncStatus.fromString(reader.getString()); - } else if ("recoveryVmCreationOption".equals(fieldName)) { - deserializedRecoveryPlanHyperVReplicaAzureFailbackInput.recoveryVmCreationOption - = AlternateLocationRecoveryOption.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanHyperVReplicaAzureFailbackInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanHyperVReplicaAzureFailbackInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanHyperVReplicaAzureFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanHyperVReplicaAzureFailoverInput.java deleted file mode 100644 index f0240126cce3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanHyperVReplicaAzureFailoverInput.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan HVR Azure failover input. - */ -@Fluent -public final class RecoveryPlanHyperVReplicaAzureFailoverInput extends RecoveryPlanProviderSpecificFailoverInput { - /* - * The class type. - */ - private String instanceType = "HyperVReplicaAzure"; - - /* - * The primary KEK certificate PFX. - */ - private String primaryKekCertificatePfx; - - /* - * The secondary KEK certificate PFX. - */ - private String secondaryKekCertificatePfx; - - /* - * The recovery point type. - */ - private HyperVReplicaAzureRpRecoveryPointType recoveryPointType; - - /** - * Creates an instance of RecoveryPlanHyperVReplicaAzureFailoverInput class. - */ - public RecoveryPlanHyperVReplicaAzureFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the primaryKekCertificatePfx property: The primary KEK certificate PFX. - * - * @return the primaryKekCertificatePfx value. - */ - public String primaryKekCertificatePfx() { - return this.primaryKekCertificatePfx; - } - - /** - * Set the primaryKekCertificatePfx property: 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 secondaryKekCertificatePfx property: The secondary KEK certificate PFX. - * - * @return the secondaryKekCertificatePfx value. - */ - public String secondaryKekCertificatePfx() { - return this.secondaryKekCertificatePfx; - } - - /** - * Set the secondaryKekCertificatePfx property: 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 recoveryPointType property: The recovery point type. - * - * @return the recoveryPointType value. - */ - public HyperVReplicaAzureRpRecoveryPointType recoveryPointType() { - return this.recoveryPointType; - } - - /** - * Set the recoveryPointType property: The recovery point type. - * - * @param recoveryPointType the recoveryPointType value to set. - * @return the RecoveryPlanHyperVReplicaAzureFailoverInput object itself. - */ - public RecoveryPlanHyperVReplicaAzureFailoverInput - withRecoveryPointType(HyperVReplicaAzureRpRecoveryPointType recoveryPointType) { - this.recoveryPointType = recoveryPointType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("primaryKekCertificatePfx", this.primaryKekCertificatePfx); - jsonWriter.writeStringField("secondaryKekCertificatePfx", this.secondaryKekCertificatePfx); - jsonWriter.writeStringField("recoveryPointType", - this.recoveryPointType == null ? null : this.recoveryPointType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanHyperVReplicaAzureFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanHyperVReplicaAzureFailoverInput if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanHyperVReplicaAzureFailoverInput. - */ - public static RecoveryPlanHyperVReplicaAzureFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanHyperVReplicaAzureFailoverInput deserializedRecoveryPlanHyperVReplicaAzureFailoverInput - = new RecoveryPlanHyperVReplicaAzureFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanHyperVReplicaAzureFailoverInput.instanceType = reader.getString(); - } else if ("primaryKekCertificatePfx".equals(fieldName)) { - deserializedRecoveryPlanHyperVReplicaAzureFailoverInput.primaryKekCertificatePfx - = reader.getString(); - } else if ("secondaryKekCertificatePfx".equals(fieldName)) { - deserializedRecoveryPlanHyperVReplicaAzureFailoverInput.secondaryKekCertificatePfx - = reader.getString(); - } else if ("recoveryPointType".equals(fieldName)) { - deserializedRecoveryPlanHyperVReplicaAzureFailoverInput.recoveryPointType - = HyperVReplicaAzureRpRecoveryPointType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanHyperVReplicaAzureFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanInMageAzureV2FailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanInMageAzureV2FailoverInput.java deleted file mode 100644 index 767f77eaee09..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanInMageAzureV2FailoverInput.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan InMageAzureV2 failover input. - */ -@Fluent -public final class RecoveryPlanInMageAzureV2FailoverInput extends RecoveryPlanProviderSpecificFailoverInput { - /* - * The class type. - */ - private String instanceType = "InMageAzureV2"; - - /* - * The recovery point type. - */ - private InMageV2RpRecoveryPointType recoveryPointType; - - /* - * A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. - */ - private String useMultiVmSyncPoint; - - /** - * Creates an instance of RecoveryPlanInMageAzureV2FailoverInput class. - */ - public RecoveryPlanInMageAzureV2FailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointType property: The recovery point type. - * - * @return the recoveryPointType value. - */ - public InMageV2RpRecoveryPointType recoveryPointType() { - return this.recoveryPointType; - } - - /** - * Set the recoveryPointType property: The recovery point type. - * - * @param recoveryPointType the recoveryPointType value to set. - * @return the RecoveryPlanInMageAzureV2FailoverInput object itself. - */ - public RecoveryPlanInMageAzureV2FailoverInput withRecoveryPointType(InMageV2RpRecoveryPointType recoveryPointType) { - this.recoveryPointType = recoveryPointType; - return this; - } - - /** - * Get the useMultiVmSyncPoint property: 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 the useMultiVmSyncPoint property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryPointType in model RecoveryPlanInMageAzureV2FailoverInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanInMageAzureV2FailoverInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryPointType", - this.recoveryPointType == null ? null : this.recoveryPointType.toString()); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("useMultiVmSyncPoint", this.useMultiVmSyncPoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanInMageAzureV2FailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanInMageAzureV2FailoverInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanInMageAzureV2FailoverInput. - */ - public static RecoveryPlanInMageAzureV2FailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanInMageAzureV2FailoverInput deserializedRecoveryPlanInMageAzureV2FailoverInput - = new RecoveryPlanInMageAzureV2FailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryPointType".equals(fieldName)) { - deserializedRecoveryPlanInMageAzureV2FailoverInput.recoveryPointType - = InMageV2RpRecoveryPointType.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanInMageAzureV2FailoverInput.instanceType = reader.getString(); - } else if ("useMultiVmSyncPoint".equals(fieldName)) { - deserializedRecoveryPlanInMageAzureV2FailoverInput.useMultiVmSyncPoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanInMageAzureV2FailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanInMageFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanInMageFailoverInput.java deleted file mode 100644 index a2f925d83971..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanInMageFailoverInput.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan InMage failover input. - */ -@Fluent -public final class RecoveryPlanInMageFailoverInput extends RecoveryPlanProviderSpecificFailoverInput { - /* - * The class type. - */ - private String instanceType = "InMage"; - - /* - * The recovery point type. - */ - private RpInMageRecoveryPointType recoveryPointType; - - /** - * Creates an instance of RecoveryPlanInMageFailoverInput class. - */ - public RecoveryPlanInMageFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointType property: The recovery point type. - * - * @return the recoveryPointType value. - */ - public RpInMageRecoveryPointType recoveryPointType() { - return this.recoveryPointType; - } - - /** - * Set the recoveryPointType property: The recovery point type. - * - * @param recoveryPointType the recoveryPointType value to set. - * @return the RecoveryPlanInMageFailoverInput object itself. - */ - public RecoveryPlanInMageFailoverInput withRecoveryPointType(RpInMageRecoveryPointType recoveryPointType) { - this.recoveryPointType = recoveryPointType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryPointType in model RecoveryPlanInMageFailoverInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanInMageFailoverInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryPointType", - this.recoveryPointType == null ? null : this.recoveryPointType.toString()); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanInMageFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanInMageFailoverInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanInMageFailoverInput. - */ - public static RecoveryPlanInMageFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanInMageFailoverInput deserializedRecoveryPlanInMageFailoverInput - = new RecoveryPlanInMageFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryPointType".equals(fieldName)) { - deserializedRecoveryPlanInMageFailoverInput.recoveryPointType - = RpInMageRecoveryPointType.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanInMageFailoverInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanInMageFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanInMageRcmFailbackFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanInMageRcmFailbackFailoverInput.java deleted file mode 100644 index b7b193f23c7b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanInMageRcmFailbackFailoverInput.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan InMageRcmFailback failover input. - */ -@Fluent -public final class RecoveryPlanInMageRcmFailbackFailoverInput extends RecoveryPlanProviderSpecificFailoverInput { - /* - * The class type. - */ - private String instanceType = "InMageRcmFailback"; - - /* - * The recovery point type. - */ - private InMageRcmFailbackRecoveryPointType recoveryPointType; - - /* - * A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. - */ - private String useMultiVmSyncPoint; - - /** - * Creates an instance of RecoveryPlanInMageRcmFailbackFailoverInput class. - */ - public RecoveryPlanInMageRcmFailbackFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointType property: The recovery point type. - * - * @return the recoveryPointType value. - */ - public InMageRcmFailbackRecoveryPointType recoveryPointType() { - return this.recoveryPointType; - } - - /** - * Set the recoveryPointType property: The recovery point type. - * - * @param recoveryPointType the recoveryPointType value to set. - * @return the RecoveryPlanInMageRcmFailbackFailoverInput object itself. - */ - public RecoveryPlanInMageRcmFailbackFailoverInput - withRecoveryPointType(InMageRcmFailbackRecoveryPointType recoveryPointType) { - this.recoveryPointType = recoveryPointType; - return this; - } - - /** - * Get the useMultiVmSyncPoint property: 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 the useMultiVmSyncPoint property: 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 RecoveryPlanInMageRcmFailbackFailoverInput object itself. - */ - public RecoveryPlanInMageRcmFailbackFailoverInput withUseMultiVmSyncPoint(String useMultiVmSyncPoint) { - this.useMultiVmSyncPoint = useMultiVmSyncPoint; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryPointType in model RecoveryPlanInMageRcmFailbackFailoverInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanInMageRcmFailbackFailoverInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryPointType", - this.recoveryPointType == null ? null : this.recoveryPointType.toString()); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("useMultiVmSyncPoint", this.useMultiVmSyncPoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanInMageRcmFailbackFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanInMageRcmFailbackFailoverInput if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanInMageRcmFailbackFailoverInput. - */ - public static RecoveryPlanInMageRcmFailbackFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanInMageRcmFailbackFailoverInput deserializedRecoveryPlanInMageRcmFailbackFailoverInput - = new RecoveryPlanInMageRcmFailbackFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryPointType".equals(fieldName)) { - deserializedRecoveryPlanInMageRcmFailbackFailoverInput.recoveryPointType - = InMageRcmFailbackRecoveryPointType.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanInMageRcmFailbackFailoverInput.instanceType = reader.getString(); - } else if ("useMultiVmSyncPoint".equals(fieldName)) { - deserializedRecoveryPlanInMageRcmFailbackFailoverInput.useMultiVmSyncPoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanInMageRcmFailbackFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanInMageRcmFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanInMageRcmFailoverInput.java deleted file mode 100644 index f47a19dba5ec..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanInMageRcmFailoverInput.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan InMageRcm failover input. - */ -@Fluent -public final class RecoveryPlanInMageRcmFailoverInput extends RecoveryPlanProviderSpecificFailoverInput { - /* - * The class type. - */ - private String instanceType = "InMageRcm"; - - /* - * The recovery point type. - */ - private RecoveryPlanPointType recoveryPointType; - - /* - * A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. - */ - private String useMultiVmSyncPoint; - - /** - * Creates an instance of RecoveryPlanInMageRcmFailoverInput class. - */ - public RecoveryPlanInMageRcmFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointType property: The recovery point type. - * - * @return the recoveryPointType value. - */ - public RecoveryPlanPointType recoveryPointType() { - return this.recoveryPointType; - } - - /** - * Set the recoveryPointType property: The recovery point type. - * - * @param recoveryPointType the recoveryPointType value to set. - * @return the RecoveryPlanInMageRcmFailoverInput object itself. - */ - public RecoveryPlanInMageRcmFailoverInput withRecoveryPointType(RecoveryPlanPointType recoveryPointType) { - this.recoveryPointType = recoveryPointType; - return this; - } - - /** - * Get the useMultiVmSyncPoint property: 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 the useMultiVmSyncPoint property: 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 RecoveryPlanInMageRcmFailoverInput object itself. - */ - public RecoveryPlanInMageRcmFailoverInput withUseMultiVmSyncPoint(String useMultiVmSyncPoint) { - this.useMultiVmSyncPoint = useMultiVmSyncPoint; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryPointType in model RecoveryPlanInMageRcmFailoverInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanInMageRcmFailoverInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryPointType", - this.recoveryPointType == null ? null : this.recoveryPointType.toString()); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("useMultiVmSyncPoint", this.useMultiVmSyncPoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanInMageRcmFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanInMageRcmFailoverInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanInMageRcmFailoverInput. - */ - public static RecoveryPlanInMageRcmFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanInMageRcmFailoverInput deserializedRecoveryPlanInMageRcmFailoverInput - = new RecoveryPlanInMageRcmFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryPointType".equals(fieldName)) { - deserializedRecoveryPlanInMageRcmFailoverInput.recoveryPointType - = RecoveryPlanPointType.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanInMageRcmFailoverInput.instanceType = reader.getString(); - } else if ("useMultiVmSyncPoint".equals(fieldName)) { - deserializedRecoveryPlanInMageRcmFailoverInput.useMultiVmSyncPoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanInMageRcmFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanManualActionDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanManualActionDetails.java deleted file mode 100644 index e2da552c50c6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanManualActionDetails.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan manual action details. - */ -@Fluent -public final class RecoveryPlanManualActionDetails extends RecoveryPlanActionDetails { - /* - * Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for possible values). - */ - private String instanceType = "ManualActionDetails"; - - /* - * The manual action description. - */ - private String description; - - /** - * Creates an instance of RecoveryPlanManualActionDetails class. - */ - public RecoveryPlanManualActionDetails() { - } - - /** - * Get the instanceType property: Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for - * possible values). - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the description property: The manual action description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanManualActionDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanManualActionDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanManualActionDetails. - */ - public static RecoveryPlanManualActionDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanManualActionDetails deserializedRecoveryPlanManualActionDetails - = new RecoveryPlanManualActionDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanManualActionDetails.instanceType = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedRecoveryPlanManualActionDetails.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanManualActionDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanPlannedFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanPlannedFailoverInput.java deleted file mode 100644 index 24176b4619be..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanPlannedFailoverInput.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan planned failover input. - */ -@Fluent -public final class RecoveryPlanPlannedFailoverInput implements JsonSerializable { - /* - * The recovery plan planned failover input properties. - */ - private RecoveryPlanPlannedFailoverInputProperties properties; - - /** - * Creates an instance of RecoveryPlanPlannedFailoverInput class. - */ - public RecoveryPlanPlannedFailoverInput() { - } - - /** - * Get the properties property: The recovery plan planned failover input properties. - * - * @return the properties value. - */ - public RecoveryPlanPlannedFailoverInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model RecoveryPlanPlannedFailoverInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanPlannedFailoverInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanPlannedFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanPlannedFailoverInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanPlannedFailoverInput. - */ - public static RecoveryPlanPlannedFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanPlannedFailoverInput deserializedRecoveryPlanPlannedFailoverInput - = new RecoveryPlanPlannedFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedRecoveryPlanPlannedFailoverInput.properties - = RecoveryPlanPlannedFailoverInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanPlannedFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanPlannedFailoverInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanPlannedFailoverInputProperties.java deleted file mode 100644 index cc8779d42d75..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanPlannedFailoverInputProperties.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Recovery plan planned failover input properties. - */ -@Fluent -public final class RecoveryPlanPlannedFailoverInputProperties - implements JsonSerializable { - /* - * The failover direction. - */ - private PossibleOperationsDirections failoverDirection; - - /* - * The provider specific properties. - */ - private List providerSpecificDetails; - - /** - * Creates an instance of RecoveryPlanPlannedFailoverInputProperties class. - */ - public RecoveryPlanPlannedFailoverInputProperties() { - } - - /** - * Get the failoverDirection property: The failover direction. - * - * @return the failoverDirection value. - */ - public PossibleOperationsDirections failoverDirection() { - return this.failoverDirection; - } - - /** - * Set the failoverDirection property: The failover direction. - * - * @param failoverDirection the failoverDirection value to set. - * @return the RecoveryPlanPlannedFailoverInputProperties object itself. - */ - public RecoveryPlanPlannedFailoverInputProperties - withFailoverDirection(PossibleOperationsDirections failoverDirection) { - this.failoverDirection = failoverDirection; - return this; - } - - /** - * Get the providerSpecificDetails property: The provider specific properties. - * - * @return the providerSpecificDetails value. - */ - public List providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (failoverDirection() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property failoverDirection in model RecoveryPlanPlannedFailoverInputProperties")); - } - if (providerSpecificDetails() != null) { - providerSpecificDetails().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanPlannedFailoverInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("failoverDirection", - this.failoverDirection == null ? null : this.failoverDirection.toString()); - jsonWriter.writeArrayField("providerSpecificDetails", this.providerSpecificDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanPlannedFailoverInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanPlannedFailoverInputProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanPlannedFailoverInputProperties. - */ - public static RecoveryPlanPlannedFailoverInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanPlannedFailoverInputProperties deserializedRecoveryPlanPlannedFailoverInputProperties - = new RecoveryPlanPlannedFailoverInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("failoverDirection".equals(fieldName)) { - deserializedRecoveryPlanPlannedFailoverInputProperties.failoverDirection - = PossibleOperationsDirections.fromString(reader.getString()); - } else if ("providerSpecificDetails".equals(fieldName)) { - List providerSpecificDetails - = reader.readArray(reader1 -> RecoveryPlanProviderSpecificFailoverInput.fromJson(reader1)); - deserializedRecoveryPlanPlannedFailoverInputProperties.providerSpecificDetails - = providerSpecificDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanPlannedFailoverInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanPointType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanPointType.java deleted file mode 100644 index 70b65bc1fe14..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanPointType.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The recovery point type. - */ -public final class RecoveryPlanPointType extends ExpandableStringEnum { - /** - * Static value Latest for RecoveryPlanPointType. - */ - public static final RecoveryPlanPointType LATEST = fromString("Latest"); - - /** - * Static value LatestApplicationConsistent for RecoveryPlanPointType. - */ - public static final RecoveryPlanPointType LATEST_APPLICATION_CONSISTENT = fromString("LatestApplicationConsistent"); - - /** - * Static value LatestCrashConsistent for RecoveryPlanPointType. - */ - public static final RecoveryPlanPointType LATEST_CRASH_CONSISTENT = fromString("LatestCrashConsistent"); - - /** - * Static value LatestProcessed for RecoveryPlanPointType. - */ - public static final RecoveryPlanPointType LATEST_PROCESSED = fromString("LatestProcessed"); - - /** - * Creates a new instance of RecoveryPlanPointType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RecoveryPlanPointType() { - } - - /** - * Creates or finds a RecoveryPlanPointType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RecoveryPlanPointType. - */ - public static RecoveryPlanPointType fromString(String name) { - return fromString(name, RecoveryPlanPointType.class); - } - - /** - * Gets known RecoveryPlanPointType values. - * - * @return known RecoveryPlanPointType values. - */ - public static Collection values() { - return values(RecoveryPlanPointType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProperties.java deleted file mode 100644 index b1b4a54b52cc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProperties.java +++ /dev/null @@ -1,547 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * Recovery plan properties. - */ -@Fluent -public final class RecoveryPlanProperties implements JsonSerializable { - /* - * The friendly name. - */ - private String friendlyName; - - /* - * The primary fabric Id. - */ - private String primaryFabricId; - - /* - * The primary fabric friendly name. - */ - private String primaryFabricFriendlyName; - - /* - * The recovery fabric Id. - */ - private String recoveryFabricId; - - /* - * The recovery fabric friendly name. - */ - private String recoveryFabricFriendlyName; - - /* - * The failover deployment model. - */ - private String failoverDeploymentModel; - - /* - * The list of replication providers. - */ - private List replicationProviders; - - /* - * The list of allowed operations. - */ - private List allowedOperations; - - /* - * The start time of the last planned failover. - */ - private OffsetDateTime lastPlannedFailoverTime; - - /* - * The start time of the last unplanned failover. - */ - private OffsetDateTime lastUnplannedFailoverTime; - - /* - * The start time of the last test failover. - */ - private OffsetDateTime lastTestFailoverTime; - - /* - * The current scenario details. - */ - private CurrentScenarioDetails currentScenario; - - /* - * The recovery plan status. - */ - private String currentScenarioStatus; - - /* - * The recovery plan status description. - */ - private String currentScenarioStatusDescription; - - /* - * The recovery plan groups. - */ - private List groups; - - /* - * The provider id and provider specific details. - */ - private List providerSpecificDetails; - - /** - * Creates an instance of RecoveryPlanProperties class. - */ - public RecoveryPlanProperties() { - } - - /** - * Get the friendlyName property: The friendly name. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 primaryFabricId property: The primary fabric Id. - * - * @return the primaryFabricId value. - */ - public String primaryFabricId() { - return this.primaryFabricId; - } - - /** - * Set the primaryFabricId property: 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 primaryFabricFriendlyName property: The primary fabric friendly name. - * - * @return the primaryFabricFriendlyName value. - */ - public String primaryFabricFriendlyName() { - return this.primaryFabricFriendlyName; - } - - /** - * Set the primaryFabricFriendlyName property: 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 recoveryFabricId property: The recovery fabric Id. - * - * @return the recoveryFabricId value. - */ - public String recoveryFabricId() { - return this.recoveryFabricId; - } - - /** - * Set the recoveryFabricId property: 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 recoveryFabricFriendlyName property: The recovery fabric friendly name. - * - * @return the recoveryFabricFriendlyName value. - */ - public String recoveryFabricFriendlyName() { - return this.recoveryFabricFriendlyName; - } - - /** - * Set the recoveryFabricFriendlyName property: 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 failoverDeploymentModel property: The failover deployment model. - * - * @return the failoverDeploymentModel value. - */ - public String failoverDeploymentModel() { - return this.failoverDeploymentModel; - } - - /** - * Set the failoverDeploymentModel property: 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 replicationProviders property: The list of replication providers. - * - * @return the replicationProviders value. - */ - public List replicationProviders() { - return this.replicationProviders; - } - - /** - * Set the replicationProviders property: 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 allowedOperations property: The list of allowed operations. - * - * @return the allowedOperations value. - */ - public List allowedOperations() { - return this.allowedOperations; - } - - /** - * Set the allowedOperations property: 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 lastPlannedFailoverTime property: The start time of the last planned failover. - * - * @return the lastPlannedFailoverTime value. - */ - public OffsetDateTime lastPlannedFailoverTime() { - return this.lastPlannedFailoverTime; - } - - /** - * Set the lastPlannedFailoverTime property: The start time of the last planned failover. - * - * @param lastPlannedFailoverTime the lastPlannedFailoverTime value to set. - * @return the RecoveryPlanProperties object itself. - */ - public RecoveryPlanProperties withLastPlannedFailoverTime(OffsetDateTime lastPlannedFailoverTime) { - this.lastPlannedFailoverTime = lastPlannedFailoverTime; - return this; - } - - /** - * Get the lastUnplannedFailoverTime property: The start time of the last unplanned failover. - * - * @return the lastUnplannedFailoverTime value. - */ - public OffsetDateTime lastUnplannedFailoverTime() { - return this.lastUnplannedFailoverTime; - } - - /** - * Set the lastUnplannedFailoverTime property: The start time of the last unplanned failover. - * - * @param lastUnplannedFailoverTime the lastUnplannedFailoverTime value to set. - * @return the RecoveryPlanProperties object itself. - */ - public RecoveryPlanProperties withLastUnplannedFailoverTime(OffsetDateTime lastUnplannedFailoverTime) { - this.lastUnplannedFailoverTime = lastUnplannedFailoverTime; - return this; - } - - /** - * Get the lastTestFailoverTime property: The start time of the last test failover. - * - * @return the lastTestFailoverTime value. - */ - public OffsetDateTime lastTestFailoverTime() { - return this.lastTestFailoverTime; - } - - /** - * Set the lastTestFailoverTime property: The start time of the last test failover. - * - * @param lastTestFailoverTime the lastTestFailoverTime value to set. - * @return the RecoveryPlanProperties object itself. - */ - public RecoveryPlanProperties withLastTestFailoverTime(OffsetDateTime lastTestFailoverTime) { - this.lastTestFailoverTime = lastTestFailoverTime; - return this; - } - - /** - * Get the currentScenario property: The current scenario details. - * - * @return the currentScenario value. - */ - public CurrentScenarioDetails currentScenario() { - return this.currentScenario; - } - - /** - * Set the currentScenario property: 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 currentScenarioStatus property: The recovery plan status. - * - * @return the currentScenarioStatus value. - */ - public String currentScenarioStatus() { - return this.currentScenarioStatus; - } - - /** - * Set the currentScenarioStatus property: 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 currentScenarioStatusDescription property: The recovery plan status description. - * - * @return the currentScenarioStatusDescription value. - */ - public String currentScenarioStatusDescription() { - return this.currentScenarioStatusDescription; - } - - /** - * Set the currentScenarioStatusDescription property: 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 groups property: The recovery plan groups. - * - * @return the groups value. - */ - public List groups() { - return this.groups; - } - - /** - * Set the groups property: 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; - } - - /** - * Get the providerSpecificDetails property: The provider id and provider specific details. - * - * @return the providerSpecificDetails value. - */ - public List providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: The provider id and provider specific details. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the RecoveryPlanProperties object itself. - */ - public RecoveryPlanProperties - withProviderSpecificDetails(List providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (currentScenario() != null) { - currentScenario().validate(); - } - if (groups() != null) { - groups().forEach(e -> e.validate()); - } - if (providerSpecificDetails() != null) { - providerSpecificDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("primaryFabricId", this.primaryFabricId); - jsonWriter.writeStringField("primaryFabricFriendlyName", this.primaryFabricFriendlyName); - jsonWriter.writeStringField("recoveryFabricId", this.recoveryFabricId); - jsonWriter.writeStringField("recoveryFabricFriendlyName", this.recoveryFabricFriendlyName); - jsonWriter.writeStringField("failoverDeploymentModel", this.failoverDeploymentModel); - jsonWriter.writeArrayField("replicationProviders", this.replicationProviders, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("allowedOperations", this.allowedOperations, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("lastPlannedFailoverTime", - this.lastPlannedFailoverTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastPlannedFailoverTime)); - jsonWriter.writeStringField("lastUnplannedFailoverTime", - this.lastUnplannedFailoverTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastUnplannedFailoverTime)); - jsonWriter.writeStringField("lastTestFailoverTime", - this.lastTestFailoverTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastTestFailoverTime)); - jsonWriter.writeJsonField("currentScenario", this.currentScenario); - jsonWriter.writeStringField("currentScenarioStatus", this.currentScenarioStatus); - jsonWriter.writeStringField("currentScenarioStatusDescription", this.currentScenarioStatusDescription); - jsonWriter.writeArrayField("groups", this.groups, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("providerSpecificDetails", this.providerSpecificDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanProperties. - */ - public static RecoveryPlanProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanProperties deserializedRecoveryPlanProperties = new RecoveryPlanProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedRecoveryPlanProperties.friendlyName = reader.getString(); - } else if ("primaryFabricId".equals(fieldName)) { - deserializedRecoveryPlanProperties.primaryFabricId = reader.getString(); - } else if ("primaryFabricFriendlyName".equals(fieldName)) { - deserializedRecoveryPlanProperties.primaryFabricFriendlyName = reader.getString(); - } else if ("recoveryFabricId".equals(fieldName)) { - deserializedRecoveryPlanProperties.recoveryFabricId = reader.getString(); - } else if ("recoveryFabricFriendlyName".equals(fieldName)) { - deserializedRecoveryPlanProperties.recoveryFabricFriendlyName = reader.getString(); - } else if ("failoverDeploymentModel".equals(fieldName)) { - deserializedRecoveryPlanProperties.failoverDeploymentModel = reader.getString(); - } else if ("replicationProviders".equals(fieldName)) { - List replicationProviders = reader.readArray(reader1 -> reader1.getString()); - deserializedRecoveryPlanProperties.replicationProviders = replicationProviders; - } else if ("allowedOperations".equals(fieldName)) { - List allowedOperations = reader.readArray(reader1 -> reader1.getString()); - deserializedRecoveryPlanProperties.allowedOperations = allowedOperations; - } else if ("lastPlannedFailoverTime".equals(fieldName)) { - deserializedRecoveryPlanProperties.lastPlannedFailoverTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastUnplannedFailoverTime".equals(fieldName)) { - deserializedRecoveryPlanProperties.lastUnplannedFailoverTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastTestFailoverTime".equals(fieldName)) { - deserializedRecoveryPlanProperties.lastTestFailoverTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("currentScenario".equals(fieldName)) { - deserializedRecoveryPlanProperties.currentScenario = CurrentScenarioDetails.fromJson(reader); - } else if ("currentScenarioStatus".equals(fieldName)) { - deserializedRecoveryPlanProperties.currentScenarioStatus = reader.getString(); - } else if ("currentScenarioStatusDescription".equals(fieldName)) { - deserializedRecoveryPlanProperties.currentScenarioStatusDescription = reader.getString(); - } else if ("groups".equals(fieldName)) { - List groups = reader.readArray(reader1 -> RecoveryPlanGroup.fromJson(reader1)); - deserializedRecoveryPlanProperties.groups = groups; - } else if ("providerSpecificDetails".equals(fieldName)) { - List providerSpecificDetails - = reader.readArray(reader1 -> RecoveryPlanProviderSpecificDetails.fromJson(reader1)); - deserializedRecoveryPlanProperties.providerSpecificDetails = providerSpecificDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProtectedItem.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProtectedItem.java deleted file mode 100644 index c8be11f55d13..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProtectedItem.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan protected item. - */ -@Fluent -public final class RecoveryPlanProtectedItem implements JsonSerializable { - /* - * The ARM Id of the recovery plan protected item. - */ - private String id; - - /* - * The virtual machine Id. - */ - private String virtualMachineId; - - /** - * Creates an instance of RecoveryPlanProtectedItem class. - */ - public RecoveryPlanProtectedItem() { - } - - /** - * Get the id property: The ARM Id of the recovery plan protected item. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: 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 virtualMachineId property: The virtual machine Id. - * - * @return the virtualMachineId value. - */ - public String virtualMachineId() { - return this.virtualMachineId; - } - - /** - * Set the virtualMachineId property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("virtualMachineId", this.virtualMachineId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanProtectedItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanProtectedItem if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanProtectedItem. - */ - public static RecoveryPlanProtectedItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanProtectedItem deserializedRecoveryPlanProtectedItem = new RecoveryPlanProtectedItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRecoveryPlanProtectedItem.id = reader.getString(); - } else if ("virtualMachineId".equals(fieldName)) { - deserializedRecoveryPlanProtectedItem.virtualMachineId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanProtectedItem; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProviderSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProviderSpecificDetails.java deleted file mode 100644 index d794f0ba9b42..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProviderSpecificDetails.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan provider specific details. - */ -@Immutable -public class RecoveryPlanProviderSpecificDetails implements JsonSerializable { - /* - * Gets the Instance type. - */ - private String instanceType = "RecoveryPlanProviderSpecificDetails"; - - /** - * Creates an instance of RecoveryPlanProviderSpecificDetails class. - */ - public RecoveryPlanProviderSpecificDetails() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanProviderSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanProviderSpecificDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanProviderSpecificDetails. - */ - public static RecoveryPlanProviderSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return RecoveryPlanA2ADetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static RecoveryPlanProviderSpecificDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanProviderSpecificDetails deserializedRecoveryPlanProviderSpecificDetails - = new RecoveryPlanProviderSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanProviderSpecificDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanProviderSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProviderSpecificFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProviderSpecificFailoverInput.java deleted file mode 100644 index c3613d19e361..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProviderSpecificFailoverInput.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan provider specific failover input. - */ -@Immutable -public class RecoveryPlanProviderSpecificFailoverInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "RecoveryPlanProviderSpecificFailoverInput"; - - /** - * Creates an instance of RecoveryPlanProviderSpecificFailoverInput class. - */ - public RecoveryPlanProviderSpecificFailoverInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanProviderSpecificFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanProviderSpecificFailoverInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanProviderSpecificFailoverInput. - */ - public static RecoveryPlanProviderSpecificFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return RecoveryPlanA2AFailoverInput.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzureFailback".equals(discriminatorValue)) { - return RecoveryPlanHyperVReplicaAzureFailbackInput.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzure".equals(discriminatorValue)) { - return RecoveryPlanHyperVReplicaAzureFailoverInput.fromJson(readerToUse.reset()); - } else if ("InMageAzureV2".equals(discriminatorValue)) { - return RecoveryPlanInMageAzureV2FailoverInput.fromJson(readerToUse.reset()); - } else if ("InMage".equals(discriminatorValue)) { - return RecoveryPlanInMageFailoverInput.fromJson(readerToUse.reset()); - } else if ("InMageRcmFailback".equals(discriminatorValue)) { - return RecoveryPlanInMageRcmFailbackFailoverInput.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return RecoveryPlanInMageRcmFailoverInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static RecoveryPlanProviderSpecificFailoverInput fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanProviderSpecificFailoverInput deserializedRecoveryPlanProviderSpecificFailoverInput - = new RecoveryPlanProviderSpecificFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanProviderSpecificFailoverInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanProviderSpecificFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProviderSpecificInput.java deleted file mode 100644 index 834898f095d0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanProviderSpecificInput.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan provider specific input base class. - */ -@Immutable -public class RecoveryPlanProviderSpecificInput implements JsonSerializable { - /* - * Gets the Instance type. - */ - private String instanceType = "RecoveryPlanProviderSpecificInput"; - - /** - * Creates an instance of RecoveryPlanProviderSpecificInput class. - */ - public RecoveryPlanProviderSpecificInput() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanProviderSpecificInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanProviderSpecificInput. - */ - public static RecoveryPlanProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return RecoveryPlanA2AInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static RecoveryPlanProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanProviderSpecificInput deserializedRecoveryPlanProviderSpecificInput - = new RecoveryPlanProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanScriptActionDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanScriptActionDetails.java deleted file mode 100644 index 79980578c6df..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanScriptActionDetails.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan script action details. - */ -@Fluent -public final class RecoveryPlanScriptActionDetails extends RecoveryPlanActionDetails { - /* - * Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for possible values). - */ - private String instanceType = "ScriptActionDetails"; - - /* - * The script path. - */ - private String path; - - /* - * The script timeout. - */ - private String timeout; - - /* - * The fabric location. - */ - private RecoveryPlanActionLocation fabricLocation; - - /** - * Creates an instance of RecoveryPlanScriptActionDetails class. - */ - public RecoveryPlanScriptActionDetails() { - } - - /** - * Get the instanceType property: Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for - * possible values). - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the path property: The script path. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: 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 timeout property: The script timeout. - * - * @return the timeout value. - */ - public String timeout() { - return this.timeout; - } - - /** - * Set the timeout property: 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 fabricLocation property: The fabric location. - * - * @return the fabricLocation value. - */ - public RecoveryPlanActionLocation fabricLocation() { - return this.fabricLocation; - } - - /** - * Set the fabricLocation property: The fabric location. - * - * @param fabricLocation the fabricLocation value to set. - * @return the RecoveryPlanScriptActionDetails object itself. - */ - public RecoveryPlanScriptActionDetails withFabricLocation(RecoveryPlanActionLocation fabricLocation) { - this.fabricLocation = fabricLocation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (path() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property path in model RecoveryPlanScriptActionDetails")); - } - if (fabricLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property fabricLocation in model RecoveryPlanScriptActionDetails")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanScriptActionDetails.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("path", this.path); - jsonWriter.writeStringField("fabricLocation", - this.fabricLocation == null ? null : this.fabricLocation.toString()); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("timeout", this.timeout); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanScriptActionDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanScriptActionDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanScriptActionDetails. - */ - public static RecoveryPlanScriptActionDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanScriptActionDetails deserializedRecoveryPlanScriptActionDetails - = new RecoveryPlanScriptActionDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("path".equals(fieldName)) { - deserializedRecoveryPlanScriptActionDetails.path = reader.getString(); - } else if ("fabricLocation".equals(fieldName)) { - deserializedRecoveryPlanScriptActionDetails.fabricLocation - = RecoveryPlanActionLocation.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanScriptActionDetails.instanceType = reader.getString(); - } else if ("timeout".equals(fieldName)) { - deserializedRecoveryPlanScriptActionDetails.timeout = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanScriptActionDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanShutdownGroupTaskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanShutdownGroupTaskDetails.java deleted file mode 100644 index 6b8597b95bf7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanShutdownGroupTaskDetails.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * This class represents the recovery plan shutdown group task details. - */ -@Fluent -public final class RecoveryPlanShutdownGroupTaskDetails extends RecoveryPlanGroupTaskDetails { - /* - * The type of task details. - */ - private String instanceType = "RecoveryPlanShutdownGroupTaskDetails"; - - /** - * Creates an instance of RecoveryPlanShutdownGroupTaskDetails class. - */ - public RecoveryPlanShutdownGroupTaskDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * {@inheritDoc} - */ - @Override - public RecoveryPlanShutdownGroupTaskDetails withName(String name) { - super.withName(name); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RecoveryPlanShutdownGroupTaskDetails withGroupId(String groupId) { - super.withGroupId(groupId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RecoveryPlanShutdownGroupTaskDetails withRpGroupType(String rpGroupType) { - super.withRpGroupType(rpGroupType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RecoveryPlanShutdownGroupTaskDetails withChildTasks(List childTasks) { - super.withChildTasks(childTasks); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (childTasks() != null) { - childTasks().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("childTasks", childTasks(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("name", name()); - jsonWriter.writeStringField("groupId", groupId()); - jsonWriter.writeStringField("rpGroupType", rpGroupType()); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanShutdownGroupTaskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanShutdownGroupTaskDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanShutdownGroupTaskDetails. - */ - public static RecoveryPlanShutdownGroupTaskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanShutdownGroupTaskDetails deserializedRecoveryPlanShutdownGroupTaskDetails - = new RecoveryPlanShutdownGroupTaskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("childTasks".equals(fieldName)) { - List childTasks = reader.readArray(reader1 -> AsrTask.fromJson(reader1)); - deserializedRecoveryPlanShutdownGroupTaskDetails.withChildTasks(childTasks); - } else if ("name".equals(fieldName)) { - deserializedRecoveryPlanShutdownGroupTaskDetails.withName(reader.getString()); - } else if ("groupId".equals(fieldName)) { - deserializedRecoveryPlanShutdownGroupTaskDetails.withGroupId(reader.getString()); - } else if ("rpGroupType".equals(fieldName)) { - deserializedRecoveryPlanShutdownGroupTaskDetails.withRpGroupType(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedRecoveryPlanShutdownGroupTaskDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanShutdownGroupTaskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanTestFailoverCleanupInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanTestFailoverCleanupInput.java deleted file mode 100644 index 3b1f8a4096d2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanTestFailoverCleanupInput.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan test failover cleanup input. - */ -@Fluent -public final class RecoveryPlanTestFailoverCleanupInput - implements JsonSerializable { - /* - * The recovery plan test failover cleanup input properties. - */ - private RecoveryPlanTestFailoverCleanupInputProperties properties; - - /** - * Creates an instance of RecoveryPlanTestFailoverCleanupInput class. - */ - public RecoveryPlanTestFailoverCleanupInput() { - } - - /** - * Get the properties property: The recovery plan test failover cleanup input properties. - * - * @return the properties value. - */ - public RecoveryPlanTestFailoverCleanupInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model RecoveryPlanTestFailoverCleanupInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanTestFailoverCleanupInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanTestFailoverCleanupInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanTestFailoverCleanupInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanTestFailoverCleanupInput. - */ - public static RecoveryPlanTestFailoverCleanupInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanTestFailoverCleanupInput deserializedRecoveryPlanTestFailoverCleanupInput - = new RecoveryPlanTestFailoverCleanupInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedRecoveryPlanTestFailoverCleanupInput.properties - = RecoveryPlanTestFailoverCleanupInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanTestFailoverCleanupInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanTestFailoverCleanupInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanTestFailoverCleanupInputProperties.java deleted file mode 100644 index bc6ea04a367c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanTestFailoverCleanupInputProperties.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan test failover cleanup input properties. - */ -@Fluent -public final class RecoveryPlanTestFailoverCleanupInputProperties - implements JsonSerializable { - /* - * The test failover cleanup comments. - */ - private String comments; - - /** - * Creates an instance of RecoveryPlanTestFailoverCleanupInputProperties class. - */ - public RecoveryPlanTestFailoverCleanupInputProperties() { - } - - /** - * Get the comments property: The test failover cleanup comments. - * - * @return the comments value. - */ - public String comments() { - return this.comments; - } - - /** - * Set the comments property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("comments", this.comments); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanTestFailoverCleanupInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanTestFailoverCleanupInputProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPlanTestFailoverCleanupInputProperties. - */ - public static RecoveryPlanTestFailoverCleanupInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanTestFailoverCleanupInputProperties deserializedRecoveryPlanTestFailoverCleanupInputProperties - = new RecoveryPlanTestFailoverCleanupInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("comments".equals(fieldName)) { - deserializedRecoveryPlanTestFailoverCleanupInputProperties.comments = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanTestFailoverCleanupInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanTestFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanTestFailoverInput.java deleted file mode 100644 index a2612c6a7904..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanTestFailoverInput.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan test failover input. - */ -@Fluent -public final class RecoveryPlanTestFailoverInput implements JsonSerializable { - /* - * The recovery plan test failover input properties. - */ - private RecoveryPlanTestFailoverInputProperties properties; - - /** - * Creates an instance of RecoveryPlanTestFailoverInput class. - */ - public RecoveryPlanTestFailoverInput() { - } - - /** - * Get the properties property: The recovery plan test failover input properties. - * - * @return the properties value. - */ - public RecoveryPlanTestFailoverInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model RecoveryPlanTestFailoverInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanTestFailoverInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanTestFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanTestFailoverInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanTestFailoverInput. - */ - public static RecoveryPlanTestFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanTestFailoverInput deserializedRecoveryPlanTestFailoverInput - = new RecoveryPlanTestFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedRecoveryPlanTestFailoverInput.properties - = RecoveryPlanTestFailoverInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanTestFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanTestFailoverInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanTestFailoverInputProperties.java deleted file mode 100644 index 77f2e1a3f111..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanTestFailoverInputProperties.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Recovery plan test failover input properties. - */ -@Fluent -public final class RecoveryPlanTestFailoverInputProperties - implements JsonSerializable { - /* - * The failover direction. - */ - private PossibleOperationsDirections failoverDirection; - - /* - * The network type to be used for test failover. - */ - private String networkType; - - /* - * The Id of the network to be used for test failover. - */ - private String networkId; - - /* - * The provider specific properties. - */ - private List providerSpecificDetails; - - /** - * Creates an instance of RecoveryPlanTestFailoverInputProperties class. - */ - public RecoveryPlanTestFailoverInputProperties() { - } - - /** - * Get the failoverDirection property: The failover direction. - * - * @return the failoverDirection value. - */ - public PossibleOperationsDirections failoverDirection() { - return this.failoverDirection; - } - - /** - * Set the failoverDirection property: The failover direction. - * - * @param failoverDirection the failoverDirection value to set. - * @return the RecoveryPlanTestFailoverInputProperties object itself. - */ - public RecoveryPlanTestFailoverInputProperties - withFailoverDirection(PossibleOperationsDirections failoverDirection) { - this.failoverDirection = failoverDirection; - return this; - } - - /** - * Get the networkType property: The network type to be used for test failover. - * - * @return the networkType value. - */ - public String networkType() { - return this.networkType; - } - - /** - * Set the networkType property: 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 networkId property: The Id of the network to be used for test failover. - * - * @return the networkId value. - */ - public String networkId() { - return this.networkId; - } - - /** - * Set the networkId property: 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 the providerSpecificDetails property: The provider specific properties. - * - * @return the providerSpecificDetails value. - */ - public List providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (failoverDirection() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property failoverDirection in model RecoveryPlanTestFailoverInputProperties")); - } - if (networkType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkType in model RecoveryPlanTestFailoverInputProperties")); - } - if (providerSpecificDetails() != null) { - providerSpecificDetails().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanTestFailoverInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("failoverDirection", - this.failoverDirection == null ? null : this.failoverDirection.toString()); - jsonWriter.writeStringField("networkType", this.networkType); - jsonWriter.writeStringField("networkId", this.networkId); - jsonWriter.writeArrayField("providerSpecificDetails", this.providerSpecificDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanTestFailoverInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanTestFailoverInputProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanTestFailoverInputProperties. - */ - public static RecoveryPlanTestFailoverInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanTestFailoverInputProperties deserializedRecoveryPlanTestFailoverInputProperties - = new RecoveryPlanTestFailoverInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("failoverDirection".equals(fieldName)) { - deserializedRecoveryPlanTestFailoverInputProperties.failoverDirection - = PossibleOperationsDirections.fromString(reader.getString()); - } else if ("networkType".equals(fieldName)) { - deserializedRecoveryPlanTestFailoverInputProperties.networkType = reader.getString(); - } else if ("networkId".equals(fieldName)) { - deserializedRecoveryPlanTestFailoverInputProperties.networkId = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - List providerSpecificDetails - = reader.readArray(reader1 -> RecoveryPlanProviderSpecificFailoverInput.fromJson(reader1)); - deserializedRecoveryPlanTestFailoverInputProperties.providerSpecificDetails - = providerSpecificDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanTestFailoverInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanUnplannedFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanUnplannedFailoverInput.java deleted file mode 100644 index df1ac38815b5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanUnplannedFailoverInput.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery plan unplanned failover input. - */ -@Fluent -public final class RecoveryPlanUnplannedFailoverInput implements JsonSerializable { - /* - * The recovery plan unplanned failover input properties. - */ - private RecoveryPlanUnplannedFailoverInputProperties properties; - - /** - * Creates an instance of RecoveryPlanUnplannedFailoverInput class. - */ - public RecoveryPlanUnplannedFailoverInput() { - } - - /** - * Get the properties property: The recovery plan unplanned failover input properties. - * - * @return the properties value. - */ - public RecoveryPlanUnplannedFailoverInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model RecoveryPlanUnplannedFailoverInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanUnplannedFailoverInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanUnplannedFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanUnplannedFailoverInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanUnplannedFailoverInput. - */ - public static RecoveryPlanUnplannedFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanUnplannedFailoverInput deserializedRecoveryPlanUnplannedFailoverInput - = new RecoveryPlanUnplannedFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedRecoveryPlanUnplannedFailoverInput.properties - = RecoveryPlanUnplannedFailoverInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanUnplannedFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanUnplannedFailoverInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanUnplannedFailoverInputProperties.java deleted file mode 100644 index 13d75826102c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPlanUnplannedFailoverInputProperties.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Recovery plan unplanned failover input properties. - */ -@Fluent -public final class RecoveryPlanUnplannedFailoverInputProperties - implements JsonSerializable { - /* - * The failover direction. - */ - private PossibleOperationsDirections failoverDirection; - - /* - * A value indicating whether source site operations are required. - */ - private SourceSiteOperations sourceSiteOperations; - - /* - * The provider specific properties. - */ - private List providerSpecificDetails; - - /** - * Creates an instance of RecoveryPlanUnplannedFailoverInputProperties class. - */ - public RecoveryPlanUnplannedFailoverInputProperties() { - } - - /** - * Get the failoverDirection property: The failover direction. - * - * @return the failoverDirection value. - */ - public PossibleOperationsDirections failoverDirection() { - return this.failoverDirection; - } - - /** - * Set the failoverDirection property: The failover direction. - * - * @param failoverDirection the failoverDirection value to set. - * @return the RecoveryPlanUnplannedFailoverInputProperties object itself. - */ - public RecoveryPlanUnplannedFailoverInputProperties - withFailoverDirection(PossibleOperationsDirections failoverDirection) { - this.failoverDirection = failoverDirection; - return this; - } - - /** - * Get the sourceSiteOperations property: A value indicating whether source site operations are required. - * - * @return the sourceSiteOperations value. - */ - public SourceSiteOperations sourceSiteOperations() { - return this.sourceSiteOperations; - } - - /** - * Set the sourceSiteOperations property: A value indicating whether source site operations are required. - * - * @param sourceSiteOperations the sourceSiteOperations value to set. - * @return the RecoveryPlanUnplannedFailoverInputProperties object itself. - */ - public RecoveryPlanUnplannedFailoverInputProperties - withSourceSiteOperations(SourceSiteOperations sourceSiteOperations) { - this.sourceSiteOperations = sourceSiteOperations; - return this; - } - - /** - * Get the providerSpecificDetails property: The provider specific properties. - * - * @return the providerSpecificDetails value. - */ - public List providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (failoverDirection() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property failoverDirection in model RecoveryPlanUnplannedFailoverInputProperties")); - } - if (sourceSiteOperations() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sourceSiteOperations in model RecoveryPlanUnplannedFailoverInputProperties")); - } - if (providerSpecificDetails() != null) { - providerSpecificDetails().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecoveryPlanUnplannedFailoverInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("failoverDirection", - this.failoverDirection == null ? null : this.failoverDirection.toString()); - jsonWriter.writeStringField("sourceSiteOperations", - this.sourceSiteOperations == null ? null : this.sourceSiteOperations.toString()); - jsonWriter.writeArrayField("providerSpecificDetails", this.providerSpecificDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPlanUnplannedFailoverInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPlanUnplannedFailoverInputProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecoveryPlanUnplannedFailoverInputProperties. - */ - public static RecoveryPlanUnplannedFailoverInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPlanUnplannedFailoverInputProperties deserializedRecoveryPlanUnplannedFailoverInputProperties - = new RecoveryPlanUnplannedFailoverInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("failoverDirection".equals(fieldName)) { - deserializedRecoveryPlanUnplannedFailoverInputProperties.failoverDirection - = PossibleOperationsDirections.fromString(reader.getString()); - } else if ("sourceSiteOperations".equals(fieldName)) { - deserializedRecoveryPlanUnplannedFailoverInputProperties.sourceSiteOperations - = SourceSiteOperations.fromString(reader.getString()); - } else if ("providerSpecificDetails".equals(fieldName)) { - List providerSpecificDetails - = reader.readArray(reader1 -> RecoveryPlanProviderSpecificFailoverInput.fromJson(reader1)); - deserializedRecoveryPlanUnplannedFailoverInputProperties.providerSpecificDetails - = providerSpecificDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPlanUnplannedFailoverInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPoint.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPoint.java deleted file mode 100644 index 077afdb945ed..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPoint.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPointInner; - -/** - * An immutable client-side representation of RecoveryPoint. - */ -public interface RecoveryPoint { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The recovery point properties. - * - * @return the properties value. - */ - RecoveryPointProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPointInner object. - * - * @return the inner object. - */ - RecoveryPointInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPointCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPointCollection.java deleted file mode 100644 index 02cd83d3b9f0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPointCollection.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPointInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of recovery point details. - */ -@Fluent -public final class RecoveryPointCollection implements JsonSerializable { - /* - * The recovery point details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of RecoveryPointCollection class. - */ - public RecoveryPointCollection() { - } - - /** - * Get the value property: The recovery point details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The recovery point details. - * - * @param value the value value to set. - * @return the RecoveryPointCollection object itself. - */ - public RecoveryPointCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the RecoveryPointCollection object itself. - */ - public RecoveryPointCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPointCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPointCollection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPointCollection. - */ - public static RecoveryPointCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPointCollection deserializedRecoveryPointCollection = new RecoveryPointCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> RecoveryPointInner.fromJson(reader1)); - deserializedRecoveryPointCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedRecoveryPointCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPointCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPointProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPointProperties.java deleted file mode 100644 index b01699012364..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPointProperties.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Recovery point properties. - */ -@Fluent -public final class RecoveryPointProperties implements JsonSerializable { - /* - * The recovery point time. - */ - private OffsetDateTime recoveryPointTime; - - /* - * The recovery point type: ApplicationConsistent, CrashConsistent. - */ - private String recoveryPointType; - - /* - * The provider specific details for the recovery point. - */ - private ProviderSpecificRecoveryPointDetails providerSpecificDetails; - - /** - * Creates an instance of RecoveryPointProperties class. - */ - public RecoveryPointProperties() { - } - - /** - * Get the recoveryPointTime property: The recovery point time. - * - * @return the recoveryPointTime value. - */ - public OffsetDateTime recoveryPointTime() { - return this.recoveryPointTime; - } - - /** - * Set the recoveryPointTime property: The recovery point time. - * - * @param recoveryPointTime the recoveryPointTime value to set. - * @return the RecoveryPointProperties object itself. - */ - public RecoveryPointProperties withRecoveryPointTime(OffsetDateTime recoveryPointTime) { - this.recoveryPointTime = recoveryPointTime; - return this; - } - - /** - * Get the recoveryPointType property: The recovery point type: ApplicationConsistent, CrashConsistent. - * - * @return the recoveryPointType value. - */ - public String recoveryPointType() { - return this.recoveryPointType; - } - - /** - * Set the recoveryPointType property: 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 providerSpecificDetails property: The provider specific details for the recovery point. - * - * @return the providerSpecificDetails value. - */ - public ProviderSpecificRecoveryPointDetails providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryPointTime", - this.recoveryPointTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.recoveryPointTime)); - jsonWriter.writeStringField("recoveryPointType", this.recoveryPointType); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryPointProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryPointProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryPointProperties. - */ - public static RecoveryPointProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryPointProperties deserializedRecoveryPointProperties = new RecoveryPointProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryPointTime".equals(fieldName)) { - deserializedRecoveryPointProperties.recoveryPointTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("recoveryPointType".equals(fieldName)) { - deserializedRecoveryPointProperties.recoveryPointType = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedRecoveryPointProperties.providerSpecificDetails - = ProviderSpecificRecoveryPointDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryPointProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPointSyncType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPointSyncType.java deleted file mode 100644 index c46e15a3d219..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPointSyncType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether the recovery point is multi VM consistent. - */ -public final class RecoveryPointSyncType extends ExpandableStringEnum { - /** - * Static value MultiVmSyncRecoveryPoint for RecoveryPointSyncType. - */ - public static final RecoveryPointSyncType MULTI_VM_SYNC_RECOVERY_POINT = fromString("MultiVmSyncRecoveryPoint"); - - /** - * Static value PerVmRecoveryPoint for RecoveryPointSyncType. - */ - public static final RecoveryPointSyncType PER_VM_RECOVERY_POINT = fromString("PerVmRecoveryPoint"); - - /** - * Creates a new instance of RecoveryPointSyncType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RecoveryPointSyncType() { - } - - /** - * Creates or finds a RecoveryPointSyncType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RecoveryPointSyncType. - */ - public static RecoveryPointSyncType fromString(String name) { - return fromString(name, RecoveryPointSyncType.class); - } - - /** - * Gets known RecoveryPointSyncType values. - * - * @return known RecoveryPointSyncType values. - */ - public static Collection values() { - return values(RecoveryPointSyncType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPointType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPointType.java deleted file mode 100644 index 8ccda6fad19e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPointType.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * 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. - */ -public final class RecoveryPointType extends ExpandableStringEnum { - /** - * Static value LatestTime for RecoveryPointType. - */ - public static final RecoveryPointType LATEST_TIME = fromString("LatestTime"); - - /** - * Static value LatestTag for RecoveryPointType. - */ - public static final RecoveryPointType LATEST_TAG = fromString("LatestTag"); - - /** - * Static value Custom for RecoveryPointType. - */ - public static final RecoveryPointType CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of RecoveryPointType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RecoveryPointType() { - } - - /** - * Creates or finds a RecoveryPointType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RecoveryPointType. - */ - public static RecoveryPointType fromString(String name) { - return fromString(name, RecoveryPointType.class); - } - - /** - * Gets known RecoveryPointType values. - * - * @return known RecoveryPointType values. - */ - public static Collection values() { - return values(RecoveryPointType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPoints.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPoints.java deleted file mode 100644 index 3c949a1aef99..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryPoints.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of RecoveryPoints. - */ -public interface RecoveryPoints { - /** - * Gets the list of recovery points for a replication protected item. - * - * Lists the available recovery points for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of recovery point details as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationProtectedItems(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName); - - /** - * Gets the list of recovery points for a replication protected item. - * - * Lists the available recovery points for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of recovery point details as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationProtectedItems(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context); - - /** - * Gets a recovery point. - * - * Get the details of specified recovery point. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param recoveryPointName The recovery point name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of specified recovery point along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, String recoveryPointName, Context context); - - /** - * Gets a recovery point. - * - * Get the details of specified recovery point. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replication protected item name. - * @param recoveryPointName The recovery point name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of specified recovery point. - */ - RecoveryPoint get(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, String recoveryPointName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryProximityPlacementGroupCustomDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryProximityPlacementGroupCustomDetails.java deleted file mode 100644 index a9a574f6adfc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryProximityPlacementGroupCustomDetails.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery Proximity placement group custom input. - */ -@Immutable -public class RecoveryProximityPlacementGroupCustomDetails - implements JsonSerializable { - /* - * The class type. - */ - private String resourceType = "RecoveryProximityPlacementGroupCustomDetails"; - - /** - * Creates an instance of RecoveryProximityPlacementGroupCustomDetails class. - */ - public RecoveryProximityPlacementGroupCustomDetails() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceType", this.resourceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryProximityPlacementGroupCustomDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryProximityPlacementGroupCustomDetails if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryProximityPlacementGroupCustomDetails. - */ - public static RecoveryProximityPlacementGroupCustomDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("resourceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Existing".equals(discriminatorValue)) { - return ExistingRecoveryProximityPlacementGroup.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static RecoveryProximityPlacementGroupCustomDetails fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - RecoveryProximityPlacementGroupCustomDetails deserializedRecoveryProximityPlacementGroupCustomDetails - = new RecoveryProximityPlacementGroupCustomDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceType".equals(fieldName)) { - deserializedRecoveryProximityPlacementGroupCustomDetails.resourceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryProximityPlacementGroupCustomDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryResourceGroupCustomDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryResourceGroupCustomDetails.java deleted file mode 100644 index 8b4dddd71cdf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryResourceGroupCustomDetails.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery Resource Group custom input. - */ -@Immutable -public class RecoveryResourceGroupCustomDetails implements JsonSerializable { - /* - * The class type. - */ - private String resourceType = "RecoveryResourceGroupCustomDetails"; - - /** - * Creates an instance of RecoveryResourceGroupCustomDetails class. - */ - public RecoveryResourceGroupCustomDetails() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceType", this.resourceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryResourceGroupCustomDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryResourceGroupCustomDetails if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryResourceGroupCustomDetails. - */ - public static RecoveryResourceGroupCustomDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("resourceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Existing".equals(discriminatorValue)) { - return ExistingRecoveryResourceGroup.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static RecoveryResourceGroupCustomDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryResourceGroupCustomDetails deserializedRecoveryResourceGroupCustomDetails - = new RecoveryResourceGroupCustomDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceType".equals(fieldName)) { - deserializedRecoveryResourceGroupCustomDetails.resourceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryResourceGroupCustomDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryServicesProvider.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryServicesProvider.java deleted file mode 100644 index ef2beab8d9f8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryServicesProvider.java +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryServicesProviderInner; - -/** - * An immutable client-side representation of RecoveryServicesProvider. - */ -public interface RecoveryServicesProvider { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Provider properties. - * - * @return the properties value. - */ - RecoveryServicesProviderProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryServicesProviderInner - * object. - * - * @return the inner object. - */ - RecoveryServicesProviderInner innerModel(); - - /** - * The entirety of the RecoveryServicesProvider definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The RecoveryServicesProvider definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the RecoveryServicesProvider definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the RecoveryServicesProvider definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName, fabricName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @return the next definition stage. - */ - WithProperties withExistingReplicationFabric(String resourceName, String resourceGroupName, - String fabricName); - } - - /** - * The stage of the RecoveryServicesProvider definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of an add provider request.. - * - * @param properties The properties of an add provider request. - * @return the next definition stage. - */ - WithCreate withProperties(AddRecoveryServicesProviderInputProperties properties); - } - - /** - * The stage of the RecoveryServicesProvider definition which contains all the minimum required properties for - * the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - RecoveryServicesProvider create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - RecoveryServicesProvider create(Context context); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - RecoveryServicesProvider refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - RecoveryServicesProvider refresh(Context context); - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details. - */ - RecoveryServicesProvider refreshProvider(); - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details. - */ - RecoveryServicesProvider refreshProvider(Context context); - - /** - * 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. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryServicesProviderCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryServicesProviderCollection.java deleted file mode 100644 index 8e58ac8b0e3a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryServicesProviderCollection.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryServicesProviderInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of providers. - */ -@Fluent -public final class RecoveryServicesProviderCollection implements JsonSerializable { - /* - * The Servers details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of RecoveryServicesProviderCollection class. - */ - public RecoveryServicesProviderCollection() { - } - - /** - * Get the value property: The Servers details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The Servers details. - * - * @param value the value value to set. - * @return the RecoveryServicesProviderCollection object itself. - */ - public RecoveryServicesProviderCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the RecoveryServicesProviderCollection object itself. - */ - public RecoveryServicesProviderCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryServicesProviderCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryServicesProviderCollection if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryServicesProviderCollection. - */ - public static RecoveryServicesProviderCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryServicesProviderCollection deserializedRecoveryServicesProviderCollection - = new RecoveryServicesProviderCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> RecoveryServicesProviderInner.fromJson(reader1)); - deserializedRecoveryServicesProviderCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedRecoveryServicesProviderCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryServicesProviderCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryServicesProviderProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryServicesProviderProperties.java deleted file mode 100644 index c23bd129b37b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryServicesProviderProperties.java +++ /dev/null @@ -1,664 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * Recovery services provider properties. - */ -@Fluent -public final class RecoveryServicesProviderProperties implements JsonSerializable { - /* - * Type of the site. - */ - private String fabricType; - - /* - * Friendly name of the DRA. - */ - private String friendlyName; - - /* - * The provider version. - */ - private String providerVersion; - - /* - * The fabric provider. - */ - private String serverVersion; - - /* - * DRA version status. - */ - private String providerVersionState; - - /* - * Expiry date of the version. - */ - private OffsetDateTime providerVersionExpiryDate; - - /* - * The fabric friendly name. - */ - private String fabricFriendlyName; - - /* - * Time when last heartbeat was sent by the DRA. - */ - private OffsetDateTime lastHeartBeat; - - /* - * A value indicating whether DRA is responsive. - */ - private String connectionStatus; - - /* - * Number of protected VMs currently managed by the DRA. - */ - private Integer protectedItemCount; - - /* - * The scenarios allowed on this provider. - */ - private List allowedScenarios; - - /* - * The recovery services provider health error details. - */ - private List healthErrorDetails; - - /* - * The DRA Id. - */ - private String draIdentifier; - - /* - * The machine Id. - */ - private String machineId; - - /* - * The machine name. - */ - private String machineName; - - /* - * The Bios Id. - */ - private String biosId; - - /* - * The authentication identity details. - */ - private IdentityProviderDetails authenticationIdentityDetails; - - /* - * The resource access identity details. - */ - private IdentityProviderDetails resourceAccessIdentityDetails; - - /* - * The data plane authentication identity details. - */ - private IdentityProviderDetails dataPlaneAuthenticationIdentityDetails; - - /* - * The provider version details. - */ - private VersionDetails providerVersionDetails; - - /** - * Creates an instance of RecoveryServicesProviderProperties class. - */ - public RecoveryServicesProviderProperties() { - } - - /** - * Get the fabricType property: Type of the site. - * - * @return the fabricType value. - */ - public String fabricType() { - return this.fabricType; - } - - /** - * Set the fabricType property: 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 the friendlyName property: Friendly name of the DRA. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 providerVersion property: The provider version. - * - * @return the providerVersion value. - */ - public String providerVersion() { - return this.providerVersion; - } - - /** - * Set the providerVersion property: 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 serverVersion property: The fabric provider. - * - * @return the serverVersion value. - */ - public String serverVersion() { - return this.serverVersion; - } - - /** - * Set the serverVersion property: 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 the providerVersionState property: DRA version status. - * - * @return the providerVersionState value. - */ - public String providerVersionState() { - return this.providerVersionState; - } - - /** - * Set the providerVersionState property: 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 the providerVersionExpiryDate property: Expiry date of the version. - * - * @return the providerVersionExpiryDate value. - */ - public OffsetDateTime providerVersionExpiryDate() { - return this.providerVersionExpiryDate; - } - - /** - * Set the providerVersionExpiryDate property: Expiry date of the version. - * - * @param providerVersionExpiryDate the providerVersionExpiryDate value to set. - * @return the RecoveryServicesProviderProperties object itself. - */ - public RecoveryServicesProviderProperties withProviderVersionExpiryDate(OffsetDateTime providerVersionExpiryDate) { - this.providerVersionExpiryDate = providerVersionExpiryDate; - return this; - } - - /** - * Get the fabricFriendlyName property: The fabric friendly name. - * - * @return the fabricFriendlyName value. - */ - public String fabricFriendlyName() { - return this.fabricFriendlyName; - } - - /** - * Set the fabricFriendlyName property: 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 the lastHeartBeat property: Time when last heartbeat was sent by the DRA. - * - * @return the lastHeartBeat value. - */ - public OffsetDateTime lastHeartBeat() { - return this.lastHeartBeat; - } - - /** - * Set the lastHeartBeat property: Time when last heartbeat was sent by the DRA. - * - * @param lastHeartBeat the lastHeartBeat value to set. - * @return the RecoveryServicesProviderProperties object itself. - */ - public RecoveryServicesProviderProperties withLastHeartBeat(OffsetDateTime lastHeartBeat) { - this.lastHeartBeat = lastHeartBeat; - return this; - } - - /** - * Get the connectionStatus property: A value indicating whether DRA is responsive. - * - * @return the connectionStatus value. - */ - public String connectionStatus() { - return this.connectionStatus; - } - - /** - * Set the connectionStatus property: 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 the protectedItemCount property: Number of protected VMs currently managed by the DRA. - * - * @return the protectedItemCount value. - */ - public Integer protectedItemCount() { - return this.protectedItemCount; - } - - /** - * Set the protectedItemCount property: 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 allowedScenarios property: The scenarios allowed on this provider. - * - * @return the allowedScenarios value. - */ - public List allowedScenarios() { - return this.allowedScenarios; - } - - /** - * Set the allowedScenarios property: 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 healthErrorDetails property: The recovery services provider health error details. - * - * @return the healthErrorDetails value. - */ - public List healthErrorDetails() { - return this.healthErrorDetails; - } - - /** - * Set the healthErrorDetails property: 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 draIdentifier property: The DRA Id. - * - * @return the draIdentifier value. - */ - public String draIdentifier() { - return this.draIdentifier; - } - - /** - * Set the draIdentifier property: 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 machineId property: The machine Id. - * - * @return the machineId value. - */ - public String machineId() { - return this.machineId; - } - - /** - * Set the machineId property: The machine Id. - * - * @param machineId the machineId value to set. - * @return the RecoveryServicesProviderProperties object itself. - */ - public RecoveryServicesProviderProperties withMachineId(String machineId) { - this.machineId = machineId; - return this; - } - - /** - * Get the machineName property: The machine name. - * - * @return the machineName value. - */ - public String machineName() { - return this.machineName; - } - - /** - * Set the machineName property: The machine name. - * - * @param machineName the machineName value to set. - * @return the RecoveryServicesProviderProperties object itself. - */ - public RecoveryServicesProviderProperties withMachineName(String machineName) { - this.machineName = machineName; - return this; - } - - /** - * Get the biosId property: The Bios Id. - * - * @return the biosId value. - */ - public String biosId() { - return this.biosId; - } - - /** - * Set the biosId property: The Bios Id. - * - * @param biosId the biosId value to set. - * @return the RecoveryServicesProviderProperties object itself. - */ - public RecoveryServicesProviderProperties withBiosId(String biosId) { - this.biosId = biosId; - return this; - } - - /** - * Get the authenticationIdentityDetails property: The authentication identity details. - * - * @return the authenticationIdentityDetails value. - */ - public IdentityProviderDetails authenticationIdentityDetails() { - return this.authenticationIdentityDetails; - } - - /** - * Set the authenticationIdentityDetails property: The authentication identity details. - * - * @param authenticationIdentityDetails the authenticationIdentityDetails value to set. - * @return the RecoveryServicesProviderProperties object itself. - */ - public RecoveryServicesProviderProperties - withAuthenticationIdentityDetails(IdentityProviderDetails authenticationIdentityDetails) { - this.authenticationIdentityDetails = authenticationIdentityDetails; - return this; - } - - /** - * Get the resourceAccessIdentityDetails property: The resource access identity details. - * - * @return the resourceAccessIdentityDetails value. - */ - public IdentityProviderDetails resourceAccessIdentityDetails() { - return this.resourceAccessIdentityDetails; - } - - /** - * Set the resourceAccessIdentityDetails property: The resource access identity details. - * - * @param resourceAccessIdentityDetails the resourceAccessIdentityDetails value to set. - * @return the RecoveryServicesProviderProperties object itself. - */ - public RecoveryServicesProviderProperties - withResourceAccessIdentityDetails(IdentityProviderDetails resourceAccessIdentityDetails) { - this.resourceAccessIdentityDetails = resourceAccessIdentityDetails; - return this; - } - - /** - * Get the dataPlaneAuthenticationIdentityDetails property: The data plane authentication identity details. - * - * @return the dataPlaneAuthenticationIdentityDetails value. - */ - public IdentityProviderDetails dataPlaneAuthenticationIdentityDetails() { - return this.dataPlaneAuthenticationIdentityDetails; - } - - /** - * Set the dataPlaneAuthenticationIdentityDetails property: The data plane authentication identity details. - * - * @param dataPlaneAuthenticationIdentityDetails the dataPlaneAuthenticationIdentityDetails value to set. - * @return the RecoveryServicesProviderProperties object itself. - */ - public RecoveryServicesProviderProperties - withDataPlaneAuthenticationIdentityDetails(IdentityProviderDetails dataPlaneAuthenticationIdentityDetails) { - this.dataPlaneAuthenticationIdentityDetails = dataPlaneAuthenticationIdentityDetails; - return this; - } - - /** - * Get the providerVersionDetails property: The provider version details. - * - * @return the providerVersionDetails value. - */ - public VersionDetails providerVersionDetails() { - return this.providerVersionDetails; - } - - /** - * Set the providerVersionDetails property: The provider version details. - * - * @param providerVersionDetails the providerVersionDetails value to set. - * @return the RecoveryServicesProviderProperties object itself. - */ - public RecoveryServicesProviderProperties withProviderVersionDetails(VersionDetails providerVersionDetails) { - this.providerVersionDetails = providerVersionDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (healthErrorDetails() != null) { - healthErrorDetails().forEach(e -> e.validate()); - } - if (authenticationIdentityDetails() != null) { - authenticationIdentityDetails().validate(); - } - if (resourceAccessIdentityDetails() != null) { - resourceAccessIdentityDetails().validate(); - } - if (dataPlaneAuthenticationIdentityDetails() != null) { - dataPlaneAuthenticationIdentityDetails().validate(); - } - if (providerVersionDetails() != null) { - providerVersionDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fabricType", this.fabricType); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("providerVersion", this.providerVersion); - jsonWriter.writeStringField("serverVersion", this.serverVersion); - jsonWriter.writeStringField("providerVersionState", this.providerVersionState); - jsonWriter.writeStringField("providerVersionExpiryDate", - this.providerVersionExpiryDate == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.providerVersionExpiryDate)); - jsonWriter.writeStringField("fabricFriendlyName", this.fabricFriendlyName); - jsonWriter.writeStringField("lastHeartBeat", - this.lastHeartBeat == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastHeartBeat)); - jsonWriter.writeStringField("connectionStatus", this.connectionStatus); - jsonWriter.writeNumberField("protectedItemCount", this.protectedItemCount); - jsonWriter.writeArrayField("allowedScenarios", this.allowedScenarios, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("healthErrorDetails", this.healthErrorDetails, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("draIdentifier", this.draIdentifier); - jsonWriter.writeStringField("machineId", this.machineId); - jsonWriter.writeStringField("machineName", this.machineName); - jsonWriter.writeStringField("biosId", this.biosId); - jsonWriter.writeJsonField("authenticationIdentityDetails", this.authenticationIdentityDetails); - jsonWriter.writeJsonField("resourceAccessIdentityDetails", this.resourceAccessIdentityDetails); - jsonWriter.writeJsonField("dataPlaneAuthenticationIdentityDetails", - this.dataPlaneAuthenticationIdentityDetails); - jsonWriter.writeJsonField("providerVersionDetails", this.providerVersionDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryServicesProviderProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryServicesProviderProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryServicesProviderProperties. - */ - public static RecoveryServicesProviderProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryServicesProviderProperties deserializedRecoveryServicesProviderProperties - = new RecoveryServicesProviderProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fabricType".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.fabricType = reader.getString(); - } else if ("friendlyName".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.friendlyName = reader.getString(); - } else if ("providerVersion".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.providerVersion = reader.getString(); - } else if ("serverVersion".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.serverVersion = reader.getString(); - } else if ("providerVersionState".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.providerVersionState = reader.getString(); - } else if ("providerVersionExpiryDate".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.providerVersionExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("fabricFriendlyName".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.fabricFriendlyName = reader.getString(); - } else if ("lastHeartBeat".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.lastHeartBeat = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("connectionStatus".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.connectionStatus = reader.getString(); - } else if ("protectedItemCount".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.protectedItemCount - = reader.getNullable(JsonReader::getInt); - } else if ("allowedScenarios".equals(fieldName)) { - List allowedScenarios = reader.readArray(reader1 -> reader1.getString()); - deserializedRecoveryServicesProviderProperties.allowedScenarios = allowedScenarios; - } else if ("healthErrorDetails".equals(fieldName)) { - List healthErrorDetails = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedRecoveryServicesProviderProperties.healthErrorDetails = healthErrorDetails; - } else if ("draIdentifier".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.draIdentifier = reader.getString(); - } else if ("machineId".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.machineId = reader.getString(); - } else if ("machineName".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.machineName = reader.getString(); - } else if ("biosId".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.biosId = reader.getString(); - } else if ("authenticationIdentityDetails".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.authenticationIdentityDetails - = IdentityProviderDetails.fromJson(reader); - } else if ("resourceAccessIdentityDetails".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.resourceAccessIdentityDetails - = IdentityProviderDetails.fromJson(reader); - } else if ("dataPlaneAuthenticationIdentityDetails".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.dataPlaneAuthenticationIdentityDetails - = IdentityProviderDetails.fromJson(reader); - } else if ("providerVersionDetails".equals(fieldName)) { - deserializedRecoveryServicesProviderProperties.providerVersionDetails - = VersionDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryServicesProviderProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryVirtualNetworkCustomDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryVirtualNetworkCustomDetails.java deleted file mode 100644 index 68d84419566a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RecoveryVirtualNetworkCustomDetails.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Recovery Virtual network custom input. - */ -@Immutable -public class RecoveryVirtualNetworkCustomDetails implements JsonSerializable { - /* - * The class type. - */ - private String resourceType = "RecoveryVirtualNetworkCustomDetails"; - - /** - * Creates an instance of RecoveryVirtualNetworkCustomDetails class. - */ - public RecoveryVirtualNetworkCustomDetails() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceType", this.resourceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecoveryVirtualNetworkCustomDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecoveryVirtualNetworkCustomDetails if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecoveryVirtualNetworkCustomDetails. - */ - public static RecoveryVirtualNetworkCustomDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("resourceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Existing".equals(discriminatorValue)) { - return ExistingRecoveryVirtualNetwork.fromJson(readerToUse.reset()); - } else if ("New".equals(discriminatorValue)) { - return NewRecoveryVirtualNetwork.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static RecoveryVirtualNetworkCustomDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecoveryVirtualNetworkCustomDetails deserializedRecoveryVirtualNetworkCustomDetails - = new RecoveryVirtualNetworkCustomDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceType".equals(fieldName)) { - deserializedRecoveryVirtualNetworkCustomDetails.resourceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRecoveryVirtualNetworkCustomDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveDisksInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveDisksInput.java deleted file mode 100644 index 2fb7f8dbf6c8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveDisksInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input for remove disk(s) operation. - */ -@Fluent -public final class RemoveDisksInput implements JsonSerializable { - /* - * Remove disk input properties. - */ - private RemoveDisksInputProperties properties; - - /** - * Creates an instance of RemoveDisksInput class. - */ - public RemoveDisksInput() { - } - - /** - * Get the properties property: Remove disk input properties. - * - * @return the properties value. - */ - public RemoveDisksInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Remove disk input properties. - * - * @param properties the properties value to set. - * @return the RemoveDisksInput object itself. - */ - public RemoveDisksInput withProperties(RemoveDisksInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoveDisksInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoveDisksInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RemoveDisksInput. - */ - public static RemoveDisksInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RemoveDisksInput deserializedRemoveDisksInput = new RemoveDisksInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedRemoveDisksInput.properties = RemoveDisksInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRemoveDisksInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveDisksInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveDisksInputProperties.java deleted file mode 100644 index cddc481ccaaf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveDisksInputProperties.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Remove Disk input properties. - */ -@Fluent -public final class RemoveDisksInputProperties implements JsonSerializable { - /* - * 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. - */ - private RemoveDisksProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of RemoveDisksInputProperties class. - */ - public RemoveDisksInputProperties() { - } - - /** - * Get the providerSpecificDetails property: 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 RemoveDisksProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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 RemoveDisksInputProperties object itself. - */ - public RemoveDisksInputProperties - withProviderSpecificDetails(RemoveDisksProviderSpecificInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoveDisksInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoveDisksInputProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RemoveDisksInputProperties. - */ - public static RemoveDisksInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RemoveDisksInputProperties deserializedRemoveDisksInputProperties = new RemoveDisksInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificDetails".equals(fieldName)) { - deserializedRemoveDisksInputProperties.providerSpecificDetails - = RemoveDisksProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRemoveDisksInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveDisksProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveDisksProviderSpecificInput.java deleted file mode 100644 index 2d5da7052185..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveDisksProviderSpecificInput.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Remove Disk provider specific input. - */ -@Immutable -public class RemoveDisksProviderSpecificInput implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "RemoveDisksProviderSpecificInput"; - - /** - * Creates an instance of RemoveDisksProviderSpecificInput class. - */ - public RemoveDisksProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoveDisksProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoveDisksProviderSpecificInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RemoveDisksProviderSpecificInput. - */ - public static RemoveDisksProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2ARemoveDisksInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static RemoveDisksProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RemoveDisksProviderSpecificInput deserializedRemoveDisksProviderSpecificInput - = new RemoveDisksProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedRemoveDisksProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRemoveDisksProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveProtectionContainerMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveProtectionContainerMappingInput.java deleted file mode 100644 index 1a1574f08d2d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveProtectionContainerMappingInput.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container unpairing input. - */ -@Fluent -public final class RemoveProtectionContainerMappingInput - implements JsonSerializable { - /* - * Configure protection input properties. - */ - private RemoveProtectionContainerMappingInputProperties properties; - - /** - * Creates an instance of RemoveProtectionContainerMappingInput class. - */ - public RemoveProtectionContainerMappingInput() { - } - - /** - * Get the properties property: Configure protection input properties. - * - * @return the properties value. - */ - public RemoveProtectionContainerMappingInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoveProtectionContainerMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoveProtectionContainerMappingInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RemoveProtectionContainerMappingInput. - */ - public static RemoveProtectionContainerMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RemoveProtectionContainerMappingInput deserializedRemoveProtectionContainerMappingInput - = new RemoveProtectionContainerMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedRemoveProtectionContainerMappingInput.properties - = RemoveProtectionContainerMappingInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRemoveProtectionContainerMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveProtectionContainerMappingInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveProtectionContainerMappingInputProperties.java deleted file mode 100644 index 105e9981a764..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RemoveProtectionContainerMappingInputProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Unpairing input properties. - */ -@Fluent -public final class RemoveProtectionContainerMappingInputProperties - implements JsonSerializable { - /* - * Provider specific input for unpairing. - */ - private ReplicationProviderContainerUnmappingInput providerSpecificInput; - - /** - * Creates an instance of RemoveProtectionContainerMappingInputProperties class. - */ - public RemoveProtectionContainerMappingInputProperties() { - } - - /** - * Get the providerSpecificInput property: Provider specific input for unpairing. - * - * @return the providerSpecificInput value. - */ - public ReplicationProviderContainerUnmappingInput providerSpecificInput() { - return this.providerSpecificInput; - } - - /** - * Set the providerSpecificInput property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificInput() != null) { - providerSpecificInput().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificInput", this.providerSpecificInput); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoveProtectionContainerMappingInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoveProtectionContainerMappingInputProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RemoveProtectionContainerMappingInputProperties. - */ - public static RemoveProtectionContainerMappingInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RemoveProtectionContainerMappingInputProperties deserializedRemoveProtectionContainerMappingInputProperties - = new RemoveProtectionContainerMappingInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificInput".equals(fieldName)) { - deserializedRemoveProtectionContainerMappingInputProperties.providerSpecificInput - = ReplicationProviderContainerUnmappingInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRemoveProtectionContainerMappingInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RenewCertificateInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RenewCertificateInput.java deleted file mode 100644 index 9cae94c27ddc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RenewCertificateInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Certificate renewal input. - */ -@Fluent -public final class RenewCertificateInput implements JsonSerializable { - /* - * Renew certificate input properties. - */ - private RenewCertificateInputProperties properties; - - /** - * Creates an instance of RenewCertificateInput class. - */ - public RenewCertificateInput() { - } - - /** - * Get the properties property: Renew certificate input properties. - * - * @return the properties value. - */ - public RenewCertificateInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RenewCertificateInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RenewCertificateInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RenewCertificateInput. - */ - public static RenewCertificateInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RenewCertificateInput deserializedRenewCertificateInput = new RenewCertificateInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedRenewCertificateInput.properties = RenewCertificateInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRenewCertificateInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RenewCertificateInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RenewCertificateInputProperties.java deleted file mode 100644 index 98780750fe7d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RenewCertificateInputProperties.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Renew Certificate input properties. - */ -@Fluent -public final class RenewCertificateInputProperties implements JsonSerializable { - /* - * Renew certificate type. - */ - private String renewCertificateType; - - /** - * Creates an instance of RenewCertificateInputProperties class. - */ - public RenewCertificateInputProperties() { - } - - /** - * Get the renewCertificateType property: Renew certificate type. - * - * @return the renewCertificateType value. - */ - public String renewCertificateType() { - return this.renewCertificateType; - } - - /** - * Set the renewCertificateType property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("renewCertificateType", this.renewCertificateType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RenewCertificateInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RenewCertificateInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RenewCertificateInputProperties. - */ - public static RenewCertificateInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RenewCertificateInputProperties deserializedRenewCertificateInputProperties - = new RenewCertificateInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("renewCertificateType".equals(fieldName)) { - deserializedRenewCertificateInputProperties.renewCertificateType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRenewCertificateInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationAgentDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationAgentDetails.java deleted file mode 100644 index a899b6a610c6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationAgentDetails.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Replication agent details. - */ -@Immutable -public final class ReplicationAgentDetails implements JsonSerializable { - /* - * The replication agent Id. - */ - private String id; - - /* - * The replication agent name. - */ - private String name; - - /* - * The replication agent Bios Id. - */ - private String biosId; - - /* - * The fabric object Id. - */ - private String fabricObjectId; - - /* - * The replication agent Fqdn. - */ - private String fqdn; - - /* - * The version. - */ - private String version; - - /* - * The last heartbeat received from the replication agent. - */ - private OffsetDateTime lastHeartbeatUtc; - - /* - * The health of the replication agent. - */ - private ProtectionHealth health; - - /* - * The health errors. - */ - private List healthErrors; - - /** - * Creates an instance of ReplicationAgentDetails class. - */ - public ReplicationAgentDetails() { - } - - /** - * Get the id property: The replication agent Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The replication agent name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the biosId property: The replication agent Bios Id. - * - * @return the biosId value. - */ - public String biosId() { - return this.biosId; - } - - /** - * Get the fabricObjectId property: The fabric object Id. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Get the fqdn property: The replication agent Fqdn. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the version property: The version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the lastHeartbeatUtc property: The last heartbeat received from the replication agent. - * - * @return the lastHeartbeatUtc value. - */ - public OffsetDateTime lastHeartbeatUtc() { - return this.lastHeartbeatUtc; - } - - /** - * Get the health property: The health of the replication agent. - * - * @return the health value. - */ - public ProtectionHealth health() { - return this.health; - } - - /** - * Get the healthErrors property: The health errors. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationAgentDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationAgentDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationAgentDetails. - */ - public static ReplicationAgentDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationAgentDetails deserializedReplicationAgentDetails = new ReplicationAgentDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedReplicationAgentDetails.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedReplicationAgentDetails.name = reader.getString(); - } else if ("biosId".equals(fieldName)) { - deserializedReplicationAgentDetails.biosId = reader.getString(); - } else if ("fabricObjectId".equals(fieldName)) { - deserializedReplicationAgentDetails.fabricObjectId = reader.getString(); - } else if ("fqdn".equals(fieldName)) { - deserializedReplicationAgentDetails.fqdn = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedReplicationAgentDetails.version = reader.getString(); - } else if ("lastHeartbeatUtc".equals(fieldName)) { - deserializedReplicationAgentDetails.lastHeartbeatUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("health".equals(fieldName)) { - deserializedReplicationAgentDetails.health = ProtectionHealth.fromString(reader.getString()); - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedReplicationAgentDetails.healthErrors = healthErrors; - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationAgentDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationAlertSettings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationAlertSettings.java deleted file mode 100644 index f24915f5fd22..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationAlertSettings.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationAlertSettings. - */ -public interface ReplicationAlertSettings { - /** - * Gets the list of configured email notification(alert) configurations. - * - * Gets the list of email notification(alert) configurations for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of email notification(alert) configurations for the vault as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of configured email notification(alert) configurations. - * - * Gets the list of email notification(alert) configurations for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of email notification(alert) configurations for the vault as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets an email notification(alert) configuration. - * - * Gets the details of the specified email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified email notification(alert) configuration along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String alertSettingName, - Context context); - - /** - * Gets an email notification(alert) configuration. - * - * Gets the details of the specified email notification(alert) configuration. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param alertSettingName The name of the email notification configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified email notification(alert) configuration. - */ - Alert get(String resourceName, String resourceGroupName, String alertSettingName); - - /** - * Gets an email notification(alert) configuration. - * - * Gets the details of the specified email notification(alert) configuration. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified email notification(alert) configuration along with {@link Response}. - */ - Alert getById(String id); - - /** - * Gets an email notification(alert) configuration. - * - * Gets the details of the specified email notification(alert) configuration. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified email notification(alert) configuration along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Alert resource. - * - * @param name resource name. - * @return the first stage of the new Alert definition. - */ - Alert.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationAppliance.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationAppliance.java deleted file mode 100644 index b26fde19188c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationAppliance.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationApplianceInner; - -/** - * An immutable client-side representation of ReplicationAppliance. - */ -public interface ReplicationAppliance { - /** - * Gets the properties property: Appliance related data. - * - * @return the properties value. - */ - ReplicationApplianceProperties properties(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationApplianceInner - * object. - * - * @return the inner object. - */ - ReplicationApplianceInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationApplianceProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationApplianceProperties.java deleted file mode 100644 index a8aa2a8b0db2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationApplianceProperties.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Replication appliance properties. - */ -@Fluent -public final class ReplicationApplianceProperties implements JsonSerializable { - /* - * Provider specific settings. - */ - private ApplianceSpecificDetails providerSpecificDetails; - - /** - * Creates an instance of ReplicationApplianceProperties class. - */ - public ReplicationApplianceProperties() { - } - - /** - * Get the providerSpecificDetails property: Provider specific settings. - * - * @return the providerSpecificDetails value. - */ - public ApplianceSpecificDetails providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: Provider specific settings. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the ReplicationApplianceProperties object itself. - */ - public ReplicationApplianceProperties - withProviderSpecificDetails(ApplianceSpecificDetails providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationApplianceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationApplianceProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationApplianceProperties. - */ - public static ReplicationApplianceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationApplianceProperties deserializedReplicationApplianceProperties - = new ReplicationApplianceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificDetails".equals(fieldName)) { - deserializedReplicationApplianceProperties.providerSpecificDetails - = ApplianceSpecificDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationApplianceProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationAppliances.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationAppliances.java deleted file mode 100644 index 020d2a42457b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationAppliances.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationAppliances. - */ -public interface ReplicationAppliances { - /** - * Gets the list of appliances. - * - * Gets the list of Azure Site Recovery appliances for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery appliances for the vault as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of appliances. - * - * Gets the list of Azure Site Recovery appliances for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery appliances for the vault as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, String filter, - Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResults.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResults.java deleted file mode 100644 index 994d79364a67..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResults.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsInner; - -/** - * An immutable client-side representation of ReplicationEligibilityResults. - */ -public interface ReplicationEligibilityResults { - /** - * Gets the name property: Gets the name of this object. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: Gets the object type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the id property: Gets Unique ARM identifier for this object. - * - * @return the id value. - */ - String id(); - - /** - * Gets the properties property: Gets properties model for replication eligibility results API. - * - * @return the properties value. - */ - ReplicationEligibilityResultsProperties properties(); - - /** - * Gets the inner - * com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsInner object. - * - * @return the inner object. - */ - ReplicationEligibilityResultsInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResultsCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResultsCollection.java deleted file mode 100644 index 7efb3464c6c5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResultsCollection.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsCollectionInner; -import java.util.List; - -/** - * An immutable client-side representation of ReplicationEligibilityResultsCollection. - */ -public interface ReplicationEligibilityResultsCollection { - /** - * Gets the value property: The replication eligibility results details. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner - * com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsCollectionInner - * object. - * - * @return the inner object. - */ - ReplicationEligibilityResultsCollectionInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResultsErrorInfo.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResultsErrorInfo.java deleted file mode 100644 index 3690fbe97017..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResultsErrorInfo.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Error model that can be exposed to the user. - */ -@Fluent -public final class ReplicationEligibilityResultsErrorInfo - implements JsonSerializable { - /* - * The error code. - */ - private String code; - - /* - * The error message. - */ - private String message; - - /* - * The possible causes. - */ - private String possibleCauses; - - /* - * The recommended action. - */ - private String recommendedAction; - - /* - * The error status. - */ - private String status; - - /** - * Creates an instance of ReplicationEligibilityResultsErrorInfo class. - */ - public ReplicationEligibilityResultsErrorInfo() { - } - - /** - * Get the code property: The error code. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Set the code property: The error code. - * - * @param code the code value to set. - * @return the ReplicationEligibilityResultsErrorInfo object itself. - */ - public ReplicationEligibilityResultsErrorInfo withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message property: The error message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: The error message. - * - * @param message the message value to set. - * @return the ReplicationEligibilityResultsErrorInfo object itself. - */ - public ReplicationEligibilityResultsErrorInfo withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the possibleCauses property: The possible causes. - * - * @return the possibleCauses value. - */ - public String possibleCauses() { - return this.possibleCauses; - } - - /** - * Set the possibleCauses property: The possible causes. - * - * @param possibleCauses the possibleCauses value to set. - * @return the ReplicationEligibilityResultsErrorInfo object itself. - */ - public ReplicationEligibilityResultsErrorInfo withPossibleCauses(String possibleCauses) { - this.possibleCauses = possibleCauses; - return this; - } - - /** - * Get the recommendedAction property: The recommended action. - * - * @return the recommendedAction value. - */ - public String recommendedAction() { - return this.recommendedAction; - } - - /** - * Set the recommendedAction property: The recommended action. - * - * @param recommendedAction the recommendedAction value to set. - * @return the ReplicationEligibilityResultsErrorInfo object itself. - */ - public ReplicationEligibilityResultsErrorInfo withRecommendedAction(String recommendedAction) { - this.recommendedAction = recommendedAction; - return this; - } - - /** - * Get the status property: The error status. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("code", this.code); - jsonWriter.writeStringField("message", this.message); - jsonWriter.writeStringField("possibleCauses", this.possibleCauses); - jsonWriter.writeStringField("recommendedAction", this.recommendedAction); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationEligibilityResultsErrorInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationEligibilityResultsErrorInfo if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationEligibilityResultsErrorInfo. - */ - public static ReplicationEligibilityResultsErrorInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationEligibilityResultsErrorInfo deserializedReplicationEligibilityResultsErrorInfo - = new ReplicationEligibilityResultsErrorInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedReplicationEligibilityResultsErrorInfo.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedReplicationEligibilityResultsErrorInfo.message = reader.getString(); - } else if ("possibleCauses".equals(fieldName)) { - deserializedReplicationEligibilityResultsErrorInfo.possibleCauses = reader.getString(); - } else if ("recommendedAction".equals(fieldName)) { - deserializedReplicationEligibilityResultsErrorInfo.recommendedAction = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedReplicationEligibilityResultsErrorInfo.status = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationEligibilityResultsErrorInfo; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResultsOperations.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResultsOperations.java deleted file mode 100644 index ca6dc774da76..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResultsOperations.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationEligibilityResultsOperations. - */ -public interface ReplicationEligibilityResultsOperations { - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results collection response model along with {@link Response}. - */ - Response listWithResponse(String resourceGroupName, - String virtualMachineName, Context context); - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results collection response model. - */ - ReplicationEligibilityResultsCollection list(String resourceGroupName, String virtualMachineName); - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results response model along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String virtualMachineName, - Context context); - - /** - * Gets the validation errors in case the VM is unsuitable for protection. - * - * Validates whether a given VM can be protected or not in which case returns list of errors. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param virtualMachineName Virtual Machine name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication eligibility results response model. - */ - ReplicationEligibilityResults get(String resourceGroupName, String virtualMachineName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResultsProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResultsProperties.java deleted file mode 100644 index 5a5f4169eef7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEligibilityResultsProperties.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties model for replication eligibility results API. - */ -@Fluent -public final class ReplicationEligibilityResultsProperties - implements JsonSerializable { - /* - * The client request Id. - */ - private String clientRequestId; - - /* - * The error details. - */ - private List errors; - - /** - * Creates an instance of ReplicationEligibilityResultsProperties class. - */ - public ReplicationEligibilityResultsProperties() { - } - - /** - * Get the clientRequestId property: The client request Id. - * - * @return the clientRequestId value. - */ - public String clientRequestId() { - return this.clientRequestId; - } - - /** - * Get the errors property: The error details. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Set the errors property: The error details. - * - * @param errors the errors value to set. - * @return the ReplicationEligibilityResultsProperties object itself. - */ - public ReplicationEligibilityResultsProperties withErrors(List errors) { - this.errors = errors; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("errors", this.errors, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationEligibilityResultsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationEligibilityResultsProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationEligibilityResultsProperties. - */ - public static ReplicationEligibilityResultsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationEligibilityResultsProperties deserializedReplicationEligibilityResultsProperties - = new ReplicationEligibilityResultsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clientRequestId".equals(fieldName)) { - deserializedReplicationEligibilityResultsProperties.clientRequestId = reader.getString(); - } else if ("errors".equals(fieldName)) { - List errors - = reader.readArray(reader1 -> ReplicationEligibilityResultsErrorInfo.fromJson(reader1)); - deserializedReplicationEligibilityResultsProperties.errors = errors; - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationEligibilityResultsProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEvents.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEvents.java deleted file mode 100644 index 469577f95270..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationEvents.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationEvents. - */ -public interface ReplicationEvents { - /** - * Gets the list of Azure Site Recovery events. - * - * Gets the list of Azure Site Recovery events for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery events for the vault as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of Azure Site Recovery events. - * - * Gets the list of Azure Site Recovery events for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery events for the vault as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, String filter, Context context); - - /** - * Get the details of an Azure Site recovery event. - * - * The operation to get the details of an Azure Site recovery event. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param eventName The name of the Azure Site Recovery event. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Event class along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String eventName, Context context); - - /** - * Get the details of an Azure Site recovery event. - * - * The operation to get the details of an Azure Site recovery event. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param eventName The name of the Azure Site Recovery event. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return implements the Event class. - */ - Event get(String resourceName, String resourceGroupName, String eventName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationFabrics.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationFabrics.java deleted file mode 100644 index 9ba25a9ffcfe..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationFabrics.java +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationFabrics. - */ -public interface ReplicationFabrics { - /** - * Gets the list of ASR fabrics. - * - * Gets a list of the Azure Site Recovery fabrics in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the Azure Site Recovery fabrics in the vault as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of ASR fabrics. - * - * Gets a list of the Azure Site Recovery fabrics in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the Azure Site Recovery fabrics in the vault as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the details of an ASR fabric. - * - * Gets the details of an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery fabric along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, String filter, - Context context); - - /** - * Gets the details of an ASR fabric. - * - * Gets the details of an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery fabric. - */ - Fabric get(String resourceName, String resourceGroupName, String fabricName); - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void purge(String resourceName, String resourceGroupName, String fabricName); - - /** - * Purges the site. - * - * The operation to purge(force delete) an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to purge. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void purge(String resourceName, String resourceGroupName, String fabricName, Context context); - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - Fabric checkConsistency(String resourceName, String resourceGroupName, String fabricName); - - /** - * Checks the consistency of the ASR fabric. - * - * The operation to perform a consistency check on the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - Fabric checkConsistency(String resourceName, String resourceGroupName, String fabricName, Context context); - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void migrateToAad(String resourceName, String resourceGroupName, String fabricName); - - /** - * Migrates the site to AAD. - * - * The operation to migrate an Azure Site Recovery fabric to AAD. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to migrate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void migrateToAad(String resourceName, String resourceGroupName, String fabricName, Context context); - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - Fabric reassociateGateway(String resourceName, String resourceGroupName, String fabricName, - FailoverProcessServerRequest failoverProcessServerRequest); - - /** - * Perform failover of the process server. - * - * The operation to move replications from a process server to another process server. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the process server. - * @param failoverProcessServerRequest The input to the failover process server operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - Fabric reassociateGateway(String resourceName, String resourceGroupName, String fabricName, - FailoverProcessServerRequest failoverProcessServerRequest, Context context); - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName); - - /** - * Deletes the site. - * - * The operation to delete or remove an Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName ASR fabric to delete. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, Context context); - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - Fabric renewCertificate(String resourceName, String resourceGroupName, String fabricName, - RenewCertificateInput renewCertificate); - - /** - * Renews certificate for the fabric. - * - * Renews the connection certificate for the ASR replication fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName fabric name to renew certs for. - * @param renewCertificate Renew certificate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return fabric definition. - */ - Fabric renewCertificate(String resourceName, String resourceGroupName, String fabricName, - RenewCertificateInput renewCertificate, Context context); - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void removeInfra(String resourceGroupName, String resourceName, String fabricName); - - /** - * Removes the appliance's infrastructure under the fabric. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceName Resource name. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void removeInfra(String resourceGroupName, String resourceName, String fabricName, Context context); - - /** - * Gets the details of an ASR fabric. - * - * Gets the details of an Azure Site Recovery fabric. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery fabric along with {@link Response}. - */ - Fabric getById(String id); - - /** - * Gets the details of an ASR fabric. - * - * Gets the details of an Azure Site Recovery fabric. - * - * @param id the resource ID. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery fabric along with {@link Response}. - */ - Response getByIdWithResponse(String id, String filter, Context context); - - /** - * Begins definition for a new Fabric resource. - * - * @param name resource name. - * @return the first stage of the new Fabric definition. - */ - Fabric.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationGroupDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationGroupDetails.java deleted file mode 100644 index 23c04e9f6d81..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationGroupDetails.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Replication group details. This will be used in case of San. - */ -@Immutable -public final class ReplicationGroupDetails extends ConfigurationSettings { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "ReplicationGroupDetails"; - - /** - * Creates an instance of ReplicationGroupDetails class. - */ - public ReplicationGroupDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationGroupDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationGroupDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationGroupDetails. - */ - public static ReplicationGroupDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationGroupDetails deserializedReplicationGroupDetails = new ReplicationGroupDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedReplicationGroupDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationGroupDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationJobs.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationJobs.java deleted file mode 100644 index 25c9eb722fb4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationJobs.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationJobs. - */ -public interface ReplicationJobs { - /** - * Gets the list of jobs. - * - * Gets the list of Azure Site Recovery Jobs for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery Jobs for the vault as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of jobs. - * - * Gets the list of Azure Site Recovery Jobs for the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Azure Site Recovery Jobs for the vault as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, String filter, Context context); - - /** - * Gets the job details. - * - * Get the details of an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery job along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String jobName, Context context); - - /** - * Gets the job details. - * - * Get the details of an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Azure Site Recovery job. - */ - Job get(String resourceName, String resourceGroupName, String jobName); - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - Job cancel(String resourceName, String resourceGroupName, String jobName); - - /** - * Cancels the specified job. - * - * The operation to cancel an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - Job cancel(String resourceName, String resourceGroupName, String jobName, Context context); - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - Job restart(String resourceName, String resourceGroupName, String jobName); - - /** - * Restarts the specified job. - * - * The operation to restart an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - Job restart(String resourceName, String resourceGroupName, String jobName, Context context); - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - Job resume(String resourceName, String resourceGroupName, String jobName, ResumeJobParams resumeJobParams); - - /** - * Resumes the specified job. - * - * The operation to resume an Azure Site Recovery job. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job identifier. - * @param resumeJobParams Resume rob comments. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - Job resume(String resourceName, String resourceGroupName, String jobName, ResumeJobParams resumeJobParams, - Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - Job export(String resourceName, String resourceGroupName, JobQueryParameter jobQueryParameter); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobQueryParameter job query filter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job details. - */ - Job export(String resourceName, String resourceGroupName, JobQueryParameter jobQueryParameter, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationLogicalNetworks.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationLogicalNetworks.java deleted file mode 100644 index 7265c3113c38..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationLogicalNetworks.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationLogicalNetworks. - */ -public interface ReplicationLogicalNetworks { - /** - * Gets the list of logical networks under a fabric. - * - * Lists all the logical networks of the Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of logical networks as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName); - - /** - * Gets the list of logical networks under a fabric. - * - * Lists all the logical networks of the Azure Site Recovery fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of logical networks as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context); - - /** - * Gets a logical network with specified server id and logical network name. - * - * Gets the details of a logical network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param logicalNetworkName Logical network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a logical network along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String logicalNetworkName, Context context); - - /** - * Gets a logical network with specified server id and logical network name. - * - * Gets the details of a logical network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param logicalNetworkName Logical network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a logical network. - */ - LogicalNetwork get(String resourceName, String resourceGroupName, String fabricName, String logicalNetworkName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationMigrationItems.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationMigrationItems.java deleted file mode 100644 index b9b5365a5f4d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationMigrationItems.java +++ /dev/null @@ -1,447 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationMigrationItems. - */ -public interface ReplicationMigrationItems { - /** - * Gets the list of migration items in the protection container. - * - * Gets the list of ASR migration items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR migration items in the protection container as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByReplicationProtectionContainers(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName); - - /** - * Gets the list of migration items in the protection container. - * - * Gets the list of ASR migration items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR migration items in the protection container as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByReplicationProtectionContainers(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String skipToken, String takeToken, String filter, - Context context); - - /** - * Gets the details of a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a migration item along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, Context context); - - /** - * Gets the details of a migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a migration item. - */ - MigrationItem get(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName); - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName); - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param deleteOption The delete option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String migrationItemName, String deleteOption, Context context); - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem migrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, MigrateInput migrateInput); - - /** - * Migrate item. - * - * The operation to initiate migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param migrateInput Migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem migrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, MigrateInput migrateInput, Context context); - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem pauseReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, PauseReplicationInput pauseReplicationInput); - - /** - * Pause replication. - * - * The operation to initiate pause replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param pauseReplicationInput Pause replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem pauseReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, PauseReplicationInput pauseReplicationInput, - Context context); - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem resumeReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResumeReplicationInput resumeReplicationInput); - - /** - * Resume replication. - * - * The operation to initiate resume replication of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param resumeReplicationInput Resume replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem resumeReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResumeReplicationInput resumeReplicationInput, - Context context); - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem resync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResyncInput input); - - /** - * Resynchronizes replication. - * - * The operation to resynchronize replication of an ASR migration item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param input Resync input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem resync(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, ResyncInput input, Context context); - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem testMigrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateInput testMigrateInput); - - /** - * Test migrate item. - * - * The operation to initiate test migration of the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateInput Test migrate input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem testMigrate(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateInput testMigrateInput, Context context); - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem testMigrateCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateCleanupInput testMigrateCleanupInput); - - /** - * Test migrate cleanup. - * - * The operation to initiate test migrate cleanup. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param migrationItemName Migration item name. - * @param testMigrateCleanupInput Test migrate cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return migration item. - */ - MigrationItem testMigrateCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String migrationItemName, TestMigrateCleanupInput testMigrateCleanupInput, - Context context); - - /** - * Gets the list of migration items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of migration items in the vault as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of migration items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of migration items in the vault as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, String skipToken, String takeToken, - String filter, Context context); - - /** - * Gets the details of a migration item. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a migration item along with {@link Response}. - */ - MigrationItem getById(String id); - - /** - * Gets the details of a migration item. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a migration item along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete the migration item. - * - * The operation to delete an ASR migration item. - * - * @param id the resource ID. - * @param deleteOption The delete option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, String deleteOption, Context context); - - /** - * Begins definition for a new MigrationItem resource. - * - * @param name resource name. - * @return the first stage of the new MigrationItem definition. - */ - MigrationItem.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationNetworkMappings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationNetworkMappings.java deleted file mode 100644 index 92799a973a7d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationNetworkMappings.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationNetworkMappings. - */ -public interface ReplicationNetworkMappings { - /** - * Gets all the network mappings under a network. - * - * Lists all ASR network mappings for the specified network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationNetworks(String resourceName, String resourceGroupName, - String fabricName, String networkName); - - /** - * Gets all the network mappings under a network. - * - * Lists all ASR network mappings for the specified network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationNetworks(String resourceName, String resourceGroupName, - String fabricName, String networkName, Context context); - - /** - * Gets network mapping by name. - * - * Gets the details of an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR network mapping along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String networkName, String networkMappingName, Context context); - - /** - * Gets network mapping by name. - * - * Gets the details of an ASR network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName Network mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR network mapping. - */ - NetworkMapping get(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName); - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName); - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Primary fabric name. - * @param networkName Primary network name. - * @param networkMappingName ARM Resource Name for network mapping. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String networkName, - String networkMappingName, Context context); - - /** - * Gets all the network mappings under a vault. - * - * Lists all ASR network mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets all the network mappings under a vault. - * - * Lists all ASR network mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of network mappings as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets network mapping by name. - * - * Gets the details of an ASR network mapping. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR network mapping along with {@link Response}. - */ - NetworkMapping getById(String id); - - /** - * Gets network mapping by name. - * - * Gets the details of an ASR network mapping. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR network mapping along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete network mapping. - * - * The operation to delete a network mapping. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new NetworkMapping resource. - * - * @param name resource name. - * @return the first stage of the new NetworkMapping definition. - */ - NetworkMapping.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationNetworks.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationNetworks.java deleted file mode 100644 index cad393ab57c9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationNetworks.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationNetworks. - */ -public interface ReplicationNetworks { - /** - * Gets the list of networks under a fabric. - * - * Lists the networks available for a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, String fabricName); - - /** - * Gets the list of networks under a fabric. - * - * Lists the networks available for a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, String fabricName, - Context context); - - /** - * Gets a network with specified server id and network name. - * - * Gets the details of a network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param networkName Primary network name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a network along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String networkName, Context context); - - /** - * Gets a network with specified server id and network name. - * - * Gets the details of a network. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Server Id. - * @param networkName Primary network name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a network. - */ - Network get(String resourceName, String resourceGroupName, String fabricName, String networkName); - - /** - * Gets the list of networks. View-only API. - * - * Lists the networks available in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of networks. View-only API. - * - * Lists the networks available in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of networks as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationPolicies.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationPolicies.java deleted file mode 100644 index 4e2e0aa8d06d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationPolicies.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationPolicies. - */ -public interface ReplicationPolicies { - /** - * Gets the list of replication policies. - * - * Lists the replication policies for a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Profile Collection details as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of replication policies. - * - * Lists the replication policies for a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Profile Collection details as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the requested policy. - * - * Gets the details of a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a replication policy along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String policyName, Context context); - - /** - * Gets the requested policy. - * - * Gets the details of a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a replication policy. - */ - Policy get(String resourceName, String resourceGroupName, String policyName); - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String policyName); - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Replication policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String policyName, Context context); - - /** - * Gets the requested policy. - * - * Gets the details of a replication policy. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a replication policy along with {@link Response}. - */ - Policy getById(String id); - - /** - * Gets the requested policy. - * - * Gets the details of a replication policy. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a replication policy along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete the policy. - * - * The operation to delete a replication policy. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Policy resource. - * - * @param name resource name. - * @return the first stage of the new Policy definition. - */ - Policy.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectableItems.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectableItems.java deleted file mode 100644 index 733be9e2acf6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectableItems.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationProtectableItems. - */ -public interface ReplicationProtectableItems { - /** - * Gets the list of protectable items. - * - * Lists the protectable items in a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationProtectionContainers(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName); - - /** - * Gets the list of protectable items. - * - * Lists the protectable items in a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param filter OData filter options. - * @param take take OData query parameter. - * @param skipToken skipToken OData query parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protectable item collection as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationProtectionContainers(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String filter, String take, String skipToken, - Context context); - - /** - * Gets the details of a protectable item. - * - * The operation to get the details of a protectable item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param protectableItemName Protectable item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String protectableItemName, Context context); - - /** - * Gets the details of a protectable item. - * - * The operation to get the details of a protectable item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param protectableItemName Protectable item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ProtectableItem get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String protectableItemName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItem.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItem.java deleted file mode 100644 index 54093aa9a8a2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItem.java +++ /dev/null @@ -1,634 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectedItemInner; - -/** - * An immutable client-side representation of ReplicationProtectedItem. - */ -public interface ReplicationProtectedItem { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The custom data. - * - * @return the properties value. - */ - ReplicationProtectedItemProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectedItemInner - * object. - * - * @return the inner object. - */ - ReplicationProtectedItemInner innerModel(); - - /** - * The entirety of the ReplicationProtectedItem definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ReplicationProtectedItem definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ReplicationProtectedItem definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ReplicationProtectedItem definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName, fabricName, protectionContainerName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric. - * @param protectionContainerName Protection container name. - * @return the next definition stage. - */ - WithCreate withExistingReplicationProtectionContainer(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName); - } - - /** - * The stage of the ReplicationProtectedItem definition which contains all the minimum required properties for - * the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ReplicationProtectedItem create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ReplicationProtectedItem create(Context context); - } - - /** - * The stage of the ReplicationProtectedItem definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Enable protection input properties.. - * - * @param properties Enable protection input properties. - * @return the next definition stage. - */ - WithCreate withProperties(EnableProtectionInputProperties properties); - } - } - - /** - * Begins update for the ReplicationProtectedItem resource. - * - * @return the stage of resource update. - */ - ReplicationProtectedItem.Update update(); - - /** - * The template for ReplicationProtectedItem update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ReplicationProtectedItem apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ReplicationProtectedItem apply(Context context); - } - - /** - * The ReplicationProtectedItem update stages. - */ - interface UpdateStages { - /** - * The stage of the ReplicationProtectedItem update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Update replication protected item properties.. - * - * @param properties Update replication protected item properties. - * @return the next definition stage. - */ - Update withProperties(UpdateReplicationProtectedItemInputProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ReplicationProtectedItem refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ReplicationProtectedItem refresh(Context context); - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param addDisksInput Add disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem addDisks(AddDisksInput addDisksInput); - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param addDisksInput Add disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem addDisks(AddDisksInput addDisksInput, Context context); - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem applyRecoveryPoint(ApplyRecoveryPointInput applyRecoveryPointInput); - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem applyRecoveryPoint(ApplyRecoveryPointInput applyRecoveryPointInput, Context context); - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem failoverCancel(); - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem failoverCancel(Context context); - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem failoverCommit(); - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem failoverCommit(Context context); - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param failoverInput Planned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem plannedFailover(PlannedFailoverInput failoverInput); - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param failoverInput Planned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem plannedFailover(PlannedFailoverInput failoverInput, Context context); - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param disableProtectionInput Disable protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(DisableProtectionInput disableProtectionInput); - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param disableProtectionInput Disable protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(DisableProtectionInput disableProtectionInput, Context context); - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param removeDisksInput Remove disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem removeDisks(RemoveDisksInput removeDisksInput); - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param removeDisksInput Remove disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem removeDisks(RemoveDisksInput removeDisksInput, Context context); - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem repairReplication(); - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem repairReplication(Context context); - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param reprotectInput Reverse replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem reprotect(ReverseReplicationInput reprotectInput); - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param reprotectInput Reverse replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem reprotect(ReverseReplicationInput reprotectInput, Context context); - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resolveHealthInput Health issue input object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem resolveHealthErrors(ResolveHealthInput resolveHealthInput); - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resolveHealthInput Health issue input object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem resolveHealthErrors(ResolveHealthInput resolveHealthInput, Context context); - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param switchProviderInput Switch provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem switchProvider(SwitchProviderInput switchProviderInput); - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param switchProviderInput Switch provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem switchProvider(SwitchProviderInput switchProviderInput, Context context); - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param testfailoverInput Test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem testFailover(TestFailoverInput testfailoverInput); - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param testfailoverInput Test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem testFailover(TestFailoverInput testfailoverInput, Context context); - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param cleanupInput Test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem testFailoverCleanup(TestFailoverCleanupInput cleanupInput); - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param cleanupInput Test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem testFailoverCleanup(TestFailoverCleanupInput cleanupInput, Context context); - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param failoverInput Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem unplannedFailover(UnplannedFailoverInput failoverInput); - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param failoverInput Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem unplannedFailover(UnplannedFailoverInput failoverInput, Context context); - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param applianceUpdateInput Appliance update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem updateAppliance(UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput); - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param applianceUpdateInput Appliance update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem updateAppliance(UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput, - Context context); - - /** - * 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 updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem updateMobilityService(UpdateMobilityServiceRequest updateMobilityServiceRequest); - - /** - * 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 updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem updateMobilityService(UpdateMobilityServiceRequest updateMobilityServiceRequest, - Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItemCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItemCollection.java deleted file mode 100644 index debb579605ec..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItemCollection.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectedItemInner; -import java.io.IOException; -import java.util.List; - -/** - * Replication protected item collection. - */ -@Fluent -public final class ReplicationProtectedItemCollection implements JsonSerializable { - /* - * The Replication protected item details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of ReplicationProtectedItemCollection class. - */ - public ReplicationProtectedItemCollection() { - } - - /** - * Get the value property: The Replication protected item details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The Replication protected item details. - * - * @param value the value value to set. - * @return the ReplicationProtectedItemCollection object itself. - */ - public ReplicationProtectedItemCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the ReplicationProtectedItemCollection object itself. - */ - public ReplicationProtectedItemCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProtectedItemCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProtectedItemCollection if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationProtectedItemCollection. - */ - public static ReplicationProtectedItemCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProtectedItemCollection deserializedReplicationProtectedItemCollection - = new ReplicationProtectedItemCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ReplicationProtectedItemInner.fromJson(reader1)); - deserializedReplicationProtectedItemCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedReplicationProtectedItemCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProtectedItemCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItemOperation.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItemOperation.java deleted file mode 100644 index 3ba6d059e9cb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItemOperation.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for ReplicationProtectedItemOperation. - */ -public final class ReplicationProtectedItemOperation extends ExpandableStringEnum { - /** - * Static value ReverseReplicate for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation REVERSE_REPLICATE = fromString("ReverseReplicate"); - - /** - * Static value Commit for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation COMMIT = fromString("Commit"); - - /** - * Static value PlannedFailover for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation PLANNED_FAILOVER = fromString("PlannedFailover"); - - /** - * Static value UnplannedFailover for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation UNPLANNED_FAILOVER = fromString("UnplannedFailover"); - - /** - * Static value DisableProtection for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation DISABLE_PROTECTION = fromString("DisableProtection"); - - /** - * Static value TestFailover for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation TEST_FAILOVER = fromString("TestFailover"); - - /** - * Static value TestFailoverCleanup for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation TEST_FAILOVER_CLEANUP = fromString("TestFailoverCleanup"); - - /** - * Static value Failback for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation FAILBACK = fromString("Failback"); - - /** - * Static value FinalizeFailback for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation FINALIZE_FAILBACK = fromString("FinalizeFailback"); - - /** - * Static value CancelFailover for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation CANCEL_FAILOVER = fromString("CancelFailover"); - - /** - * Static value ChangePit for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation CHANGE_PIT = fromString("ChangePit"); - - /** - * Static value RepairReplication for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation REPAIR_REPLICATION = fromString("RepairReplication"); - - /** - * Static value SwitchProtection for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation SWITCH_PROTECTION = fromString("SwitchProtection"); - - /** - * Static value CompleteMigration for ReplicationProtectedItemOperation. - */ - public static final ReplicationProtectedItemOperation COMPLETE_MIGRATION = fromString("CompleteMigration"); - - /** - * Creates a new instance of ReplicationProtectedItemOperation value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ReplicationProtectedItemOperation() { - } - - /** - * Creates or finds a ReplicationProtectedItemOperation from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReplicationProtectedItemOperation. - */ - public static ReplicationProtectedItemOperation fromString(String name) { - return fromString(name, ReplicationProtectedItemOperation.class); - } - - /** - * Gets known ReplicationProtectedItemOperation values. - * - * @return known ReplicationProtectedItemOperation values. - */ - public static Collection values() { - return values(ReplicationProtectedItemOperation.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItemProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItemProperties.java deleted file mode 100644 index 44382e9953f7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItemProperties.java +++ /dev/null @@ -1,948 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * Replication protected item custom data details. - */ -@Fluent -public final class ReplicationProtectedItemProperties implements JsonSerializable { - /* - * The name. - */ - private String friendlyName; - - /* - * The type of protected item type. - */ - private String protectedItemType; - - /* - * The protected item ARM Id. - */ - private String protectableItemId; - - /* - * The recovery provider ARM Id. - */ - private String recoveryServicesProviderId; - - /* - * The friendly name of the primary fabric. - */ - private String primaryFabricFriendlyName; - - /* - * The fabric provider of the primary fabric. - */ - private String primaryFabricProvider; - - /* - * The friendly name of recovery fabric. - */ - private String recoveryFabricFriendlyName; - - /* - * The Arm Id of recovery fabric. - */ - private String recoveryFabricId; - - /* - * The name of primary protection container friendly name. - */ - private String primaryProtectionContainerFriendlyName; - - /* - * The name of recovery container friendly name. - */ - private String recoveryProtectionContainerFriendlyName; - - /* - * The protection status. - */ - private String protectionState; - - /* - * The protection state description. - */ - private String protectionStateDescription; - - /* - * The Current active location of the PE. - */ - private String activeLocation; - - /* - * The Test failover state. - */ - private String testFailoverState; - - /* - * The Test failover state description. - */ - private String testFailoverStateDescription; - - /* - * The switch provider state. - */ - private String switchProviderState; - - /* - * The switch provider state description. - */ - private String switchProviderStateDescription; - - /* - * The allowed operations on the Replication protected item. - */ - 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. - */ - private String replicationHealth; - - /* - * The consolidated failover health for the VM. - */ - private String failoverHealth; - - /* - * List of health errors. - */ - private List healthErrors; - - /* - * The ID of Policy governing this PE. - */ - private String policyId; - - /* - * The name of Policy governing this PE. - */ - private String policyFriendlyName; - - /* - * The Last successful failover time. - */ - private OffsetDateTime lastSuccessfulFailoverTime; - - /* - * The Last successful test failover time. - */ - private OffsetDateTime lastSuccessfulTestFailoverTime; - - /* - * The current scenario. - */ - private CurrentScenarioDetails currentScenario; - - /* - * The recovery point ARM Id to which the Vm was failed over. - */ - private String failoverRecoveryPointId; - - /* - * The Replication provider custom settings. - */ - private ReplicationProviderSpecificSettings providerSpecificDetails; - - /* - * The recovery container Id. - */ - private String recoveryContainerId; - - /* - * The correlation Id for events associated with this protected item. - */ - private String eventCorrelationId; - - /** - * Creates an instance of ReplicationProtectedItemProperties class. - */ - public ReplicationProtectedItemProperties() { - } - - /** - * Get the friendlyName property: The name. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 protectedItemType property: The type of protected item type. - * - * @return the protectedItemType value. - */ - public String protectedItemType() { - return this.protectedItemType; - } - - /** - * Set the protectedItemType property: 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 protectableItemId property: The protected item ARM Id. - * - * @return the protectableItemId value. - */ - public String protectableItemId() { - return this.protectableItemId; - } - - /** - * Set the protectableItemId property: 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 recoveryServicesProviderId property: The recovery provider ARM Id. - * - * @return the recoveryServicesProviderId value. - */ - public String recoveryServicesProviderId() { - return this.recoveryServicesProviderId; - } - - /** - * Set the recoveryServicesProviderId property: 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 primaryFabricFriendlyName property: The friendly name of the primary fabric. - * - * @return the primaryFabricFriendlyName value. - */ - public String primaryFabricFriendlyName() { - return this.primaryFabricFriendlyName; - } - - /** - * Set the primaryFabricFriendlyName property: 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 primaryFabricProvider property: The fabric provider of the primary fabric. - * - * @return the primaryFabricProvider value. - */ - public String primaryFabricProvider() { - return this.primaryFabricProvider; - } - - /** - * Set the primaryFabricProvider property: The fabric provider of the primary fabric. - * - * @param primaryFabricProvider the primaryFabricProvider value to set. - * @return the ReplicationProtectedItemProperties object itself. - */ - public ReplicationProtectedItemProperties withPrimaryFabricProvider(String primaryFabricProvider) { - this.primaryFabricProvider = primaryFabricProvider; - return this; - } - - /** - * Get the recoveryFabricFriendlyName property: The friendly name of recovery fabric. - * - * @return the recoveryFabricFriendlyName value. - */ - public String recoveryFabricFriendlyName() { - return this.recoveryFabricFriendlyName; - } - - /** - * Set the recoveryFabricFriendlyName property: 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 recoveryFabricId property: The Arm Id of recovery fabric. - * - * @return the recoveryFabricId value. - */ - public String recoveryFabricId() { - return this.recoveryFabricId; - } - - /** - * Set the recoveryFabricId property: 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 primaryProtectionContainerFriendlyName property: The name of primary protection container friendly name. - * - * @return the primaryProtectionContainerFriendlyName value. - */ - public String primaryProtectionContainerFriendlyName() { - return this.primaryProtectionContainerFriendlyName; - } - - /** - * Set the primaryProtectionContainerFriendlyName property: 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 recoveryProtectionContainerFriendlyName property: The name of recovery container friendly name. - * - * @return the recoveryProtectionContainerFriendlyName value. - */ - public String recoveryProtectionContainerFriendlyName() { - return this.recoveryProtectionContainerFriendlyName; - } - - /** - * Set the recoveryProtectionContainerFriendlyName property: 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 protectionState property: The protection status. - * - * @return the protectionState value. - */ - public String protectionState() { - return this.protectionState; - } - - /** - * Set the protectionState property: 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 protectionStateDescription property: The protection state description. - * - * @return the protectionStateDescription value. - */ - public String protectionStateDescription() { - return this.protectionStateDescription; - } - - /** - * Set the protectionStateDescription property: 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 activeLocation property: The Current active location of the PE. - * - * @return the activeLocation value. - */ - public String activeLocation() { - return this.activeLocation; - } - - /** - * Set the activeLocation property: 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 testFailoverState property: The Test failover state. - * - * @return the testFailoverState value. - */ - public String testFailoverState() { - return this.testFailoverState; - } - - /** - * Set the testFailoverState property: 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 testFailoverStateDescription property: The Test failover state description. - * - * @return the testFailoverStateDescription value. - */ - public String testFailoverStateDescription() { - return this.testFailoverStateDescription; - } - - /** - * Set the testFailoverStateDescription property: 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 switchProviderState property: The switch provider state. - * - * @return the switchProviderState value. - */ - public String switchProviderState() { - return this.switchProviderState; - } - - /** - * Set the switchProviderState property: The switch provider state. - * - * @param switchProviderState the switchProviderState value to set. - * @return the ReplicationProtectedItemProperties object itself. - */ - public ReplicationProtectedItemProperties withSwitchProviderState(String switchProviderState) { - this.switchProviderState = switchProviderState; - return this; - } - - /** - * Get the switchProviderStateDescription property: The switch provider state description. - * - * @return the switchProviderStateDescription value. - */ - public String switchProviderStateDescription() { - return this.switchProviderStateDescription; - } - - /** - * Set the switchProviderStateDescription property: The switch provider state description. - * - * @param switchProviderStateDescription the switchProviderStateDescription value to set. - * @return the ReplicationProtectedItemProperties object itself. - */ - public ReplicationProtectedItemProperties - withSwitchProviderStateDescription(String switchProviderStateDescription) { - this.switchProviderStateDescription = switchProviderStateDescription; - return this; - } - - /** - * Get the allowedOperations property: The allowed operations on the Replication protected item. - * - * @return the allowedOperations value. - */ - public List allowedOperations() { - return this.allowedOperations; - } - - /** - * Set the allowedOperations property: 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 replicationHealth property: 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 replicationHealth property: 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 failoverHealth property: The consolidated failover health for the VM. - * - * @return the failoverHealth value. - */ - public String failoverHealth() { - return this.failoverHealth; - } - - /** - * Set the failoverHealth property: 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 the healthErrors property: List of health errors. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Set the healthErrors property: List of health errors. - * - * @param healthErrors the healthErrors value to set. - * @return the ReplicationProtectedItemProperties object itself. - */ - public ReplicationProtectedItemProperties withHealthErrors(List healthErrors) { - this.healthErrors = healthErrors; - return this; - } - - /** - * Get the policyId property: The ID of Policy governing this PE. - * - * @return the policyId value. - */ - public String policyId() { - return this.policyId; - } - - /** - * Set the policyId property: 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 policyFriendlyName property: The name of Policy governing this PE. - * - * @return the policyFriendlyName value. - */ - public String policyFriendlyName() { - return this.policyFriendlyName; - } - - /** - * Set the policyFriendlyName property: 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 lastSuccessfulFailoverTime property: The Last successful failover time. - * - * @return the lastSuccessfulFailoverTime value. - */ - public OffsetDateTime lastSuccessfulFailoverTime() { - return this.lastSuccessfulFailoverTime; - } - - /** - * Set the lastSuccessfulFailoverTime property: The Last successful failover time. - * - * @param lastSuccessfulFailoverTime the lastSuccessfulFailoverTime value to set. - * @return the ReplicationProtectedItemProperties object itself. - */ - public ReplicationProtectedItemProperties - withLastSuccessfulFailoverTime(OffsetDateTime lastSuccessfulFailoverTime) { - this.lastSuccessfulFailoverTime = lastSuccessfulFailoverTime; - return this; - } - - /** - * Get the lastSuccessfulTestFailoverTime property: The Last successful test failover time. - * - * @return the lastSuccessfulTestFailoverTime value. - */ - public OffsetDateTime lastSuccessfulTestFailoverTime() { - return this.lastSuccessfulTestFailoverTime; - } - - /** - * Set the lastSuccessfulTestFailoverTime property: The Last successful test failover time. - * - * @param lastSuccessfulTestFailoverTime the lastSuccessfulTestFailoverTime value to set. - * @return the ReplicationProtectedItemProperties object itself. - */ - public ReplicationProtectedItemProperties - withLastSuccessfulTestFailoverTime(OffsetDateTime lastSuccessfulTestFailoverTime) { - this.lastSuccessfulTestFailoverTime = lastSuccessfulTestFailoverTime; - return this; - } - - /** - * Get the currentScenario property: The current scenario. - * - * @return the currentScenario value. - */ - public CurrentScenarioDetails currentScenario() { - return this.currentScenario; - } - - /** - * Set the currentScenario property: 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 failoverRecoveryPointId property: The recovery point ARM Id to which the Vm was failed over. - * - * @return the failoverRecoveryPointId value. - */ - public String failoverRecoveryPointId() { - return this.failoverRecoveryPointId; - } - - /** - * Set the failoverRecoveryPointId property: 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 providerSpecificDetails property: The Replication provider custom settings. - * - * @return the providerSpecificDetails value. - */ - public ReplicationProviderSpecificSettings providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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 recoveryContainerId property: The recovery container Id. - * - * @return the recoveryContainerId value. - */ - public String recoveryContainerId() { - return this.recoveryContainerId; - } - - /** - * Set the recoveryContainerId property: 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; - } - - /** - * Get the eventCorrelationId property: The correlation Id for events associated with this protected item. - * - * @return the eventCorrelationId value. - */ - public String eventCorrelationId() { - return this.eventCorrelationId; - } - - /** - * Set the eventCorrelationId property: The correlation Id for events associated with this protected item. - * - * @param eventCorrelationId the eventCorrelationId value to set. - * @return the ReplicationProtectedItemProperties object itself. - */ - public ReplicationProtectedItemProperties withEventCorrelationId(String eventCorrelationId) { - this.eventCorrelationId = eventCorrelationId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - if (currentScenario() != null) { - currentScenario().validate(); - } - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("protectedItemType", this.protectedItemType); - jsonWriter.writeStringField("protectableItemId", this.protectableItemId); - jsonWriter.writeStringField("recoveryServicesProviderId", this.recoveryServicesProviderId); - jsonWriter.writeStringField("primaryFabricFriendlyName", this.primaryFabricFriendlyName); - jsonWriter.writeStringField("primaryFabricProvider", this.primaryFabricProvider); - jsonWriter.writeStringField("recoveryFabricFriendlyName", this.recoveryFabricFriendlyName); - jsonWriter.writeStringField("recoveryFabricId", this.recoveryFabricId); - jsonWriter.writeStringField("primaryProtectionContainerFriendlyName", - this.primaryProtectionContainerFriendlyName); - jsonWriter.writeStringField("recoveryProtectionContainerFriendlyName", - this.recoveryProtectionContainerFriendlyName); - jsonWriter.writeStringField("protectionState", this.protectionState); - jsonWriter.writeStringField("protectionStateDescription", this.protectionStateDescription); - jsonWriter.writeStringField("activeLocation", this.activeLocation); - jsonWriter.writeStringField("testFailoverState", this.testFailoverState); - jsonWriter.writeStringField("testFailoverStateDescription", this.testFailoverStateDescription); - jsonWriter.writeStringField("switchProviderState", this.switchProviderState); - jsonWriter.writeStringField("switchProviderStateDescription", this.switchProviderStateDescription); - jsonWriter.writeArrayField("allowedOperations", this.allowedOperations, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("replicationHealth", this.replicationHealth); - jsonWriter.writeStringField("failoverHealth", this.failoverHealth); - jsonWriter.writeArrayField("healthErrors", this.healthErrors, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("policyId", this.policyId); - jsonWriter.writeStringField("policyFriendlyName", this.policyFriendlyName); - jsonWriter.writeStringField("lastSuccessfulFailoverTime", - this.lastSuccessfulFailoverTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSuccessfulFailoverTime)); - jsonWriter.writeStringField("lastSuccessfulTestFailoverTime", - this.lastSuccessfulTestFailoverTime == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastSuccessfulTestFailoverTime)); - jsonWriter.writeJsonField("currentScenario", this.currentScenario); - jsonWriter.writeStringField("failoverRecoveryPointId", this.failoverRecoveryPointId); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - jsonWriter.writeStringField("recoveryContainerId", this.recoveryContainerId); - jsonWriter.writeStringField("eventCorrelationId", this.eventCorrelationId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProtectedItemProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProtectedItemProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationProtectedItemProperties. - */ - public static ReplicationProtectedItemProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProtectedItemProperties deserializedReplicationProtectedItemProperties - = new ReplicationProtectedItemProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.friendlyName = reader.getString(); - } else if ("protectedItemType".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.protectedItemType = reader.getString(); - } else if ("protectableItemId".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.protectableItemId = reader.getString(); - } else if ("recoveryServicesProviderId".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.recoveryServicesProviderId = reader.getString(); - } else if ("primaryFabricFriendlyName".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.primaryFabricFriendlyName = reader.getString(); - } else if ("primaryFabricProvider".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.primaryFabricProvider = reader.getString(); - } else if ("recoveryFabricFriendlyName".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.recoveryFabricFriendlyName = reader.getString(); - } else if ("recoveryFabricId".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.recoveryFabricId = reader.getString(); - } else if ("primaryProtectionContainerFriendlyName".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.primaryProtectionContainerFriendlyName - = reader.getString(); - } else if ("recoveryProtectionContainerFriendlyName".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.recoveryProtectionContainerFriendlyName - = reader.getString(); - } else if ("protectionState".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.protectionState = reader.getString(); - } else if ("protectionStateDescription".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.protectionStateDescription = reader.getString(); - } else if ("activeLocation".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.activeLocation = reader.getString(); - } else if ("testFailoverState".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.testFailoverState = reader.getString(); - } else if ("testFailoverStateDescription".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.testFailoverStateDescription = reader.getString(); - } else if ("switchProviderState".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.switchProviderState = reader.getString(); - } else if ("switchProviderStateDescription".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.switchProviderStateDescription = reader.getString(); - } else if ("allowedOperations".equals(fieldName)) { - List allowedOperations = reader.readArray(reader1 -> reader1.getString()); - deserializedReplicationProtectedItemProperties.allowedOperations = allowedOperations; - } else if ("replicationHealth".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.replicationHealth = reader.getString(); - } else if ("failoverHealth".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.failoverHealth = reader.getString(); - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedReplicationProtectedItemProperties.healthErrors = healthErrors; - } else if ("policyId".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.policyId = reader.getString(); - } else if ("policyFriendlyName".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.policyFriendlyName = reader.getString(); - } else if ("lastSuccessfulFailoverTime".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.lastSuccessfulFailoverTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastSuccessfulTestFailoverTime".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.lastSuccessfulTestFailoverTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("currentScenario".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.currentScenario - = CurrentScenarioDetails.fromJson(reader); - } else if ("failoverRecoveryPointId".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.failoverRecoveryPointId = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.providerSpecificDetails - = ReplicationProviderSpecificSettings.fromJson(reader); - } else if ("recoveryContainerId".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.recoveryContainerId = reader.getString(); - } else if ("eventCorrelationId".equals(fieldName)) { - deserializedReplicationProtectedItemProperties.eventCorrelationId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProtectedItemProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItems.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItems.java deleted file mode 100644 index d5ae741166a0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectedItems.java +++ /dev/null @@ -1,831 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationProtectedItems. - */ -public interface ReplicationProtectedItems { - /** - * Gets the list of Replication protected items. - * - * Gets the list of ASR replication protected items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the protection container as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName); - - /** - * Gets the list of Replication protected items. - * - * Gets the list of ASR replication protected items in the protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the protection container as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, Context context); - - /** - * Gets the details of a Replication protected item. - * - * Gets the details of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric unique name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protected item along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context); - - /** - * Gets the details of a Replication protected item. - * - * Gets the details of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protected item. - */ - ReplicationProtectedItem get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, Context context); - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem addDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, AddDisksInput addDisksInput); - - /** - * Add disk(s) for protection. - * - * Operation to add disks(s) to the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param addDisksInput Add disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem addDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, AddDisksInput addDisksInput, - Context context); - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem applyRecoveryPoint(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput); - - /** - * Change or apply recovery point. - * - * The operation to change the recovery point of a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The ARM fabric name. - * @param protectionContainerName The protection container name. - * @param replicatedProtectedItemName The replicated protected item name. - * @param applyRecoveryPointInput The ApplyRecoveryPointInput. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem applyRecoveryPoint(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - ApplyRecoveryPointInput applyRecoveryPointInput, Context context); - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem failoverCancel(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName); - - /** - * Execute cancel failover. - * - * Operation to cancel the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem failoverCancel(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context); - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem failoverCommit(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName); - - /** - * Execute commit failover. - * - * Operation to commit the failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem failoverCommit(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context); - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem plannedFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInput failoverInput); - - /** - * Execute planned failover. - * - * Operation to initiate a planned failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Planned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem plannedFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, PlannedFailoverInput failoverInput, - Context context); - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, DisableProtectionInput disableProtectionInput); - - /** - * Disables protection. - * - * The operation to disable replication on a replication protected item. This will also remove the item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param disableProtectionInput Disable protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String replicatedProtectedItemName, DisableProtectionInput disableProtectionInput, Context context); - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem removeDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, RemoveDisksInput removeDisksInput); - - /** - * Removes disk(s). - * - * Operation to remove disk(s) from the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param removeDisksInput Remove disks input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem removeDisks(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, RemoveDisksInput removeDisksInput, - Context context); - - /** - * Resynchronize or repair replication. - * - * The operation to start resynchronize/repair replication for a replication protected item requiring - * resynchronization. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem repairReplication(String resourceName, String resourceGroupName, 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the container. - * @param replicatedProtectedItemName The name of the replication protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem repairReplication(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, Context context); - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem reprotect(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInput reprotectInput); - - /** - * Execute Reverse Replication\Reprotect. - * - * Operation to reprotect or reverse replicate a failed over replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param reprotectInput Reverse replication input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem reprotect(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ReverseReplicationInput reprotectInput, - Context context); - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem resolveHealthErrors(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ResolveHealthInput resolveHealthInput); - - /** - * Resolve health errors. - * - * Operation to resolve health issues of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param resolveHealthInput Health issue input object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem resolveHealthErrors(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, ResolveHealthInput resolveHealthInput, - Context context); - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem switchProvider(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, SwitchProviderInput switchProviderInput); - - /** - * Execute switch provider. - * - * Operation to initiate a switch provider of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param switchProviderInput Switch provider input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem switchProvider(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, SwitchProviderInput switchProviderInput, - Context context); - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem testFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverInput testfailoverInput); - - /** - * Execute test failover. - * - * Operation to perform a test failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param testfailoverInput Test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem testFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverInput testfailoverInput, - Context context); - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem testFailoverCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput); - - /** - * Execute test failover cleanup. - * - * Operation to clean up the test failover of a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param cleanupInput Test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem testFailoverCleanup(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput, - Context context); - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem unplannedFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInput failoverInput); - - /** - * Execute unplanned failover. - * - * Operation to initiate a failover of the replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param failoverInput Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem unplannedFailover(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, UnplannedFailoverInput failoverInput, - Context context); - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem updateAppliance(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput); - - /** - * Updates appliance for replication protected Item. - * - * The operation to update appliance of an ASR replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param applianceUpdateInput Appliance update protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem updateAppliance(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem updateMobilityService(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric containing the protected item. - * @param protectionContainerName The name of the container containing the protected item. - * @param replicatedProtectedItemName The name of the protected item on which the agent is to be updated. - * @param updateMobilityServiceRequest Request to update the mobility service on the protected item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return replication protected item. - */ - ReplicationProtectedItem updateMobilityService(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String replicatedProtectedItemName, - UpdateMobilityServiceRequest updateMobilityServiceRequest, Context context); - - /** - * Gets the list of replication protected items. - * - * Gets the list of ASR replication protected items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the vault as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of replication protected items. - * - * Gets the list of ASR replication protected items in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protected items in the vault as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, String skipToken, - String filter, Context context); - - /** - * Gets the details of a Replication protected item. - * - * Gets the details of an ASR replication protected item. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protected item along with {@link Response}. - */ - ReplicationProtectedItem getById(String id); - - /** - * Gets the details of a Replication protected item. - * - * Gets the details of an ASR replication protected item. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protected item along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ReplicationProtectedItem resource. - * - * @param name resource name. - * @return the first stage of the new ReplicationProtectedItem definition. - */ - ReplicationProtectedItem.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionContainerMappings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionContainerMappings.java deleted file mode 100644 index 285060d7fd4a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionContainerMappings.java +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationProtectionContainerMappings. - */ -public interface ReplicationProtectionContainerMappings { - /** - * Gets the list of protection container mappings for a protection container. - * - * Lists the protection container mappings for a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName); - - /** - * Gets the list of protection container mappings for a protection container. - * - * Lists the protection container mappings for a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationProtectionContainers(String resourceName, - String resourceGroupName, String fabricName, String protectionContainerName, Context context); - - /** - * Gets a protection container mapping. - * - * Gets the details of a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection Container mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container mapping along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String mappingName, Context context); - - /** - * Gets a protection container mapping. - * - * Gets the details of a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection Container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container mapping. - */ - ProtectionContainerMapping get(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, String mappingName); - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName); - - /** - * Purge protection container mapping. - * - * The operation to purge(force delete) a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, Context context); - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, RemoveProtectionContainerMappingInput removalInput); - - /** - * Remove protection container mapping. - * - * The operation to delete or remove a protection container mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param mappingName Protection container mapping name. - * @param removalInput Removal input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - String mappingName, RemoveProtectionContainerMappingInput removalInput, Context context); - - /** - * Gets the list of all protection container mappings in a vault. - * - * Lists the protection container mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of all protection container mappings in a vault. - * - * Lists the protection container mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container mapping collection class as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets a protection container mapping. - * - * Gets the details of a protection container mapping. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container mapping along with {@link Response}. - */ - ProtectionContainerMapping getById(String id); - - /** - * Gets a protection container mapping. - * - * Gets the details of a protection container mapping. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container mapping along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ProtectionContainerMapping resource. - * - * @param name resource name. - * @return the first stage of the new ProtectionContainerMapping definition. - */ - ProtectionContainerMapping.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionContainers.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionContainers.java deleted file mode 100644 index 1b6ddcb824e1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionContainers.java +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationProtectionContainers. - */ -public interface ReplicationProtectionContainers { - /** - * Gets the list of protection container for a fabric. - * - * Lists the protection containers in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName); - - /** - * Gets the list of protection container for a fabric. - * - * Lists the protection containers in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context); - - /** - * Gets the protection container details. - * - * Gets the details of a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, Context context); - - /** - * Gets the protection container details. - * - * Gets the details of a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName Protection container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container. - */ - ProtectionContainer get(String resourceName, String resourceGroupName, 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - ProtectionContainer discoverProtectableItem(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The name of the fabric. - * @param protectionContainerName The name of the protection container. - * @param discoverProtectableItemRequest The request object to add a protectable item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - ProtectionContainer discoverProtectableItem(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest, Context context); - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName); - - /** - * Removes a protection container. - * - * Operation to remove a protection container. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric ARM name. - * @param protectionContainerName Unique protection container ARM name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, - Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - ProtectionContainer switchProtection(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, SwitchProtectionInput switchInput); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Unique fabric name. - * @param protectionContainerName Protection container name. - * @param switchInput Switch protection input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection container details. - */ - ProtectionContainer switchProtection(String resourceName, String resourceGroupName, String fabricName, - String protectionContainerName, SwitchProtectionInput switchInput, Context context); - - /** - * Gets the list of all protection containers in a vault. - * - * Lists the protection containers in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of all protection containers in a vault. - * - * Lists the protection containers in a vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return protection Container collection as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the protection container details. - * - * Gets the details of a protection container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container along with {@link Response}. - */ - ProtectionContainer getById(String id); - - /** - * Gets the protection container details. - * - * Gets the details of a protection container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a protection container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ProtectionContainer resource. - * - * @param name resource name. - * @return the first stage of the new ProtectionContainer definition. - */ - ProtectionContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntent.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntent.java deleted file mode 100644 index 81fbe592818c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntent.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectionIntentInner; - -/** - * An immutable client-side representation of ReplicationProtectionIntent. - */ -public interface ReplicationProtectionIntent { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The custom data. - * - * @return the properties value. - */ - ReplicationProtectionIntentProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner - * com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectionIntentInner object. - * - * @return the inner object. - */ - ReplicationProtectionIntentInner innerModel(); - - /** - * The entirety of the ReplicationProtectionIntent definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ReplicationProtectionIntent definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ReplicationProtectionIntent definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ReplicationProtectionIntent definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @return the next definition stage. - */ - WithCreate withExistingVault(String resourceName, String resourceGroupName); - } - - /** - * The stage of the ReplicationProtectionIntent definition which contains all the minimum required properties - * for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ReplicationProtectionIntent create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ReplicationProtectionIntent create(Context context); - } - - /** - * The stage of the ReplicationProtectionIntent definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Create protection intent input properties.. - * - * @param properties Create protection intent input properties. - * @return the next definition stage. - */ - WithCreate withProperties(CreateProtectionIntentProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ReplicationProtectionIntent refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ReplicationProtectionIntent refresh(Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntentCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntentCollection.java deleted file mode 100644 index 96fdbb7e936b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntentCollection.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectionIntentInner; -import java.io.IOException; -import java.util.List; - -/** - * Replication protection intent objects collection. - */ -@Fluent -public final class ReplicationProtectionIntentCollection - implements JsonSerializable { - /* - * The Replication protection intent details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of ReplicationProtectionIntentCollection class. - */ - public ReplicationProtectionIntentCollection() { - } - - /** - * Get the value property: The Replication protection intent details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The Replication protection intent details. - * - * @param value the value value to set. - * @return the ReplicationProtectionIntentCollection object itself. - */ - public ReplicationProtectionIntentCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the ReplicationProtectionIntentCollection object itself. - */ - public ReplicationProtectionIntentCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProtectionIntentCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProtectionIntentCollection if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationProtectionIntentCollection. - */ - public static ReplicationProtectionIntentCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProtectionIntentCollection deserializedReplicationProtectionIntentCollection - = new ReplicationProtectionIntentCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ReplicationProtectionIntentInner.fromJson(reader1)); - deserializedReplicationProtectionIntentCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedReplicationProtectionIntentCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProtectionIntentCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntentProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntentProperties.java deleted file mode 100644 index 175e389e3d1a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntentProperties.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Replication protection intent custom data details. - */ -@Fluent -public final class ReplicationProtectionIntentProperties - implements JsonSerializable { - /* - * The name. - */ - private String friendlyName; - - /* - * The job Id. - */ - private String jobId; - - /* - * The job state. - */ - private String jobState; - - /* - * A value indicating whether the intent object is active. - */ - private Boolean isActive; - - /* - * The creation time in UTC. - */ - private String creationTimeUtc; - - /* - * The Replication provider custom settings. - */ - private ReplicationProtectionIntentProviderSpecificSettings providerSpecificDetails; - - /** - * Creates an instance of ReplicationProtectionIntentProperties class. - */ - public ReplicationProtectionIntentProperties() { - } - - /** - * Get the friendlyName property: The name. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: The name. - * - * @param friendlyName the friendlyName value to set. - * @return the ReplicationProtectionIntentProperties object itself. - */ - public ReplicationProtectionIntentProperties withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - /** - * Get the jobId property: The job Id. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Get the jobState property: The job state. - * - * @return the jobState value. - */ - public String jobState() { - return this.jobState; - } - - /** - * Get the isActive property: A value indicating whether the intent object is active. - * - * @return the isActive value. - */ - public Boolean isActive() { - return this.isActive; - } - - /** - * Get the creationTimeUtc property: The creation time in UTC. - * - * @return the creationTimeUtc value. - */ - public String creationTimeUtc() { - return this.creationTimeUtc; - } - - /** - * Get the providerSpecificDetails property: The Replication provider custom settings. - * - * @return the providerSpecificDetails value. - */ - public ReplicationProtectionIntentProviderSpecificSettings providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: The Replication provider custom settings. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the ReplicationProtectionIntentProperties object itself. - */ - public ReplicationProtectionIntentProperties - withProviderSpecificDetails(ReplicationProtectionIntentProviderSpecificSettings providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProtectionIntentProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProtectionIntentProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationProtectionIntentProperties. - */ - public static ReplicationProtectionIntentProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProtectionIntentProperties deserializedReplicationProtectionIntentProperties - = new ReplicationProtectionIntentProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedReplicationProtectionIntentProperties.friendlyName = reader.getString(); - } else if ("jobId".equals(fieldName)) { - deserializedReplicationProtectionIntentProperties.jobId = reader.getString(); - } else if ("jobState".equals(fieldName)) { - deserializedReplicationProtectionIntentProperties.jobState = reader.getString(); - } else if ("isActive".equals(fieldName)) { - deserializedReplicationProtectionIntentProperties.isActive - = reader.getNullable(JsonReader::getBoolean); - } else if ("creationTimeUTC".equals(fieldName)) { - deserializedReplicationProtectionIntentProperties.creationTimeUtc = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedReplicationProtectionIntentProperties.providerSpecificDetails - = ReplicationProtectionIntentProviderSpecificSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProtectionIntentProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntentProviderSpecificSettings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntentProviderSpecificSettings.java deleted file mode 100644 index 032183b3ee73..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntentProviderSpecificSettings.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Replication provider specific settings. - */ -@Immutable -public class ReplicationProtectionIntentProviderSpecificSettings - implements JsonSerializable { - /* - * Gets the Instance type. - */ - private String instanceType = "ReplicationProtectionIntentProviderSpecificSettings"; - - /** - * Creates an instance of ReplicationProtectionIntentProviderSpecificSettings class. - */ - public ReplicationProtectionIntentProviderSpecificSettings() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProtectionIntentProviderSpecificSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProtectionIntentProviderSpecificSettings if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationProtectionIntentProviderSpecificSettings. - */ - public static ReplicationProtectionIntentProviderSpecificSettings fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2AReplicationIntentDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ReplicationProtectionIntentProviderSpecificSettings fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProtectionIntentProviderSpecificSettings deserializedReplicationProtectionIntentProviderSpecificSettings - = new ReplicationProtectionIntentProviderSpecificSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedReplicationProtectionIntentProviderSpecificSettings.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProtectionIntentProviderSpecificSettings; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntents.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntents.java deleted file mode 100644 index e0fd122e0b47..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProtectionIntents.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationProtectionIntents. - */ -public interface ReplicationProtectionIntents { - /** - * Gets the list of replication protection intent objects. - * - * Gets the list of ASR replication protection intent objects in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protection intent objects in the vault as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of replication protection intent objects. - * - * Gets the list of ASR replication protection intent objects in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param skipToken The pagination token. - * @param takeToken The page size. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of ASR replication protection intent objects in the vault as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, String skipToken, - String takeToken, Context context); - - /** - * Gets the details of a Replication protection intent item. - * - * Gets the details of an ASR replication protection intent. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName Replication protection intent name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protection intent along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, - String intentObjectName, Context context); - - /** - * Gets the details of a Replication protection intent item. - * - * Gets the details of an ASR replication protection intent. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param intentObjectName Replication protection intent name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protection intent. - */ - ReplicationProtectionIntent get(String resourceName, String resourceGroupName, String intentObjectName); - - /** - * Gets the details of a Replication protection intent item. - * - * Gets the details of an ASR replication protection intent. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protection intent along with {@link Response}. - */ - ReplicationProtectionIntent getById(String id); - - /** - * Gets the details of a Replication protection intent item. - * - * Gets the details of an ASR replication protection intent. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an ASR replication protection intent along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ReplicationProtectionIntent resource. - * - * @param name resource name. - * @return the first stage of the new ReplicationProtectionIntent definition. - */ - ReplicationProtectionIntent.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderContainerUnmappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderContainerUnmappingInput.java deleted file mode 100644 index 1a4b520b54b5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderContainerUnmappingInput.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific input for unpairing operations. - */ -@Fluent -public final class ReplicationProviderContainerUnmappingInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType; - - /** - * Creates an instance of ReplicationProviderContainerUnmappingInput class. - */ - public ReplicationProviderContainerUnmappingInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Set the instanceType property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProviderContainerUnmappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProviderContainerUnmappingInput if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationProviderContainerUnmappingInput. - */ - public static ReplicationProviderContainerUnmappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProviderContainerUnmappingInput deserializedReplicationProviderContainerUnmappingInput - = new ReplicationProviderContainerUnmappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedReplicationProviderContainerUnmappingInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProviderContainerUnmappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderSpecificContainerCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderSpecificContainerCreationInput.java deleted file mode 100644 index 0c7b3bd2fb19..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderSpecificContainerCreationInput.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific input for container creation operation. - */ -@Immutable -public class ReplicationProviderSpecificContainerCreationInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "ReplicationProviderSpecificContainerCreationInput"; - - /** - * Creates an instance of ReplicationProviderSpecificContainerCreationInput class. - */ - public ReplicationProviderSpecificContainerCreationInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProviderSpecificContainerCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProviderSpecificContainerCreationInput if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationProviderSpecificContainerCreationInput. - */ - public static ReplicationProviderSpecificContainerCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2AContainerCreationInput.fromJson(readerToUse.reset()); - } else if ("A2ACrossClusterMigration".equals(discriminatorValue)) { - return A2ACrossClusterMigrationContainerCreationInput.fromJson(readerToUse.reset()); - } else if ("VMwareCbt".equals(discriminatorValue)) { - return VMwareCbtContainerCreationInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ReplicationProviderSpecificContainerCreationInput fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProviderSpecificContainerCreationInput deserializedReplicationProviderSpecificContainerCreationInput - = new ReplicationProviderSpecificContainerCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedReplicationProviderSpecificContainerCreationInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProviderSpecificContainerCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderSpecificContainerMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderSpecificContainerMappingInput.java deleted file mode 100644 index c6979b485775..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderSpecificContainerMappingInput.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific input for pairing operations. - */ -@Immutable -public class ReplicationProviderSpecificContainerMappingInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "ReplicationProviderSpecificContainerMappingInput"; - - /** - * Creates an instance of ReplicationProviderSpecificContainerMappingInput class. - */ - public ReplicationProviderSpecificContainerMappingInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProviderSpecificContainerMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProviderSpecificContainerMappingInput if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationProviderSpecificContainerMappingInput. - */ - public static ReplicationProviderSpecificContainerMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2AContainerMappingInput.fromJson(readerToUse.reset()); - } else if ("VMwareCbt".equals(discriminatorValue)) { - return VMwareCbtContainerMappingInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ReplicationProviderSpecificContainerMappingInput fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProviderSpecificContainerMappingInput deserializedReplicationProviderSpecificContainerMappingInput - = new ReplicationProviderSpecificContainerMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedReplicationProviderSpecificContainerMappingInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProviderSpecificContainerMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderSpecificSettings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderSpecificSettings.java deleted file mode 100644 index 5c5a1902f2d3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderSpecificSettings.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Replication provider specific settings. - */ -@Immutable -public class ReplicationProviderSpecificSettings implements JsonSerializable { - /* - * Gets the Instance type. - */ - private String instanceType = "ReplicationProviderSpecificSettings"; - - /** - * Creates an instance of ReplicationProviderSpecificSettings class. - */ - public ReplicationProviderSpecificSettings() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProviderSpecificSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProviderSpecificSettings if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationProviderSpecificSettings. - */ - public static ReplicationProviderSpecificSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2ACrossClusterMigration".equals(discriminatorValue)) { - return A2ACrossClusterMigrationReplicationDetails.fromJson(readerToUse.reset()); - } else if ("A2A".equals(discriminatorValue)) { - return A2AReplicationDetails.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzure".equals(discriminatorValue)) { - return HyperVReplicaAzureReplicationDetails.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaBaseReplicationDetails".equals(discriminatorValue)) { - return HyperVReplicaBaseReplicationDetails.fromJson(readerToUse.reset()); - } else if ("HyperVReplica2012R2".equals(discriminatorValue)) { - return HyperVReplicaBlueReplicationDetails.fromJson(readerToUse.reset()); - } else if ("HyperVReplica2012".equals(discriminatorValue)) { - return HyperVReplicaReplicationDetails.fromJson(readerToUse.reset()); - } else if ("InMageAzureV2".equals(discriminatorValue)) { - return InMageAzureV2ReplicationDetails.fromJson(readerToUse.reset()); - } else if ("InMageRcmFailback".equals(discriminatorValue)) { - return InMageRcmFailbackReplicationDetails.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmReplicationDetails.fromJson(readerToUse.reset()); - } else if ("InMage".equals(discriminatorValue)) { - return InMageReplicationDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ReplicationProviderSpecificSettings fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProviderSpecificSettings deserializedReplicationProviderSpecificSettings - = new ReplicationProviderSpecificSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedReplicationProviderSpecificSettings.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProviderSpecificSettings; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderSpecificUpdateContainerMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderSpecificUpdateContainerMappingInput.java deleted file mode 100644 index f90e30f91fab..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationProviderSpecificUpdateContainerMappingInput.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific input for update pairing operations. - */ -@Immutable -public class ReplicationProviderSpecificUpdateContainerMappingInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "ReplicationProviderSpecificUpdateContainerMappingInput"; - - /** - * Creates an instance of ReplicationProviderSpecificUpdateContainerMappingInput class. - */ - public ReplicationProviderSpecificUpdateContainerMappingInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationProviderSpecificUpdateContainerMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationProviderSpecificUpdateContainerMappingInput if the JsonReader was pointing to - * an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicationProviderSpecificUpdateContainerMappingInput. - */ - public static ReplicationProviderSpecificUpdateContainerMappingInput fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2AUpdateContainerMappingInput.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmUpdateContainerMappingInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ReplicationProviderSpecificUpdateContainerMappingInput fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ReplicationProviderSpecificUpdateContainerMappingInput deserializedReplicationProviderSpecificUpdateContainerMappingInput - = new ReplicationProviderSpecificUpdateContainerMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedReplicationProviderSpecificUpdateContainerMappingInput.instanceType - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationProviderSpecificUpdateContainerMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationRecoveryPlans.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationRecoveryPlans.java deleted file mode 100644 index 126404a4dfb2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationRecoveryPlans.java +++ /dev/null @@ -1,399 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationRecoveryPlans. - */ -public interface ReplicationRecoveryPlans { - /** - * Gets the list of recovery plans. - * - * Lists the recovery plans in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan collection details as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of recovery plans. - * - * Lists the recovery plans in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan collection details as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the requested recovery plan. - * - * Gets the details of the recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Name of the recovery plan. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the recovery plan along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context); - - /** - * Gets the requested recovery plan. - * - * Gets the details of the recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Name of the recovery plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the recovery plan. - */ - RecoveryPlan get(String resourceName, String resourceGroupName, String recoveryPlanName); - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String recoveryPlanName); - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String recoveryPlanName, Context context); - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan failoverCancel(String resourceName, String resourceGroupName, String recoveryPlanName); - - /** - * Execute cancel failover of the recovery plan. - * - * The operation to cancel the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan failoverCancel(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context); - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan failoverCommit(String resourceName, String resourceGroupName, String recoveryPlanName); - - /** - * Execute commit failover of the recovery plan. - * - * The operation to commit the failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan failoverCommit(String resourceName, String resourceGroupName, String recoveryPlanName, - Context context); - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan plannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanPlannedFailoverInput input); - - /** - * Execute planned failover of the recovery plan. - * - * The operation to start the planned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan plannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanPlannedFailoverInput input, Context context); - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan reprotect(String resourceName, String resourceGroupName, String recoveryPlanName); - - /** - * Execute reprotect of the recovery plan. - * - * The operation to reprotect(reverse replicate) a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan reprotect(String resourceName, String resourceGroupName, String recoveryPlanName, Context context); - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan testFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverInput input); - - /** - * Execute test failover of the recovery plan. - * - * The operation to start the test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan testFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverInput input, Context context); - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan testFailoverCleanup(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverCleanupInput input); - - /** - * Execute test failover cleanup of the recovery plan. - * - * The operation to cleanup test failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan test failover cleanup input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan testFailoverCleanup(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanTestFailoverCleanupInput input, Context context); - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan unplannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanUnplannedFailoverInput input); - - /** - * Execute unplanned failover of the recovery plan. - * - * The operation to start the unplanned failover of a recovery plan. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param recoveryPlanName Recovery plan name. - * @param input Recovery plan unplanned failover input. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recovery plan details. - */ - RecoveryPlan unplannedFailover(String resourceName, String resourceGroupName, String recoveryPlanName, - RecoveryPlanUnplannedFailoverInput input, Context context); - - /** - * Gets the requested recovery plan. - * - * Gets the details of the recovery plan. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the recovery plan along with {@link Response}. - */ - RecoveryPlan getById(String id); - - /** - * Gets the requested recovery plan. - * - * Gets the details of the recovery plan. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the recovery plan along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes the specified recovery plan. - * - * Delete a recovery plan. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new RecoveryPlan resource. - * - * @param name resource name. - * @return the first stage of the new RecoveryPlan definition. - */ - RecoveryPlan.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationRecoveryServicesProviders.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationRecoveryServicesProviders.java deleted file mode 100644 index c10cd4e695b8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationRecoveryServicesProviders.java +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationRecoveryServicesProviders. - */ -public interface ReplicationRecoveryServicesProviders { - /** - * Gets the list of registered recovery services providers for the fabric. - * - * Lists the registered recovery services providers for the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName); - - /** - * Gets the list of registered recovery services providers for the fabric. - * - * Lists the registered recovery services providers for the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context); - - /** - * Gets the details of a recovery services provider. - * - * Gets the details of registered recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of registered recovery services provider along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String providerName, Context context); - - /** - * Gets the details of a recovery services provider. - * - * Gets the details of registered recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of registered recovery services provider. - */ - RecoveryServicesProvider get(String resourceName, String resourceGroupName, String fabricName, String providerName); - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void purge(String resourceName, String resourceGroupName, String fabricName, String providerName); - - /** - * Purges recovery service provider from fabric. - * - * The operation to purge(force delete) a recovery services provider from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void purge(String resourceName, String resourceGroupName, String fabricName, String providerName, Context context); - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details. - */ - RecoveryServicesProvider refreshProvider(String resourceName, String resourceGroupName, String fabricName, - String providerName); - - /** - * Refresh details from the recovery services provider. - * - * The operation to refresh the information from the recovery services provider. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provider details. - */ - RecoveryServicesProvider refreshProvider(String resourceName, String resourceGroupName, String fabricName, - String providerName, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param providerName Recovery services provider name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String providerName, Context context); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * 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 resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of providers as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the details of a recovery services provider. - * - * Gets the details of registered recovery services provider. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of registered recovery services provider along with {@link Response}. - */ - RecoveryServicesProvider getById(String id); - - /** - * Gets the details of a recovery services provider. - * - * Gets the details of registered recovery services provider. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of registered recovery services provider along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new RecoveryServicesProvider resource. - * - * @param name resource name. - * @return the first stage of the new RecoveryServicesProvider definition. - */ - RecoveryServicesProvider.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationVaultHealths.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationVaultHealths.java deleted file mode 100644 index 3fbf7f7f2eaf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationVaultHealths.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationVaultHealths. - */ -public interface ReplicationVaultHealths { - /** - * Gets the health summary for the vault. - * - * Gets the health details of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the health details of the vault along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the health summary for the vault. - * - * Gets the health details of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the health details of the vault. - */ - VaultHealthDetails get(String resourceName, String resourceGroupName); - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault health details definition. - */ - VaultHealthDetails refresh(String resourceName, String resourceGroupName); - - /** - * Refreshes health summary of the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vault health details definition. - */ - VaultHealthDetails refresh(String resourceName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationVaultSettings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationVaultSettings.java deleted file mode 100644 index 0c939a3333f1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationVaultSettings.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationVaultSettings. - */ -public interface ReplicationVaultSettings { - /** - * Gets the list of vault setting. - * - * Gets the list of vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of vault setting as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of vault setting. - * - * Gets the list of vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of vault setting as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the vault setting. - * - * Gets the vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the vault setting along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String vaultSettingName, - Context context); - - /** - * Gets the vault setting. - * - * Gets the vault setting. This includes the Migration Hub connection settings. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultSettingName Vault setting name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the vault setting. - */ - VaultSetting get(String resourceName, String resourceGroupName, String vaultSettingName); - - /** - * Gets the vault setting. - * - * Gets the vault setting. This includes the Migration Hub connection settings. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the vault setting along with {@link Response}. - */ - VaultSetting getById(String id); - - /** - * Gets the vault setting. - * - * Gets the vault setting. This includes the Migration Hub connection settings. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the vault setting along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new VaultSetting resource. - * - * @param name resource name. - * @return the first stage of the new VaultSetting definition. - */ - VaultSetting.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationvCenters.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationvCenters.java deleted file mode 100644 index 4241d72ecad1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReplicationvCenters.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ReplicationvCenters. - */ -public interface ReplicationvCenters { - /** - * Gets the list of vCenter registered under a fabric. - * - * Lists the vCenter servers registered in a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, String fabricName); - - /** - * Gets the list of vCenter registered under a fabric. - * - * Lists the vCenter servers registered in a fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, String fabricName, - Context context); - - /** - * Gets the details of a vCenter. - * - * Gets the details of a registered vCenter server(Add vCenter server). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a registered vCenter server(Add vCenter server) along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String vcenterName, Context context); - - /** - * Gets the details of a vCenter. - * - * Gets the details of a registered vCenter server(Add vCenter server). - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a registered vCenter server(Add vCenter server). - */ - VCenter get(String resourceName, String resourceGroupName, String fabricName, String vcenterName); - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String vcenterName); - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param vcenterName vcenter name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String vcenterName, Context context); - - /** - * Gets the list of vCenter registered under the vault. - * - * Lists the vCenter servers registered in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of vCenter registered under the vault. - * - * Lists the vCenter servers registered in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of vCenter details as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the details of a vCenter. - * - * Gets the details of a registered vCenter server(Add vCenter server). - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a registered vCenter server(Add vCenter server) along with {@link Response}. - */ - VCenter getById(String id); - - /** - * Gets the details of a vCenter. - * - * Gets the details of a registered vCenter server(Add vCenter server). - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a registered vCenter server(Add vCenter server) along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Remove vcenter operation. - * - * The operation to remove(unregister) a registered vCenter server from the vault. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new VCenter resource. - * - * @param name resource name. - * @return the first stage of the new VCenter definition. - */ - VCenter.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReprotectAgentDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReprotectAgentDetails.java deleted file mode 100644 index 1861b5fec09b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReprotectAgentDetails.java +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Reprotect agent details. - */ -@Immutable -public final class ReprotectAgentDetails implements JsonSerializable { - /* - * The reprotect agent Id. - */ - private String id; - - /* - * The reprotect agent name. - */ - private String name; - - /* - * The reprotect agent Bios Id. - */ - private String biosId; - - /* - * The fabric object Id. - */ - private String fabricObjectId; - - /* - * The reprotect agent Fqdn. - */ - private String fqdn; - - /* - * The version. - */ - private String version; - - /* - * The last heartbeat received from the reprotect agent. - */ - private OffsetDateTime lastHeartbeatUtc; - - /* - * The health of the reprotect agent. - */ - private ProtectionHealth health; - - /* - * The health errors. - */ - private List healthErrors; - - /* - * The protected item count. - */ - private Integer protectedItemCount; - - /* - * The list of accessible datastores fetched from discovery. - */ - private List accessibleDatastores; - - /* - * The Vcenter Id. - */ - private String vcenterId; - - /* - * The last time when SDS information discovered in SRS. - */ - private OffsetDateTime lastDiscoveryInUtc; - - /** - * Creates an instance of ReprotectAgentDetails class. - */ - public ReprotectAgentDetails() { - } - - /** - * Get the id property: The reprotect agent Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The reprotect agent name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the biosId property: The reprotect agent Bios Id. - * - * @return the biosId value. - */ - public String biosId() { - return this.biosId; - } - - /** - * Get the fabricObjectId property: The fabric object Id. - * - * @return the fabricObjectId value. - */ - public String fabricObjectId() { - return this.fabricObjectId; - } - - /** - * Get the fqdn property: The reprotect agent Fqdn. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the version property: The version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the lastHeartbeatUtc property: The last heartbeat received from the reprotect agent. - * - * @return the lastHeartbeatUtc value. - */ - public OffsetDateTime lastHeartbeatUtc() { - return this.lastHeartbeatUtc; - } - - /** - * Get the health property: The health of the reprotect agent. - * - * @return the health value. - */ - public ProtectionHealth health() { - return this.health; - } - - /** - * Get the healthErrors property: The health errors. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Get the protectedItemCount property: The protected item count. - * - * @return the protectedItemCount value. - */ - public Integer protectedItemCount() { - return this.protectedItemCount; - } - - /** - * Get the accessibleDatastores property: The list of accessible datastores fetched from discovery. - * - * @return the accessibleDatastores value. - */ - public List accessibleDatastores() { - return this.accessibleDatastores; - } - - /** - * Get the vcenterId property: The Vcenter Id. - * - * @return the vcenterId value. - */ - public String vcenterId() { - return this.vcenterId; - } - - /** - * Get the lastDiscoveryInUtc property: The last time when SDS information discovered in SRS. - * - * @return the lastDiscoveryInUtc value. - */ - public OffsetDateTime lastDiscoveryInUtc() { - return this.lastDiscoveryInUtc; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReprotectAgentDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReprotectAgentDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReprotectAgentDetails. - */ - public static ReprotectAgentDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReprotectAgentDetails deserializedReprotectAgentDetails = new ReprotectAgentDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedReprotectAgentDetails.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedReprotectAgentDetails.name = reader.getString(); - } else if ("biosId".equals(fieldName)) { - deserializedReprotectAgentDetails.biosId = reader.getString(); - } else if ("fabricObjectId".equals(fieldName)) { - deserializedReprotectAgentDetails.fabricObjectId = reader.getString(); - } else if ("fqdn".equals(fieldName)) { - deserializedReprotectAgentDetails.fqdn = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedReprotectAgentDetails.version = reader.getString(); - } else if ("lastHeartbeatUtc".equals(fieldName)) { - deserializedReprotectAgentDetails.lastHeartbeatUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("health".equals(fieldName)) { - deserializedReprotectAgentDetails.health = ProtectionHealth.fromString(reader.getString()); - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedReprotectAgentDetails.healthErrors = healthErrors; - } else if ("protectedItemCount".equals(fieldName)) { - deserializedReprotectAgentDetails.protectedItemCount = reader.getNullable(JsonReader::getInt); - } else if ("accessibleDatastores".equals(fieldName)) { - List accessibleDatastores = reader.readArray(reader1 -> reader1.getString()); - deserializedReprotectAgentDetails.accessibleDatastores = accessibleDatastores; - } else if ("vcenterId".equals(fieldName)) { - deserializedReprotectAgentDetails.vcenterId = reader.getString(); - } else if ("lastDiscoveryInUtc".equals(fieldName)) { - deserializedReprotectAgentDetails.lastDiscoveryInUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedReprotectAgentDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResolveHealthError.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResolveHealthError.java deleted file mode 100644 index 763ddbfc9218..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResolveHealthError.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Resolve health errors input properties. - */ -@Fluent -public final class ResolveHealthError implements JsonSerializable { - /* - * Health error id. - */ - private String healthErrorId; - - /** - * Creates an instance of ResolveHealthError class. - */ - public ResolveHealthError() { - } - - /** - * Get the healthErrorId property: Health error id. - * - * @return the healthErrorId value. - */ - public String healthErrorId() { - return this.healthErrorId; - } - - /** - * Set the healthErrorId property: Health error id. - * - * @param healthErrorId the healthErrorId value to set. - * @return the ResolveHealthError object itself. - */ - public ResolveHealthError withHealthErrorId(String healthErrorId) { - this.healthErrorId = healthErrorId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("healthErrorId", this.healthErrorId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResolveHealthError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResolveHealthError if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ResolveHealthError. - */ - public static ResolveHealthError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResolveHealthError deserializedResolveHealthError = new ResolveHealthError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("healthErrorId".equals(fieldName)) { - deserializedResolveHealthError.healthErrorId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedResolveHealthError; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResolveHealthInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResolveHealthInput.java deleted file mode 100644 index a8229afb7786..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResolveHealthInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Resolve health input. - */ -@Fluent -public final class ResolveHealthInput implements JsonSerializable { - /* - * Disable resolve health input properties. - */ - private ResolveHealthInputProperties properties; - - /** - * Creates an instance of ResolveHealthInput class. - */ - public ResolveHealthInput() { - } - - /** - * Get the properties property: Disable resolve health input properties. - * - * @return the properties value. - */ - public ResolveHealthInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Disable resolve health input properties. - * - * @param properties the properties value to set. - * @return the ResolveHealthInput object itself. - */ - public ResolveHealthInput withProperties(ResolveHealthInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResolveHealthInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResolveHealthInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ResolveHealthInput. - */ - public static ResolveHealthInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResolveHealthInput deserializedResolveHealthInput = new ResolveHealthInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedResolveHealthInput.properties = ResolveHealthInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedResolveHealthInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResolveHealthInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResolveHealthInputProperties.java deleted file mode 100644 index 174816c62996..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResolveHealthInputProperties.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Resolve health input properties. - */ -@Fluent -public final class ResolveHealthInputProperties implements JsonSerializable { - /* - * Health errors. - */ - private List healthErrors; - - /** - * Creates an instance of ResolveHealthInputProperties class. - */ - public ResolveHealthInputProperties() { - } - - /** - * Get the healthErrors property: Health errors. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Set the healthErrors property: Health errors. - * - * @param healthErrors the healthErrors value to set. - * @return the ResolveHealthInputProperties object itself. - */ - public ResolveHealthInputProperties withHealthErrors(List healthErrors) { - this.healthErrors = healthErrors; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("healthErrors", this.healthErrors, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResolveHealthInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResolveHealthInputProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ResolveHealthInputProperties. - */ - public static ResolveHealthInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResolveHealthInputProperties deserializedResolveHealthInputProperties = new ResolveHealthInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("healthErrors".equals(fieldName)) { - List healthErrors - = reader.readArray(reader1 -> ResolveHealthError.fromJson(reader1)); - deserializedResolveHealthInputProperties.healthErrors = healthErrors; - } else { - reader.skipChildren(); - } - } - - return deserializedResolveHealthInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResourceHealthSummary.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResourceHealthSummary.java deleted file mode 100644 index ef1f6772aed3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResourceHealthSummary.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Base class to define the health summary of the resources contained under an Arm resource. - */ -@Fluent -public final class ResourceHealthSummary implements JsonSerializable { - /* - * The count of total resources under the container. - */ - private Integer resourceCount; - - /* - * The list of summary of health errors across the resources under the container. - */ - private List issues; - - /* - * The categorized resource counts. - */ - private Map categorizedResourceCounts; - - /** - * Creates an instance of ResourceHealthSummary class. - */ - public ResourceHealthSummary() { - } - - /** - * Get the resourceCount property: The count of total resources under the container. - * - * @return the resourceCount value. - */ - public Integer resourceCount() { - return this.resourceCount; - } - - /** - * Set the resourceCount property: The count of total resources under 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 issues property: 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 issues property: 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; - } - - /** - * Get the categorizedResourceCounts property: The categorized resource counts. - * - * @return the categorizedResourceCounts value. - */ - public Map categorizedResourceCounts() { - return this.categorizedResourceCounts; - } - - /** - * Set the categorizedResourceCounts property: The categorized resource counts. - * - * @param categorizedResourceCounts the categorizedResourceCounts value to set. - * @return the ResourceHealthSummary object itself. - */ - public ResourceHealthSummary withCategorizedResourceCounts(Map categorizedResourceCounts) { - this.categorizedResourceCounts = categorizedResourceCounts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (issues() != null) { - issues().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("resourceCount", this.resourceCount); - jsonWriter.writeArrayField("issues", this.issues, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("categorizedResourceCounts", this.categorizedResourceCounts, - (writer, element) -> writer.writeInt(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceHealthSummary from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceHealthSummary if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ResourceHealthSummary. - */ - public static ResourceHealthSummary fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceHealthSummary deserializedResourceHealthSummary = new ResourceHealthSummary(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceCount".equals(fieldName)) { - deserializedResourceHealthSummary.resourceCount = reader.getNullable(JsonReader::getInt); - } else if ("issues".equals(fieldName)) { - List issues = reader.readArray(reader1 -> HealthErrorSummary.fromJson(reader1)); - deserializedResourceHealthSummary.issues = issues; - } else if ("categorizedResourceCounts".equals(fieldName)) { - Map categorizedResourceCounts = reader.readMap(reader1 -> reader1.getInt()); - deserializedResourceHealthSummary.categorizedResourceCounts = categorizedResourceCounts; - } else { - reader.skipChildren(); - } - } - - return deserializedResourceHealthSummary; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeJobParams.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeJobParams.java deleted file mode 100644 index 0d0c72f2b0ee..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeJobParams.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Resume job params. - */ -@Fluent -public final class ResumeJobParams implements JsonSerializable { - /* - * Resume job properties. - */ - private ResumeJobParamsProperties properties; - - /** - * Creates an instance of ResumeJobParams class. - */ - public ResumeJobParams() { - } - - /** - * Get the properties property: Resume job properties. - * - * @return the properties value. - */ - public ResumeJobParamsProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResumeJobParams from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResumeJobParams if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ResumeJobParams. - */ - public static ResumeJobParams fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResumeJobParams deserializedResumeJobParams = new ResumeJobParams(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedResumeJobParams.properties = ResumeJobParamsProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedResumeJobParams; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeJobParamsProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeJobParamsProperties.java deleted file mode 100644 index a6b5e1f06c80..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeJobParamsProperties.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Resume job properties. - */ -@Fluent -public final class ResumeJobParamsProperties implements JsonSerializable { - /* - * Resume job comments. - */ - private String comments; - - /** - * Creates an instance of ResumeJobParamsProperties class. - */ - public ResumeJobParamsProperties() { - } - - /** - * Get the comments property: Resume job comments. - * - * @return the comments value. - */ - public String comments() { - return this.comments; - } - - /** - * Set the comments property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("comments", this.comments); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResumeJobParamsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResumeJobParamsProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ResumeJobParamsProperties. - */ - public static ResumeJobParamsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResumeJobParamsProperties deserializedResumeJobParamsProperties = new ResumeJobParamsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("comments".equals(fieldName)) { - deserializedResumeJobParamsProperties.comments = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedResumeJobParamsProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeReplicationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeReplicationInput.java deleted file mode 100644 index e10c1f3d21bb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeReplicationInput.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Resume replication input. - */ -@Fluent -public final class ResumeReplicationInput implements JsonSerializable { - /* - * Resume replication input properties. - */ - private ResumeReplicationInputProperties properties; - - /** - * Creates an instance of ResumeReplicationInput class. - */ - public ResumeReplicationInput() { - } - - /** - * Get the properties property: Resume replication input properties. - * - * @return the properties value. - */ - public ResumeReplicationInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Resume replication input properties. - * - * @param properties the properties value to set. - * @return the ResumeReplicationInput object itself. - */ - public ResumeReplicationInput withProperties(ResumeReplicationInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model ResumeReplicationInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ResumeReplicationInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResumeReplicationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResumeReplicationInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ResumeReplicationInput. - */ - public static ResumeReplicationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResumeReplicationInput deserializedResumeReplicationInput = new ResumeReplicationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedResumeReplicationInput.properties = ResumeReplicationInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedResumeReplicationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeReplicationInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeReplicationInputProperties.java deleted file mode 100644 index 77cd132dcb80..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeReplicationInputProperties.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Resume replication input properties. - */ -@Fluent -public final class ResumeReplicationInputProperties implements JsonSerializable { - /* - * The provider specific input for resume replication. - */ - private ResumeReplicationProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of ResumeReplicationInputProperties class. - */ - public ResumeReplicationInputProperties() { - } - - /** - * Get the providerSpecificDetails property: The provider specific input for resume replication. - * - * @return the providerSpecificDetails value. - */ - public ResumeReplicationProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: The provider specific input for resume replication. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the ResumeReplicationInputProperties object itself. - */ - public ResumeReplicationInputProperties - withProviderSpecificDetails(ResumeReplicationProviderSpecificInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property providerSpecificDetails in model ResumeReplicationInputProperties")); - } else { - providerSpecificDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ResumeReplicationInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResumeReplicationInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResumeReplicationInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ResumeReplicationInputProperties. - */ - public static ResumeReplicationInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResumeReplicationInputProperties deserializedResumeReplicationInputProperties - = new ResumeReplicationInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificDetails".equals(fieldName)) { - deserializedResumeReplicationInputProperties.providerSpecificDetails - = ResumeReplicationProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedResumeReplicationInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeReplicationProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeReplicationProviderSpecificInput.java deleted file mode 100644 index ebf5263c2d2a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResumeReplicationProviderSpecificInput.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Resume replication provider specific input. - */ -@Immutable -public class ResumeReplicationProviderSpecificInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "ResumeReplicationProviderSpecificInput"; - - /** - * Creates an instance of ResumeReplicationProviderSpecificInput class. - */ - public ResumeReplicationProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResumeReplicationProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResumeReplicationProviderSpecificInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ResumeReplicationProviderSpecificInput. - */ - public static ResumeReplicationProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("VMwareCbt".equals(discriminatorValue)) { - return VMwareCbtResumeReplicationInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ResumeReplicationProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResumeReplicationProviderSpecificInput deserializedResumeReplicationProviderSpecificInput - = new ResumeReplicationProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedResumeReplicationProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedResumeReplicationProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResyncInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResyncInput.java deleted file mode 100644 index 2c0bfd07e07c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResyncInput.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Resync input. - */ -@Fluent -public final class ResyncInput implements JsonSerializable { - /* - * Resync input properties. - */ - private ResyncInputProperties properties; - - /** - * Creates an instance of ResyncInput class. - */ - public ResyncInput() { - } - - /** - * Get the properties property: Resync input properties. - * - * @return the properties value. - */ - public ResyncInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Resync input properties. - * - * @param properties the properties value to set. - * @return the ResyncInput object itself. - */ - public ResyncInput withProperties(ResyncInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model ResyncInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ResyncInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResyncInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResyncInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ResyncInput. - */ - public static ResyncInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResyncInput deserializedResyncInput = new ResyncInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedResyncInput.properties = ResyncInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedResyncInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResyncInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResyncInputProperties.java deleted file mode 100644 index a66bba6a2753..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResyncInputProperties.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Resync input properties. - */ -@Fluent -public final class ResyncInputProperties implements JsonSerializable { - /* - * The provider specific details. - */ - private ResyncProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of ResyncInputProperties class. - */ - public ResyncInputProperties() { - } - - /** - * Get the providerSpecificDetails property: The provider specific details. - * - * @return the providerSpecificDetails value. - */ - public ResyncProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: The provider specific details. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the ResyncInputProperties object itself. - */ - public ResyncInputProperties withProviderSpecificDetails(ResyncProviderSpecificInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property providerSpecificDetails in model ResyncInputProperties")); - } else { - providerSpecificDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ResyncInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResyncInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResyncInputProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ResyncInputProperties. - */ - public static ResyncInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResyncInputProperties deserializedResyncInputProperties = new ResyncInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificDetails".equals(fieldName)) { - deserializedResyncInputProperties.providerSpecificDetails - = ResyncProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedResyncInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResyncProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResyncProviderSpecificInput.java deleted file mode 100644 index 66c6e19df602..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResyncProviderSpecificInput.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Resync provider specific input. - */ -@Immutable -public class ResyncProviderSpecificInput implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "ResyncProviderSpecificInput"; - - /** - * Creates an instance of ResyncProviderSpecificInput class. - */ - public ResyncProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResyncProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResyncProviderSpecificInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ResyncProviderSpecificInput. - */ - public static ResyncProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("VMwareCbt".equals(discriminatorValue)) { - return VMwareCbtResyncInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ResyncProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResyncProviderSpecificInput deserializedResyncProviderSpecificInput = new ResyncProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedResyncProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedResyncProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResyncState.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResyncState.java deleted file mode 100644 index f4aeefb653ce..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ResyncState.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The resync state. - */ -public final class ResyncState extends ExpandableStringEnum { - /** - * Static value None for ResyncState. - */ - public static final ResyncState NONE = fromString("None"); - - /** - * Static value PreparedForResynchronization for ResyncState. - */ - public static final ResyncState PREPARED_FOR_RESYNCHRONIZATION = fromString("PreparedForResynchronization"); - - /** - * Static value StartedResynchronization for ResyncState. - */ - public static final ResyncState STARTED_RESYNCHRONIZATION = fromString("StartedResynchronization"); - - /** - * Creates a new instance of ResyncState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ResyncState() { - } - - /** - * Creates or finds a ResyncState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResyncState. - */ - public static ResyncState fromString(String name) { - return fromString(name, ResyncState.class); - } - - /** - * Gets known ResyncState values. - * - * @return known ResyncState values. - */ - public static Collection values() { - return values(ResyncState.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RetentionVolume.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RetentionVolume.java deleted file mode 100644 index f0223a59f8f0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RetentionVolume.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The retention details of the MT. - */ -@Fluent -public final class RetentionVolume implements JsonSerializable { - /* - * The volume name. - */ - private String volumeName; - - /* - * The volume capacity. - */ - private Long capacityInBytes; - - /* - * The free space available in this volume. - */ - private Long freeSpaceInBytes; - - /* - * The threshold percentage. - */ - private Integer thresholdPercentage; - - /** - * Creates an instance of RetentionVolume class. - */ - public RetentionVolume() { - } - - /** - * Get the volumeName property: The volume name. - * - * @return the volumeName value. - */ - public String volumeName() { - return this.volumeName; - } - - /** - * Set the volumeName property: 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 capacityInBytes property: The volume capacity. - * - * @return the capacityInBytes value. - */ - public Long capacityInBytes() { - return this.capacityInBytes; - } - - /** - * Set the capacityInBytes property: 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 freeSpaceInBytes property: The free space available in this volume. - * - * @return the freeSpaceInBytes value. - */ - public Long freeSpaceInBytes() { - return this.freeSpaceInBytes; - } - - /** - * Set the freeSpaceInBytes property: 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 thresholdPercentage property: The threshold percentage. - * - * @return the thresholdPercentage value. - */ - public Integer thresholdPercentage() { - return this.thresholdPercentage; - } - - /** - * Set the thresholdPercentage property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("volumeName", this.volumeName); - jsonWriter.writeNumberField("capacityInBytes", this.capacityInBytes); - jsonWriter.writeNumberField("freeSpaceInBytes", this.freeSpaceInBytes); - jsonWriter.writeNumberField("thresholdPercentage", this.thresholdPercentage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RetentionVolume from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RetentionVolume if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RetentionVolume. - */ - public static RetentionVolume fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RetentionVolume deserializedRetentionVolume = new RetentionVolume(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("volumeName".equals(fieldName)) { - deserializedRetentionVolume.volumeName = reader.getString(); - } else if ("capacityInBytes".equals(fieldName)) { - deserializedRetentionVolume.capacityInBytes = reader.getNullable(JsonReader::getLong); - } else if ("freeSpaceInBytes".equals(fieldName)) { - deserializedRetentionVolume.freeSpaceInBytes = reader.getNullable(JsonReader::getLong); - } else if ("thresholdPercentage".equals(fieldName)) { - deserializedRetentionVolume.thresholdPercentage = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedRetentionVolume; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReverseReplicationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReverseReplicationInput.java deleted file mode 100644 index 14cc55992e9b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReverseReplicationInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Reverse replication input. - */ -@Fluent -public final class ReverseReplicationInput implements JsonSerializable { - /* - * Reverse replication properties. - */ - private ReverseReplicationInputProperties properties; - - /** - * Creates an instance of ReverseReplicationInput class. - */ - public ReverseReplicationInput() { - } - - /** - * Get the properties property: Reverse replication properties. - * - * @return the properties value. - */ - public ReverseReplicationInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReverseReplicationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReverseReplicationInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReverseReplicationInput. - */ - public static ReverseReplicationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReverseReplicationInput deserializedReverseReplicationInput = new ReverseReplicationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedReverseReplicationInput.properties = ReverseReplicationInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedReverseReplicationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReverseReplicationInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReverseReplicationInputProperties.java deleted file mode 100644 index e488442e9b89..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReverseReplicationInputProperties.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Reverse replication input properties. - */ -@Fluent -public final class ReverseReplicationInputProperties implements JsonSerializable { - /* - * Failover direction. - */ - private String failoverDirection; - - /* - * Provider specific reverse replication input. - */ - private ReverseReplicationProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of ReverseReplicationInputProperties class. - */ - public ReverseReplicationInputProperties() { - } - - /** - * Get the failoverDirection property: Failover direction. - * - * @return the failoverDirection value. - */ - public String failoverDirection() { - return this.failoverDirection; - } - - /** - * Set the failoverDirection property: 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 the providerSpecificDetails property: Provider specific reverse replication input. - * - * @return the providerSpecificDetails value. - */ - public ReverseReplicationProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("failoverDirection", this.failoverDirection); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReverseReplicationInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReverseReplicationInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReverseReplicationInputProperties. - */ - public static ReverseReplicationInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReverseReplicationInputProperties deserializedReverseReplicationInputProperties - = new ReverseReplicationInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("failoverDirection".equals(fieldName)) { - deserializedReverseReplicationInputProperties.failoverDirection = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedReverseReplicationInputProperties.providerSpecificDetails - = ReverseReplicationProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedReverseReplicationInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReverseReplicationProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReverseReplicationProviderSpecificInput.java deleted file mode 100644 index 95c278353229..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ReverseReplicationProviderSpecificInput.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific reverse replication input. - */ -@Immutable -public class ReverseReplicationProviderSpecificInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "ReverseReplicationProviderSpecificInput"; - - /** - * Creates an instance of ReverseReplicationProviderSpecificInput class. - */ - public ReverseReplicationProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReverseReplicationProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReverseReplicationProviderSpecificInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReverseReplicationProviderSpecificInput. - */ - public static ReverseReplicationProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2AReprotectInput.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzure".equals(discriminatorValue)) { - return HyperVReplicaAzureReprotectInput.fromJson(readerToUse.reset()); - } else if ("InMageAzureV2".equals(discriminatorValue)) { - return InMageAzureV2ReprotectInput.fromJson(readerToUse.reset()); - } else if ("InMageRcmFailback".equals(discriminatorValue)) { - return InMageRcmFailbackReprotectInput.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmReprotectInput.fromJson(readerToUse.reset()); - } else if ("InMage".equals(discriminatorValue)) { - return InMageReprotectInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ReverseReplicationProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ReverseReplicationProviderSpecificInput deserializedReverseReplicationProviderSpecificInput - = new ReverseReplicationProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedReverseReplicationProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReverseReplicationProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RpInMageRecoveryPointType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RpInMageRecoveryPointType.java deleted file mode 100644 index 07ac786eac8a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RpInMageRecoveryPointType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The recovery point type. - */ -public final class RpInMageRecoveryPointType extends ExpandableStringEnum { - /** - * Static value LatestTime for RpInMageRecoveryPointType. - */ - public static final RpInMageRecoveryPointType LATEST_TIME = fromString("LatestTime"); - - /** - * Static value LatestTag for RpInMageRecoveryPointType. - */ - public static final RpInMageRecoveryPointType LATEST_TAG = fromString("LatestTag"); - - /** - * Static value Custom for RpInMageRecoveryPointType. - */ - public static final RpInMageRecoveryPointType CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of RpInMageRecoveryPointType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RpInMageRecoveryPointType() { - } - - /** - * Creates or finds a RpInMageRecoveryPointType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RpInMageRecoveryPointType. - */ - public static RpInMageRecoveryPointType fromString(String name) { - return fromString(name, RpInMageRecoveryPointType.class); - } - - /** - * Gets known RpInMageRecoveryPointType values. - * - * @return known RpInMageRecoveryPointType values. - */ - public static Collection values() { - return values(RpInMageRecoveryPointType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RunAsAccount.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RunAsAccount.java deleted file mode 100644 index 8d15e3334dc1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/RunAsAccount.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * CS Accounts Details. - */ -@Fluent -public final class RunAsAccount implements JsonSerializable { - /* - * The CS RunAs account Id. - */ - private String accountId; - - /* - * The CS RunAs account name. - */ - private String accountName; - - /** - * Creates an instance of RunAsAccount class. - */ - public RunAsAccount() { - } - - /** - * Get the accountId property: The CS RunAs account Id. - * - * @return the accountId value. - */ - public String accountId() { - return this.accountId; - } - - /** - * Set the accountId property: 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 accountName property: The CS RunAs account name. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Set the accountName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("accountId", this.accountId); - jsonWriter.writeStringField("accountName", this.accountName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RunAsAccount from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RunAsAccount if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RunAsAccount. - */ - public static RunAsAccount fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RunAsAccount deserializedRunAsAccount = new RunAsAccount(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("accountId".equals(fieldName)) { - deserializedRunAsAccount.accountId = reader.getString(); - } else if ("accountName".equals(fieldName)) { - deserializedRunAsAccount.accountName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRunAsAccount; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ScriptActionTaskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ScriptActionTaskDetails.java deleted file mode 100644 index ef842b488ea6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ScriptActionTaskDetails.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * This class represents the script action task details. - */ -@Fluent -public final class ScriptActionTaskDetails extends TaskTypeDetails { - /* - * The type of task details. - */ - private String instanceType = "ScriptActionTaskDetails"; - - /* - * The name. - */ - private String name; - - /* - * The path. - */ - private String path; - - /* - * The output. - */ - private String output; - - /* - * A value indicating whether it is a primary side script or not. - */ - private Boolean isPrimarySideScript; - - /** - * Creates an instance of ScriptActionTaskDetails class. - */ - public ScriptActionTaskDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the name property: The name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 property: The path. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: 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 property: The output. - * - * @return the output value. - */ - public String output() { - return this.output; - } - - /** - * Set the output property: 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 the isPrimarySideScript property: A value indicating whether it is a primary side script or not. - * - * @return the isPrimarySideScript value. - */ - public Boolean isPrimarySideScript() { - return this.isPrimarySideScript; - } - - /** - * Set the isPrimarySideScript property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("path", this.path); - jsonWriter.writeStringField("output", this.output); - jsonWriter.writeBooleanField("isPrimarySideScript", this.isPrimarySideScript); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScriptActionTaskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScriptActionTaskDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ScriptActionTaskDetails. - */ - public static ScriptActionTaskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScriptActionTaskDetails deserializedScriptActionTaskDetails = new ScriptActionTaskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedScriptActionTaskDetails.instanceType = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedScriptActionTaskDetails.name = reader.getString(); - } else if ("path".equals(fieldName)) { - deserializedScriptActionTaskDetails.path = reader.getString(); - } else if ("output".equals(fieldName)) { - deserializedScriptActionTaskDetails.output = reader.getString(); - } else if ("isPrimarySideScript".equals(fieldName)) { - deserializedScriptActionTaskDetails.isPrimarySideScript - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedScriptActionTaskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SecurityType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SecurityType.java deleted file mode 100644 index 9fd86f09d72a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SecurityType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The target VM security type. - */ -public final class SecurityType extends ExpandableStringEnum { - /** - * Static value None for SecurityType. - */ - public static final SecurityType NONE = fromString("None"); - - /** - * Static value TrustedLaunch for SecurityType. - */ - public static final SecurityType TRUSTED_LAUNCH = fromString("TrustedLaunch"); - - /** - * Static value ConfidentialVM for SecurityType. - */ - public static final SecurityType CONFIDENTIAL_VM = fromString("ConfidentialVM"); - - /** - * Creates a new instance of SecurityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SecurityType() { - } - - /** - * Creates or finds a SecurityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SecurityType. - */ - public static SecurityType fromString(String name) { - return fromString(name, SecurityType.class); - } - - /** - * Gets known SecurityType values. - * - * @return known SecurityType values. - */ - public static Collection values() { - return values(SecurityType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ServiceError.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ServiceError.java deleted file mode 100644 index dd96d7365b88..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/ServiceError.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * ASR error model. - */ -@Fluent -public final class ServiceError implements JsonSerializable { - /* - * Error code. - */ - private String code; - - /* - * Error message. - */ - private String message; - - /* - * Possible causes of error. - */ - private String possibleCauses; - - /* - * Recommended action to resolve error. - */ - private String recommendedAction; - - /* - * Activity Id. - */ - private String activityId; - - /** - * Creates an instance of ServiceError class. - */ - public ServiceError() { - } - - /** - * Get the code property: Error code. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Set the code property: 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 the message property: Error message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: 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 the possibleCauses property: Possible causes of error. - * - * @return the possibleCauses value. - */ - public String possibleCauses() { - return this.possibleCauses; - } - - /** - * Set the possibleCauses property: 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 the recommendedAction property: Recommended action to resolve error. - * - * @return the recommendedAction value. - */ - public String recommendedAction() { - return this.recommendedAction; - } - - /** - * Set the recommendedAction property: 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 the activityId property: Activity Id. - * - * @return the activityId value. - */ - public String activityId() { - return this.activityId; - } - - /** - * Set the activityId property: Activity Id. - * - * @param activityId the activityId value to set. - * @return the ServiceError object itself. - */ - public ServiceError withActivityId(String activityId) { - this.activityId = activityId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("code", this.code); - jsonWriter.writeStringField("message", this.message); - jsonWriter.writeStringField("possibleCauses", this.possibleCauses); - jsonWriter.writeStringField("recommendedAction", this.recommendedAction); - jsonWriter.writeStringField("activityId", this.activityId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServiceError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServiceError if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ServiceError. - */ - public static ServiceError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServiceError deserializedServiceError = new ServiceError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedServiceError.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedServiceError.message = reader.getString(); - } else if ("possibleCauses".equals(fieldName)) { - deserializedServiceError.possibleCauses = reader.getString(); - } else if ("recommendedAction".equals(fieldName)) { - deserializedServiceError.recommendedAction = reader.getString(); - } else if ("activityId".equals(fieldName)) { - deserializedServiceError.activityId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedServiceError; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SetMultiVmSyncStatus.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SetMultiVmSyncStatus.java deleted file mode 100644 index 907d6a6cbc3f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SetMultiVmSyncStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. - */ -public final class SetMultiVmSyncStatus extends ExpandableStringEnum { - /** - * Static value Enable for SetMultiVmSyncStatus. - */ - public static final SetMultiVmSyncStatus ENABLE = fromString("Enable"); - - /** - * Static value Disable for SetMultiVmSyncStatus. - */ - public static final SetMultiVmSyncStatus DISABLE = fromString("Disable"); - - /** - * Creates a new instance of SetMultiVmSyncStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SetMultiVmSyncStatus() { - } - - /** - * Creates or finds a SetMultiVmSyncStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding SetMultiVmSyncStatus. - */ - public static SetMultiVmSyncStatus fromString(String name) { - return fromString(name, SetMultiVmSyncStatus.class); - } - - /** - * Gets known SetMultiVmSyncStatus values. - * - * @return known SetMultiVmSyncStatus values. - */ - public static Collection values() { - return values(SetMultiVmSyncStatus.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Severity.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Severity.java deleted file mode 100644 index 955c6e5ac559..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Severity.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Severity of error. - */ -public final class Severity extends ExpandableStringEnum { - /** - * Static value NONE for Severity. - */ - public static final Severity NONE = fromString("NONE"); - - /** - * Static value Warning for Severity. - */ - public static final Severity WARNING = fromString("Warning"); - - /** - * Static value Error for Severity. - */ - public static final Severity ERROR = fromString("Error"); - - /** - * Static value Info for Severity. - */ - public static final Severity INFO = fromString("Info"); - - /** - * Creates a new instance of Severity value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Severity() { - } - - /** - * Creates or finds a Severity from its string representation. - * - * @param name a name to look for. - * @return the corresponding Severity. - */ - public static Severity fromString(String name) { - return fromString(name, Severity.class); - } - - /** - * Gets known Severity values. - * - * @return known Severity values. - */ - public static Collection values() { - return values(Severity.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SourceSiteOperations.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SourceSiteOperations.java deleted file mode 100644 index 98c3f00d12af..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SourceSiteOperations.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether source site operations are required. - */ -public final class SourceSiteOperations extends ExpandableStringEnum { - /** - * Static value Required for SourceSiteOperations. - */ - public static final SourceSiteOperations REQUIRED = fromString("Required"); - - /** - * Static value NotRequired for SourceSiteOperations. - */ - public static final SourceSiteOperations NOT_REQUIRED = fromString("NotRequired"); - - /** - * Creates a new instance of SourceSiteOperations value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SourceSiteOperations() { - } - - /** - * Creates or finds a SourceSiteOperations from its string representation. - * - * @param name a name to look for. - * @return the corresponding SourceSiteOperations. - */ - public static SourceSiteOperations fromString(String name) { - return fromString(name, SourceSiteOperations.class); - } - - /** - * Gets known SourceSiteOperations values. - * - * @return known SourceSiteOperations values. - */ - public static Collection values() { - return values(SourceSiteOperations.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SqlServerLicenseType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SqlServerLicenseType.java deleted file mode 100644 index dd18566974aa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SqlServerLicenseType.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The SQL Server license type. - */ -public final class SqlServerLicenseType extends ExpandableStringEnum { - /** - * Static value NotSpecified for SqlServerLicenseType. - */ - public static final SqlServerLicenseType NOT_SPECIFIED = fromString("NotSpecified"); - - /** - * Static value NoLicenseType for SqlServerLicenseType. - */ - public static final SqlServerLicenseType NO_LICENSE_TYPE = fromString("NoLicenseType"); - - /** - * Static value PAYG for SqlServerLicenseType. - */ - public static final SqlServerLicenseType PAYG = fromString("PAYG"); - - /** - * Static value AHUB for SqlServerLicenseType. - */ - public static final SqlServerLicenseType AHUB = fromString("AHUB"); - - /** - * Creates a new instance of SqlServerLicenseType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SqlServerLicenseType() { - } - - /** - * Creates or finds a SqlServerLicenseType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SqlServerLicenseType. - */ - public static SqlServerLicenseType fromString(String name) { - return fromString(name, SqlServerLicenseType.class); - } - - /** - * Gets known SqlServerLicenseType values. - * - * @return known SqlServerLicenseType values. - */ - public static Collection values() { - return values(SqlServerLicenseType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageAccountCustomDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageAccountCustomDetails.java deleted file mode 100644 index 85e34f112ea3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageAccountCustomDetails.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Storage account custom input. - */ -@Immutable -public class StorageAccountCustomDetails implements JsonSerializable { - /* - * The class type. - */ - private String resourceType = "StorageAccountCustomDetails"; - - /** - * Creates an instance of StorageAccountCustomDetails class. - */ - public StorageAccountCustomDetails() { - } - - /** - * Get the resourceType property: The class type. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceType", this.resourceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageAccountCustomDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageAccountCustomDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the StorageAccountCustomDetails. - */ - public static StorageAccountCustomDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("resourceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Existing".equals(discriminatorValue)) { - return ExistingStorageAccount.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static StorageAccountCustomDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageAccountCustomDetails deserializedStorageAccountCustomDetails = new StorageAccountCustomDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceType".equals(fieldName)) { - deserializedStorageAccountCustomDetails.resourceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageAccountCustomDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassification.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassification.java deleted file mode 100644 index 6dc0d84fcf0d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassification.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationInner; - -/** - * An immutable client-side representation of StorageClassification. - */ -public interface StorageClassification { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Properties of the storage object. - * - * @return the properties value. - */ - StorageClassificationProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationInner - * object. - * - * @return the inner object. - */ - StorageClassificationInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationCollection.java deleted file mode 100644 index c441e16d5dd4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationCollection.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of storage details. - */ -@Fluent -public final class StorageClassificationCollection implements JsonSerializable { - /* - * The storage details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of StorageClassificationCollection class. - */ - public StorageClassificationCollection() { - } - - /** - * Get the value property: The storage details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The storage details. - * - * @param value the value value to set. - * @return the StorageClassificationCollection object itself. - */ - public StorageClassificationCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the StorageClassificationCollection object itself. - */ - public StorageClassificationCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageClassificationCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageClassificationCollection if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the StorageClassificationCollection. - */ - public static StorageClassificationCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageClassificationCollection deserializedStorageClassificationCollection - = new StorageClassificationCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> StorageClassificationInner.fromJson(reader1)); - deserializedStorageClassificationCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedStorageClassificationCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageClassificationCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMapping.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMapping.java deleted file mode 100644 index c08b91af71a3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMapping.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationMappingInner; - -/** - * An immutable client-side representation of StorageClassificationMapping. - */ -public interface StorageClassificationMapping { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Properties of the storage mapping object. - * - * @return the properties value. - */ - StorageClassificationMappingProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner - * com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationMappingInner object. - * - * @return the inner object. - */ - StorageClassificationMappingInner innerModel(); - - /** - * The entirety of the StorageClassificationMapping definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The StorageClassificationMapping definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the StorageClassificationMapping definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the StorageClassificationMapping definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName, fabricName, storageClassificationName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @return the next definition stage. - */ - WithCreate withExistingReplicationStorageClassification(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName); - } - - /** - * The stage of the StorageClassificationMapping definition which contains all the minimum required properties - * for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - StorageClassificationMapping create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - StorageClassificationMapping create(Context context); - } - - /** - * The stage of the StorageClassificationMapping definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Storage mapping input properties.. - * - * @param properties Storage mapping input properties. - * @return the next definition stage. - */ - WithCreate withProperties(StorageMappingInputProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - StorageClassificationMapping refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - StorageClassificationMapping refresh(Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMappingCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMappingCollection.java deleted file mode 100644 index e3f462452d3a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMappingCollection.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationMappingInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of storage mapping details. - */ -@Fluent -public final class StorageClassificationMappingCollection - implements JsonSerializable { - /* - * The storage details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of StorageClassificationMappingCollection class. - */ - public StorageClassificationMappingCollection() { - } - - /** - * Get the value property: The storage details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The storage details. - * - * @param value the value value to set. - * @return the StorageClassificationMappingCollection object itself. - */ - public StorageClassificationMappingCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the StorageClassificationMappingCollection object itself. - */ - public StorageClassificationMappingCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageClassificationMappingCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageClassificationMappingCollection if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the StorageClassificationMappingCollection. - */ - public static StorageClassificationMappingCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageClassificationMappingCollection deserializedStorageClassificationMappingCollection - = new StorageClassificationMappingCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> StorageClassificationMappingInner.fromJson(reader1)); - deserializedStorageClassificationMappingCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedStorageClassificationMappingCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageClassificationMappingCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMappingInput.java deleted file mode 100644 index 1bc97af128da..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMappingInput.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Storage mapping input. - */ -@Fluent -public final class StorageClassificationMappingInput implements JsonSerializable { - /* - * Storage mapping input properties. - */ - private StorageMappingInputProperties properties; - - /** - * Creates an instance of StorageClassificationMappingInput class. - */ - public StorageClassificationMappingInput() { - } - - /** - * Get the properties property: Storage mapping input properties. - * - * @return the properties value. - */ - public StorageMappingInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageClassificationMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageClassificationMappingInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the StorageClassificationMappingInput. - */ - public static StorageClassificationMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageClassificationMappingInput deserializedStorageClassificationMappingInput - = new StorageClassificationMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedStorageClassificationMappingInput.properties - = StorageMappingInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageClassificationMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMappingProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMappingProperties.java deleted file mode 100644 index 1990f4d9d086..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMappingProperties.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Storage mapping properties. - */ -@Fluent -public final class StorageClassificationMappingProperties - implements JsonSerializable { - /* - * Target storage object Id. - */ - private String targetStorageClassificationId; - - /** - * Creates an instance of StorageClassificationMappingProperties class. - */ - public StorageClassificationMappingProperties() { - } - - /** - * Get the targetStorageClassificationId property: Target storage object Id. - * - * @return the targetStorageClassificationId value. - */ - public String targetStorageClassificationId() { - return this.targetStorageClassificationId; - } - - /** - * Set the targetStorageClassificationId property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetStorageClassificationId", this.targetStorageClassificationId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageClassificationMappingProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageClassificationMappingProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the StorageClassificationMappingProperties. - */ - public static StorageClassificationMappingProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageClassificationMappingProperties deserializedStorageClassificationMappingProperties - = new StorageClassificationMappingProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetStorageClassificationId".equals(fieldName)) { - deserializedStorageClassificationMappingProperties.targetStorageClassificationId - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageClassificationMappingProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMappings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMappings.java deleted file mode 100644 index 9a0fd4cd0b25..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationMappings.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of StorageClassificationMappings. - */ -public interface StorageClassificationMappings { - /** - * Gets the list of storage classification mappings objects under a storage. - * - * Lists the storage classification mappings for the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationStorageClassifications(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName); - - /** - * Gets the list of storage classification mappings objects under a storage. - * - * Lists the storage classification mappings for the fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationStorageClassifications(String resourceName, - String resourceGroupName, String fabricName, String storageClassificationName, Context context); - - /** - * Gets the details of a storage classification mapping. - * - * Gets the details of the specified storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification mapping along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, - String fabricName, String storageClassificationName, String storageClassificationMappingName, Context context); - - /** - * Gets the details of a storage classification mapping. - * - * Gets the details of the specified storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification mapping. - */ - StorageClassificationMapping get(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, String storageClassificationMappingName); - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String storageClassificationName, - String storageClassificationMappingName); - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param storageClassificationMappingName Storage classification mapping name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceName, String resourceGroupName, String fabricName, String storageClassificationName, - String storageClassificationMappingName, Context context); - - /** - * Gets the list of storage classification mappings objects under a vault. - * - * Lists the storage classification mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of storage classification mappings objects under a vault. - * - * Lists the storage classification mappings in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage mapping details as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); - - /** - * Gets the details of a storage classification mapping. - * - * Gets the details of the specified storage classification mapping. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification mapping along with {@link Response}. - */ - StorageClassificationMapping getById(String id); - - /** - * Gets the details of a storage classification mapping. - * - * Gets the details of the specified storage classification mapping. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification mapping along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a storage classification mapping. - * - * The operation to delete a storage classification mapping. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new StorageClassificationMapping resource. - * - * @param name resource name. - * @return the first stage of the new StorageClassificationMapping definition. - */ - StorageClassificationMapping.DefinitionStages.Blank define(String name); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationProperties.java deleted file mode 100644 index 56967a666fcc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassificationProperties.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Storage object properties. - */ -@Fluent -public final class StorageClassificationProperties implements JsonSerializable { - /* - * Friendly name of the Storage classification. - */ - private String friendlyName; - - /** - * Creates an instance of StorageClassificationProperties class. - */ - public StorageClassificationProperties() { - } - - /** - * Get the friendlyName property: Friendly name of the Storage classification. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageClassificationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageClassificationProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the StorageClassificationProperties. - */ - public static StorageClassificationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageClassificationProperties deserializedStorageClassificationProperties - = new StorageClassificationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedStorageClassificationProperties.friendlyName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageClassificationProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassifications.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassifications.java deleted file mode 100644 index 03908cda3dea..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageClassifications.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of StorageClassifications. - */ -public interface StorageClassifications { - /** - * Gets the list of storage classification objects under a fabric. - * - * Lists the storage classifications available in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Site name of interest. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName); - - /** - * Gets the list of storage classification objects under a fabric. - * - * Lists the storage classifications available in the specified fabric. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Site name of interest. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationFabrics(String resourceName, String resourceGroupName, - String fabricName, Context context); - - /** - * Gets the details of a storage classification. - * - * Gets the details of the specified storage classification. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName, Context context); - - /** - * Gets the details of a storage classification. - * - * Gets the details of the specified storage classification. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param storageClassificationName Storage classification name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified storage classification. - */ - StorageClassification get(String resourceName, String resourceGroupName, String fabricName, - String storageClassificationName); - - /** - * Gets the list of storage classification objects under a vault. - * - * Lists the storage classifications in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName); - - /** - * Gets the list of storage classification objects under a vault. - * - * Lists the storage classifications in the vault. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of storage details as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageMappingInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageMappingInputProperties.java deleted file mode 100644 index 8fc08f857fec..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/StorageMappingInputProperties.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Storage mapping input properties. - */ -@Fluent -public final class StorageMappingInputProperties implements JsonSerializable { - /* - * The ID of the storage object. - */ - private String targetStorageClassificationId; - - /** - * Creates an instance of StorageMappingInputProperties class. - */ - public StorageMappingInputProperties() { - } - - /** - * Get the targetStorageClassificationId property: The ID of the storage object. - * - * @return the targetStorageClassificationId value. - */ - public String targetStorageClassificationId() { - return this.targetStorageClassificationId; - } - - /** - * Set the targetStorageClassificationId property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetStorageClassificationId", this.targetStorageClassificationId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageMappingInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageMappingInputProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the StorageMappingInputProperties. - */ - public static StorageMappingInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageMappingInputProperties deserializedStorageMappingInputProperties - = new StorageMappingInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetStorageClassificationId".equals(fieldName)) { - deserializedStorageMappingInputProperties.targetStorageClassificationId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageMappingInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Subnet.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Subnet.java deleted file mode 100644 index 0439b394df8f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/Subnet.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Subnets of the network. - */ -@Fluent -public final class Subnet implements JsonSerializable { - /* - * The subnet name. - */ - private String name; - - /* - * The subnet friendly name. - */ - private String friendlyName; - - /* - * The list of addresses for the subnet. - */ - private List addressList; - - /** - * Creates an instance of Subnet class. - */ - public Subnet() { - } - - /** - * Get the name property: The subnet name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 friendlyName property: The subnet friendly name. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 addressList property: The list of addresses for the subnet. - * - * @return the addressList value. - */ - public List addressList() { - return this.addressList; - } - - /** - * Set the addressList property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeArrayField("addressList", this.addressList, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Subnet from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Subnet if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Subnet. - */ - public static Subnet fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Subnet deserializedSubnet = new Subnet(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedSubnet.name = reader.getString(); - } else if ("friendlyName".equals(fieldName)) { - deserializedSubnet.friendlyName = reader.getString(); - } else if ("addressList".equals(fieldName)) { - List addressList = reader.readArray(reader1 -> reader1.getString()); - deserializedSubnet.addressList = addressList; - } else { - reader.skipChildren(); - } - } - - return deserializedSubnet; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOSDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOSDetails.java deleted file mode 100644 index 4ad9a0d40821..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOSDetails.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Supported operating system details. - */ -@Fluent -public final class SupportedOSDetails implements JsonSerializable { - /* - * The name. - */ - private String osName; - - /* - * The type. - */ - private String osType; - - /* - * The list of version for operating system. - */ - private List osVersions; - - /** - * Creates an instance of SupportedOSDetails class. - */ - public SupportedOSDetails() { - } - - /** - * Get the osName property: The name. - * - * @return the osName value. - */ - public String osName() { - return this.osName; - } - - /** - * Set the osName property: The name. - * - * @param osName the osName value to set. - * @return the SupportedOSDetails object itself. - */ - public SupportedOSDetails withOsName(String osName) { - this.osName = osName; - return this; - } - - /** - * Get the osType property: The type. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: The type. - * - * @param osType the osType value to set. - * @return the SupportedOSDetails object itself. - */ - public SupportedOSDetails withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Get the osVersions property: The list of version for operating system. - * - * @return the osVersions value. - */ - public List osVersions() { - return this.osVersions; - } - - /** - * Set the osVersions property: The list of version for operating system. - * - * @param osVersions the osVersions value to set. - * @return the SupportedOSDetails object itself. - */ - public SupportedOSDetails withOsVersions(List osVersions) { - this.osVersions = osVersions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (osVersions() != null) { - osVersions().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("osName", this.osName); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeArrayField("osVersions", this.osVersions, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SupportedOSDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SupportedOSDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SupportedOSDetails. - */ - public static SupportedOSDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SupportedOSDetails deserializedSupportedOSDetails = new SupportedOSDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("osName".equals(fieldName)) { - deserializedSupportedOSDetails.osName = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedSupportedOSDetails.osType = reader.getString(); - } else if ("osVersions".equals(fieldName)) { - List osVersions = reader.readArray(reader1 -> OSVersionWrapper.fromJson(reader1)); - deserializedSupportedOSDetails.osVersions = osVersions; - } else { - reader.skipChildren(); - } - } - - return deserializedSupportedOSDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOSProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOSProperties.java deleted file mode 100644 index 66db9d48822a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOSProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Supported operating systems properties. - */ -@Fluent -public final class SupportedOSProperties implements JsonSerializable { - /* - * The supported operating systems property list. - */ - private List supportedOsList; - - /** - * Creates an instance of SupportedOSProperties class. - */ - public SupportedOSProperties() { - } - - /** - * Get the supportedOsList property: The supported operating systems property list. - * - * @return the supportedOsList value. - */ - public List supportedOsList() { - return this.supportedOsList; - } - - /** - * Set the supportedOsList property: The supported operating systems property list. - * - * @param supportedOsList the supportedOsList value to set. - * @return the SupportedOSProperties object itself. - */ - public SupportedOSProperties withSupportedOsList(List supportedOsList) { - this.supportedOsList = supportedOsList; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (supportedOsList() != null) { - supportedOsList().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("supportedOsList", this.supportedOsList, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SupportedOSProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SupportedOSProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the SupportedOSProperties. - */ - public static SupportedOSProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SupportedOSProperties deserializedSupportedOSProperties = new SupportedOSProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("supportedOsList".equals(fieldName)) { - List supportedOsList - = reader.readArray(reader1 -> SupportedOSProperty.fromJson(reader1)); - deserializedSupportedOSProperties.supportedOsList = supportedOsList; - } else { - reader.skipChildren(); - } - } - - return deserializedSupportedOSProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOSProperty.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOSProperty.java deleted file mode 100644 index 05c964be8fec..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOSProperty.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Supported operating systems property. - */ -@Fluent -public final class SupportedOSProperty implements JsonSerializable { - /* - * The replication provider type. - */ - private String instanceType; - - /* - * The list of supported operating systems. - */ - private List supportedOs; - - /** - * Creates an instance of SupportedOSProperty class. - */ - public SupportedOSProperty() { - } - - /** - * Get the instanceType property: The replication provider type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Set the instanceType property: The replication provider type. - * - * @param instanceType the instanceType value to set. - * @return the SupportedOSProperty object itself. - */ - public SupportedOSProperty withInstanceType(String instanceType) { - this.instanceType = instanceType; - return this; - } - - /** - * Get the supportedOs property: The list of supported operating systems. - * - * @return the supportedOs value. - */ - public List supportedOs() { - return this.supportedOs; - } - - /** - * Set the supportedOs property: The list of supported operating systems. - * - * @param supportedOs the supportedOs value to set. - * @return the SupportedOSProperty object itself. - */ - public SupportedOSProperty withSupportedOs(List supportedOs) { - this.supportedOs = supportedOs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (supportedOs() != null) { - supportedOs().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("supportedOs", this.supportedOs, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SupportedOSProperty from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SupportedOSProperty if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SupportedOSProperty. - */ - public static SupportedOSProperty fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SupportedOSProperty deserializedSupportedOSProperty = new SupportedOSProperty(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedSupportedOSProperty.instanceType = reader.getString(); - } else if ("supportedOs".equals(fieldName)) { - List supportedOs - = reader.readArray(reader1 -> SupportedOSDetails.fromJson(reader1)); - deserializedSupportedOSProperty.supportedOs = supportedOs; - } else { - reader.skipChildren(); - } - } - - return deserializedSupportedOSProperty; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOperatingSystems.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOperatingSystems.java deleted file mode 100644 index afe84193e0d4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOperatingSystems.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.SupportedOperatingSystemsInner; - -/** - * An immutable client-side representation of SupportedOperatingSystems. - */ -public interface SupportedOperatingSystems { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The supported operating systems properties. - * - * @return the properties value. - */ - SupportedOSProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the inner - * com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.SupportedOperatingSystemsInner object. - * - * @return the inner object. - */ - SupportedOperatingSystemsInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOperatingSystemsOperations.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOperatingSystemsOperations.java deleted file mode 100644 index 26c3c7b0ee35..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SupportedOperatingSystemsOperations.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of SupportedOperatingSystemsOperations. - */ -public interface SupportedOperatingSystemsOperations { - /** - * Gets the data of supported operating systems by SRS. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param instanceType The instance type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the data of supported operating systems by SRS along with {@link Response}. - */ - Response getWithResponse(String resourceName, String resourceGroupName, - String instanceType, Context context); - - /** - * Gets the data of supported operating systems by SRS. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the data of supported operating systems by SRS. - */ - SupportedOperatingSystems get(String resourceName, String resourceGroupName); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProtectionInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProtectionInput.java deleted file mode 100644 index f2054c9637a6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProtectionInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Switch protection input. - */ -@Fluent -public final class SwitchProtectionInput implements JsonSerializable { - /* - * Switch protection properties. - */ - private SwitchProtectionInputProperties properties; - - /** - * Creates an instance of SwitchProtectionInput class. - */ - public SwitchProtectionInput() { - } - - /** - * Get the properties property: Switch protection properties. - * - * @return the properties value. - */ - public SwitchProtectionInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SwitchProtectionInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SwitchProtectionInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the SwitchProtectionInput. - */ - public static SwitchProtectionInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SwitchProtectionInput deserializedSwitchProtectionInput = new SwitchProtectionInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedSwitchProtectionInput.properties = SwitchProtectionInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSwitchProtectionInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProtectionInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProtectionInputProperties.java deleted file mode 100644 index 266075c1ba2c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProtectionInputProperties.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Switch protection input properties. - */ -@Fluent -public final class SwitchProtectionInputProperties implements JsonSerializable { - /* - * The unique replication protected item name. - */ - private String replicationProtectedItemName; - - /* - * Provider specific switch protection input. - */ - private SwitchProtectionProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of SwitchProtectionInputProperties class. - */ - public SwitchProtectionInputProperties() { - } - - /** - * Get the replicationProtectedItemName property: The unique replication protected item name. - * - * @return the replicationProtectedItemName value. - */ - public String replicationProtectedItemName() { - return this.replicationProtectedItemName; - } - - /** - * Set the replicationProtectedItemName property: 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 the providerSpecificDetails property: Provider specific switch protection input. - * - * @return the providerSpecificDetails value. - */ - public SwitchProtectionProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("replicationProtectedItemName", this.replicationProtectedItemName); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SwitchProtectionInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SwitchProtectionInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SwitchProtectionInputProperties. - */ - public static SwitchProtectionInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SwitchProtectionInputProperties deserializedSwitchProtectionInputProperties - = new SwitchProtectionInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("replicationProtectedItemName".equals(fieldName)) { - deserializedSwitchProtectionInputProperties.replicationProtectedItemName = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedSwitchProtectionInputProperties.providerSpecificDetails - = SwitchProtectionProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSwitchProtectionInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProtectionJobDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProtectionJobDetails.java deleted file mode 100644 index c413983cfed9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProtectionJobDetails.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * This class represents details for switch protection job. - */ -@Fluent -public final class SwitchProtectionJobDetails extends JobDetails { - /* - * Gets the type of job details (see JobDetailsTypes enum for possible values). - */ - private String instanceType = "SwitchProtectionJobDetails"; - - /* - * ARM Id of the new replication protected item. - */ - private String newReplicationProtectedItemId; - - /** - * Creates an instance of SwitchProtectionJobDetails class. - */ - public SwitchProtectionJobDetails() { - } - - /** - * Get the instanceType property: Gets the type of job details (see JobDetailsTypes enum for possible values). - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the newReplicationProtectedItemId property: ARM Id of the new replication protected item. - * - * @return the newReplicationProtectedItemId value. - */ - public String newReplicationProtectedItemId() { - return this.newReplicationProtectedItemId; - } - - /** - * Set the newReplicationProtectedItemId property: 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; - } - - /** - * {@inheritDoc} - */ - @Override - public SwitchProtectionJobDetails withAffectedObjectDetails(Map affectedObjectDetails) { - super.withAffectedObjectDetails(affectedObjectDetails); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("affectedObjectDetails", affectedObjectDetails(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("newReplicationProtectedItemId", this.newReplicationProtectedItemId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SwitchProtectionJobDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SwitchProtectionJobDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SwitchProtectionJobDetails. - */ - public static SwitchProtectionJobDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SwitchProtectionJobDetails deserializedSwitchProtectionJobDetails = new SwitchProtectionJobDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("affectedObjectDetails".equals(fieldName)) { - Map affectedObjectDetails = reader.readMap(reader1 -> reader1.getString()); - deserializedSwitchProtectionJobDetails.withAffectedObjectDetails(affectedObjectDetails); - } else if ("instanceType".equals(fieldName)) { - deserializedSwitchProtectionJobDetails.instanceType = reader.getString(); - } else if ("newReplicationProtectedItemId".equals(fieldName)) { - deserializedSwitchProtectionJobDetails.newReplicationProtectedItemId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSwitchProtectionJobDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProtectionProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProtectionProviderSpecificInput.java deleted file mode 100644 index 370ae6715509..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProtectionProviderSpecificInput.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific switch protection input. - */ -@Immutable -public class SwitchProtectionProviderSpecificInput implements JsonSerializable { - /* - * Gets the Instance type. - */ - private String instanceType = "SwitchProtectionProviderSpecificInput"; - - /** - * Creates an instance of SwitchProtectionProviderSpecificInput class. - */ - public SwitchProtectionProviderSpecificInput() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SwitchProtectionProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SwitchProtectionProviderSpecificInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SwitchProtectionProviderSpecificInput. - */ - public static SwitchProtectionProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2ASwitchProtectionInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static SwitchProtectionProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SwitchProtectionProviderSpecificInput deserializedSwitchProtectionProviderSpecificInput - = new SwitchProtectionProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedSwitchProtectionProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSwitchProtectionProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProviderInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProviderInput.java deleted file mode 100644 index b22d52e86df4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProviderInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input definition for switch provider. - */ -@Fluent -public final class SwitchProviderInput implements JsonSerializable { - /* - * Switch provider input properties. - */ - private SwitchProviderInputProperties properties; - - /** - * Creates an instance of SwitchProviderInput class. - */ - public SwitchProviderInput() { - } - - /** - * Get the properties property: Switch provider input properties. - * - * @return the properties value. - */ - public SwitchProviderInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Switch provider input properties. - * - * @param properties the properties value to set. - * @return the SwitchProviderInput object itself. - */ - public SwitchProviderInput withProperties(SwitchProviderInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SwitchProviderInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SwitchProviderInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SwitchProviderInput. - */ - public static SwitchProviderInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SwitchProviderInput deserializedSwitchProviderInput = new SwitchProviderInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedSwitchProviderInput.properties = SwitchProviderInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSwitchProviderInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProviderInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProviderInputProperties.java deleted file mode 100644 index 8c60da06b7bd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProviderInputProperties.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input definition for switch provider input properties. - */ -@Fluent -public final class SwitchProviderInputProperties implements JsonSerializable { - /* - * Target provider type. - */ - private String targetInstanceType; - - /* - * Provider specific settings. - */ - private SwitchProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of SwitchProviderInputProperties class. - */ - public SwitchProviderInputProperties() { - } - - /** - * Get the targetInstanceType property: Target provider type. - * - * @return the targetInstanceType value. - */ - public String targetInstanceType() { - return this.targetInstanceType; - } - - /** - * Set the targetInstanceType property: Target provider type. - * - * @param targetInstanceType the targetInstanceType value to set. - * @return the SwitchProviderInputProperties object itself. - */ - public SwitchProviderInputProperties withTargetInstanceType(String targetInstanceType) { - this.targetInstanceType = targetInstanceType; - return this; - } - - /** - * Get the providerSpecificDetails property: Provider specific settings. - * - * @return the providerSpecificDetails value. - */ - public SwitchProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: Provider specific settings. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the SwitchProviderInputProperties object itself. - */ - public SwitchProviderInputProperties - withProviderSpecificDetails(SwitchProviderSpecificInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetInstanceType", this.targetInstanceType); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SwitchProviderInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SwitchProviderInputProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SwitchProviderInputProperties. - */ - public static SwitchProviderInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SwitchProviderInputProperties deserializedSwitchProviderInputProperties - = new SwitchProviderInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetInstanceType".equals(fieldName)) { - deserializedSwitchProviderInputProperties.targetInstanceType = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedSwitchProviderInputProperties.providerSpecificDetails - = SwitchProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSwitchProviderInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProviderSpecificInput.java deleted file mode 100644 index 3c1e524bd1fd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/SwitchProviderSpecificInput.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific switch provider input. - */ -@Immutable -public class SwitchProviderSpecificInput implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "SwitchProviderSpecificInput"; - - /** - * Creates an instance of SwitchProviderSpecificInput class. - */ - public SwitchProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SwitchProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SwitchProviderSpecificInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SwitchProviderSpecificInput. - */ - public static SwitchProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("InMageAzureV2".equals(discriminatorValue)) { - return InMageAzureV2SwitchProviderInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static SwitchProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SwitchProviderSpecificInput deserializedSwitchProviderSpecificInput = new SwitchProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedSwitchProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSwitchProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TargetComputeSize.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TargetComputeSize.java deleted file mode 100644 index d883a6fe4d60..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TargetComputeSize.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.TargetComputeSizeInner; - -/** - * An immutable client-side representation of TargetComputeSize. - */ -public interface TargetComputeSize { - /** - * Gets the id property: The Id. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The Type of the object. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The custom data. - * - * @return the properties value. - */ - TargetComputeSizeProperties properties(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.TargetComputeSizeInner - * object. - * - * @return the inner object. - */ - TargetComputeSizeInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TargetComputeSizeCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TargetComputeSizeCollection.java deleted file mode 100644 index 9333b5a0b5b5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TargetComputeSizeCollection.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.TargetComputeSizeInner; -import java.io.IOException; -import java.util.List; - -/** - * Target compute size collection. - */ -@Fluent -public final class TargetComputeSizeCollection implements JsonSerializable { - /* - * The list of target compute sizes. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of TargetComputeSizeCollection class. - */ - public TargetComputeSizeCollection() { - } - - /** - * Get the value property: The list of target compute sizes. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of target compute sizes. - * - * @param value the value value to set. - * @return the TargetComputeSizeCollection object itself. - */ - public TargetComputeSizeCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the TargetComputeSizeCollection object itself. - */ - public TargetComputeSizeCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TargetComputeSizeCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TargetComputeSizeCollection if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TargetComputeSizeCollection. - */ - public static TargetComputeSizeCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TargetComputeSizeCollection deserializedTargetComputeSizeCollection = new TargetComputeSizeCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> TargetComputeSizeInner.fromJson(reader1)); - deserializedTargetComputeSizeCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedTargetComputeSizeCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTargetComputeSizeCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TargetComputeSizeProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TargetComputeSizeProperties.java deleted file mode 100644 index d0839b3be8f4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TargetComputeSizeProperties.java +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Represents applicable recovery vm sizes properties. - */ -@Fluent -public final class TargetComputeSizeProperties implements JsonSerializable { - /* - * Target compute size name. - */ - private String name; - - /* - * Target compute size display name. - */ - private String friendlyName; - - /* - * The maximum cpu cores count supported by target compute size. - */ - private Integer cpuCoresCount; - - /* - * The Available vCPUs supported by target compute size. - */ - private Integer vCpusAvailable; - - /* - * The maximum memory in GB supported by target compute size. - */ - private Double memoryInGB; - - /* - * The maximum data disks count supported by target compute size. - */ - private Integer maxDataDiskCount; - - /* - * The maximum Nics count supported by target compute size. - */ - private Integer maxNicsCount; - - /* - * The reasons why the target compute size is not applicable for the protected item. - */ - private List errors; - - /* - * The value indicating whether the target compute size supports high Iops. - */ - private String highIopsSupported; - - /* - * The supported HyperV Generations. - */ - private List hyperVGenerations; - - /** - * Creates an instance of TargetComputeSizeProperties class. - */ - public TargetComputeSizeProperties() { - } - - /** - * Get the name property: Target compute size name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Target compute size name. - * - * @param name the name value to set. - * @return the TargetComputeSizeProperties object itself. - */ - public TargetComputeSizeProperties withName(String name) { - this.name = name; - return this; - } - - /** - * Get the friendlyName property: Target compute size display name. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: Target compute size display name. - * - * @param friendlyName the friendlyName value to set. - * @return the TargetComputeSizeProperties object itself. - */ - public TargetComputeSizeProperties withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - /** - * Get the cpuCoresCount property: The maximum cpu cores count supported by target compute size. - * - * @return the cpuCoresCount value. - */ - public Integer cpuCoresCount() { - return this.cpuCoresCount; - } - - /** - * Set the cpuCoresCount property: The maximum cpu cores count supported by target compute size. - * - * @param cpuCoresCount the cpuCoresCount value to set. - * @return the TargetComputeSizeProperties object itself. - */ - public TargetComputeSizeProperties withCpuCoresCount(Integer cpuCoresCount) { - this.cpuCoresCount = cpuCoresCount; - return this; - } - - /** - * Get the vCpusAvailable property: The Available vCPUs supported by target compute size. - * - * @return the vCpusAvailable value. - */ - public Integer vCpusAvailable() { - return this.vCpusAvailable; - } - - /** - * Get the memoryInGB property: The maximum memory in GB supported by target compute size. - * - * @return the memoryInGB value. - */ - public Double memoryInGB() { - return this.memoryInGB; - } - - /** - * Set the memoryInGB property: The maximum memory in GB supported by target compute size. - * - * @param memoryInGB the memoryInGB value to set. - * @return the TargetComputeSizeProperties object itself. - */ - public TargetComputeSizeProperties withMemoryInGB(Double memoryInGB) { - this.memoryInGB = memoryInGB; - return this; - } - - /** - * Get the maxDataDiskCount property: The maximum data disks count supported by target compute size. - * - * @return the maxDataDiskCount value. - */ - public Integer maxDataDiskCount() { - return this.maxDataDiskCount; - } - - /** - * Set the maxDataDiskCount property: The maximum data disks count supported by target compute size. - * - * @param maxDataDiskCount the maxDataDiskCount value to set. - * @return the TargetComputeSizeProperties object itself. - */ - public TargetComputeSizeProperties withMaxDataDiskCount(Integer maxDataDiskCount) { - this.maxDataDiskCount = maxDataDiskCount; - return this; - } - - /** - * Get the maxNicsCount property: The maximum Nics count supported by target compute size. - * - * @return the maxNicsCount value. - */ - public Integer maxNicsCount() { - return this.maxNicsCount; - } - - /** - * Set the maxNicsCount property: The maximum Nics count supported by target compute size. - * - * @param maxNicsCount the maxNicsCount value to set. - * @return the TargetComputeSizeProperties object itself. - */ - public TargetComputeSizeProperties withMaxNicsCount(Integer maxNicsCount) { - this.maxNicsCount = maxNicsCount; - return this; - } - - /** - * Get the errors property: The reasons why the target compute size is not applicable for the protected item. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Set the errors property: The reasons why the target compute size is not applicable for the protected item. - * - * @param errors the errors value to set. - * @return the TargetComputeSizeProperties object itself. - */ - public TargetComputeSizeProperties withErrors(List errors) { - this.errors = errors; - return this; - } - - /** - * Get the highIopsSupported property: The value indicating whether the target compute size supports high Iops. - * - * @return the highIopsSupported value. - */ - public String highIopsSupported() { - return this.highIopsSupported; - } - - /** - * Set the highIopsSupported property: The value indicating whether the target compute size supports high Iops. - * - * @param highIopsSupported the highIopsSupported value to set. - * @return the TargetComputeSizeProperties object itself. - */ - public TargetComputeSizeProperties withHighIopsSupported(String highIopsSupported) { - this.highIopsSupported = highIopsSupported; - return this; - } - - /** - * Get the hyperVGenerations property: The supported HyperV Generations. - * - * @return the hyperVGenerations value. - */ - public List hyperVGenerations() { - return this.hyperVGenerations; - } - - /** - * Set the hyperVGenerations property: The supported HyperV Generations. - * - * @param hyperVGenerations the hyperVGenerations value to set. - * @return the TargetComputeSizeProperties object itself. - */ - public TargetComputeSizeProperties withHyperVGenerations(List hyperVGenerations) { - this.hyperVGenerations = hyperVGenerations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeNumberField("cpuCoresCount", this.cpuCoresCount); - jsonWriter.writeNumberField("memoryInGB", this.memoryInGB); - jsonWriter.writeNumberField("maxDataDiskCount", this.maxDataDiskCount); - jsonWriter.writeNumberField("maxNicsCount", this.maxNicsCount); - jsonWriter.writeArrayField("errors", this.errors, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("highIopsSupported", this.highIopsSupported); - jsonWriter.writeArrayField("hyperVGenerations", this.hyperVGenerations, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TargetComputeSizeProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TargetComputeSizeProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TargetComputeSizeProperties. - */ - public static TargetComputeSizeProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TargetComputeSizeProperties deserializedTargetComputeSizeProperties = new TargetComputeSizeProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedTargetComputeSizeProperties.name = reader.getString(); - } else if ("friendlyName".equals(fieldName)) { - deserializedTargetComputeSizeProperties.friendlyName = reader.getString(); - } else if ("cpuCoresCount".equals(fieldName)) { - deserializedTargetComputeSizeProperties.cpuCoresCount = reader.getNullable(JsonReader::getInt); - } else if ("vCPUsAvailable".equals(fieldName)) { - deserializedTargetComputeSizeProperties.vCpusAvailable = reader.getNullable(JsonReader::getInt); - } else if ("memoryInGB".equals(fieldName)) { - deserializedTargetComputeSizeProperties.memoryInGB = reader.getNullable(JsonReader::getDouble); - } else if ("maxDataDiskCount".equals(fieldName)) { - deserializedTargetComputeSizeProperties.maxDataDiskCount = reader.getNullable(JsonReader::getInt); - } else if ("maxNicsCount".equals(fieldName)) { - deserializedTargetComputeSizeProperties.maxNicsCount = reader.getNullable(JsonReader::getInt); - } else if ("errors".equals(fieldName)) { - List errors - = reader.readArray(reader1 -> ComputeSizeErrorDetails.fromJson(reader1)); - deserializedTargetComputeSizeProperties.errors = errors; - } else if ("highIopsSupported".equals(fieldName)) { - deserializedTargetComputeSizeProperties.highIopsSupported = reader.getString(); - } else if ("hyperVGenerations".equals(fieldName)) { - List hyperVGenerations = reader.readArray(reader1 -> reader1.getString()); - deserializedTargetComputeSizeProperties.hyperVGenerations = hyperVGenerations; - } else { - reader.skipChildren(); - } - } - - return deserializedTargetComputeSizeProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TargetComputeSizes.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TargetComputeSizes.java deleted file mode 100644 index ddbed4645507..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TargetComputeSizes.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of TargetComputeSizes. - */ -public interface TargetComputeSizes { - /** - * Gets the list of target compute sizes for the replication protected item. - * - * Lists the available target compute sizes for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return target compute size collection as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationProtectedItems(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName); - - /** - * Gets the list of target compute sizes for the replication protected item. - * - * Lists the available target compute sizes for a replication protected item. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @param protectionContainerName protection container name. - * @param replicatedProtectedItemName Replication protected item name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return target compute size collection as paginated response with {@link PagedIterable}. - */ - PagedIterable listByReplicationProtectedItems(String resourceName, String resourceGroupName, - String fabricName, String protectionContainerName, String replicatedProtectedItemName, Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TaskTypeDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TaskTypeDetails.java deleted file mode 100644 index 3cacb96fd18b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TaskTypeDetails.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Task details based on specific task type. - */ -@Immutable -public class TaskTypeDetails implements JsonSerializable { - /* - * The type of task details. - */ - private String instanceType = "TaskTypeDetails"; - - /** - * Creates an instance of TaskTypeDetails class. - */ - public TaskTypeDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TaskTypeDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TaskTypeDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TaskTypeDetails. - */ - public static TaskTypeDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AutomationRunbookTaskDetails".equals(discriminatorValue)) { - return AutomationRunbookTaskDetails.fromJson(readerToUse.reset()); - } else if ("ConsistencyCheckTaskDetails".equals(discriminatorValue)) { - return ConsistencyCheckTaskDetails.fromJson(readerToUse.reset()); - } else if ("JobTaskDetails".equals(discriminatorValue)) { - return JobTaskDetails.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("FabricReplicationGroupTaskDetails".equals(discriminatorValue)) { - return FabricReplicationGroupTaskDetails.fromJson(readerToUse.reset()); - } else if ("VirtualMachineTaskDetails".equals(discriminatorValue)) { - return VirtualMachineTaskDetails.fromJson(readerToUse.reset()); - } else if ("ManualActionTaskDetails".equals(discriminatorValue)) { - return ManualActionTaskDetails.fromJson(readerToUse.reset()); - } else if ("ScriptActionTaskDetails".equals(discriminatorValue)) { - return ScriptActionTaskDetails.fromJson(readerToUse.reset()); - } else if ("VmNicUpdatesTaskDetails".equals(discriminatorValue)) { - return VmNicUpdatesTaskDetails.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static TaskTypeDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TaskTypeDetails deserializedTaskTypeDetails = new TaskTypeDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedTaskTypeDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTaskTypeDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverCleanupInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverCleanupInput.java deleted file mode 100644 index c156ff632a1a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverCleanupInput.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input definition for test failover cleanup. - */ -@Fluent -public final class TestFailoverCleanupInput implements JsonSerializable { - /* - * Test failover cleanup input properties. - */ - private TestFailoverCleanupInputProperties properties; - - /** - * Creates an instance of TestFailoverCleanupInput class. - */ - public TestFailoverCleanupInput() { - } - - /** - * Get the properties property: Test failover cleanup input properties. - * - * @return the properties value. - */ - public TestFailoverCleanupInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model TestFailoverCleanupInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TestFailoverCleanupInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TestFailoverCleanupInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TestFailoverCleanupInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TestFailoverCleanupInput. - */ - public static TestFailoverCleanupInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TestFailoverCleanupInput deserializedTestFailoverCleanupInput = new TestFailoverCleanupInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedTestFailoverCleanupInput.properties - = TestFailoverCleanupInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTestFailoverCleanupInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverCleanupInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverCleanupInputProperties.java deleted file mode 100644 index 18c8913d4859..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverCleanupInputProperties.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input definition for test failover cleanup input properties. - */ -@Fluent -public final class TestFailoverCleanupInputProperties implements JsonSerializable { - /* - * Test failover cleanup comments. - */ - private String comments; - - /** - * Creates an instance of TestFailoverCleanupInputProperties class. - */ - public TestFailoverCleanupInputProperties() { - } - - /** - * Get the comments property: Test failover cleanup comments. - * - * @return the comments value. - */ - public String comments() { - return this.comments; - } - - /** - * Set the comments property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("comments", this.comments); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TestFailoverCleanupInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TestFailoverCleanupInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TestFailoverCleanupInputProperties. - */ - public static TestFailoverCleanupInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TestFailoverCleanupInputProperties deserializedTestFailoverCleanupInputProperties - = new TestFailoverCleanupInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("comments".equals(fieldName)) { - deserializedTestFailoverCleanupInputProperties.comments = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTestFailoverCleanupInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverInput.java deleted file mode 100644 index 6cdda1f76710..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverInput.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input definition for test failover. - */ -@Fluent -public final class TestFailoverInput implements JsonSerializable { - /* - * Test failover input properties. - */ - private TestFailoverInputProperties properties; - - /** - * Creates an instance of TestFailoverInput class. - */ - public TestFailoverInput() { - } - - /** - * Get the properties property: Test failover input properties. - * - * @return the properties value. - */ - public TestFailoverInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Test 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model TestFailoverInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TestFailoverInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TestFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TestFailoverInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TestFailoverInput. - */ - public static TestFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TestFailoverInput deserializedTestFailoverInput = new TestFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedTestFailoverInput.properties = TestFailoverInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTestFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverInputProperties.java deleted file mode 100644 index 179c2f979f5d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverInputProperties.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input definition for test failover input properties. - */ -@Fluent -public final class TestFailoverInputProperties implements JsonSerializable { - /* - * Test failover direction. - */ - private String failoverDirection; - - /* - * Network type to be used for test failover. - */ - private String networkType; - - /* - * The id of the network to be used for test failover. - */ - private String networkId; - - /* - * Provider specific settings. - */ - private TestFailoverProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of TestFailoverInputProperties class. - */ - public TestFailoverInputProperties() { - } - - /** - * Get the failoverDirection property: Test failover direction. - * - * @return the failoverDirection value. - */ - public String failoverDirection() { - return this.failoverDirection; - } - - /** - * Set the failoverDirection property: Test 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 the networkType property: Network type to be used for test failover. - * - * @return the networkType value. - */ - public String networkType() { - return this.networkType; - } - - /** - * Set the networkType property: 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 networkId property: The id of the network to be used for test failover. - * - * @return the networkId value. - */ - public String networkId() { - return this.networkId; - } - - /** - * Set the networkId property: 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 the providerSpecificDetails property: Provider specific settings. - * - * @return the providerSpecificDetails value. - */ - public TestFailoverProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: Provider specific settings. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the TestFailoverInputProperties object itself. - */ - public TestFailoverInputProperties - withProviderSpecificDetails(TestFailoverProviderSpecificInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("failoverDirection", this.failoverDirection); - jsonWriter.writeStringField("networkType", this.networkType); - jsonWriter.writeStringField("networkId", this.networkId); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TestFailoverInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TestFailoverInputProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TestFailoverInputProperties. - */ - public static TestFailoverInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TestFailoverInputProperties deserializedTestFailoverInputProperties = new TestFailoverInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("failoverDirection".equals(fieldName)) { - deserializedTestFailoverInputProperties.failoverDirection = reader.getString(); - } else if ("networkType".equals(fieldName)) { - deserializedTestFailoverInputProperties.networkType = reader.getString(); - } else if ("networkId".equals(fieldName)) { - deserializedTestFailoverInputProperties.networkId = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedTestFailoverInputProperties.providerSpecificDetails - = TestFailoverProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTestFailoverInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverJobDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverJobDetails.java deleted file mode 100644 index 6f4680100c29..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverJobDetails.java +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * This class represents the details for a test failover job. - */ -@Fluent -public final class TestFailoverJobDetails extends JobDetails { - /* - * Gets the type of job details (see JobDetailsTypes enum for possible values). - */ - private String instanceType = "TestFailoverJobDetails"; - - /* - * The test failover status. - */ - private String testFailoverStatus; - - /* - * The test failover comments. - */ - private String comments; - - /* - * The test network name. - */ - private String networkName; - - /* - * The test network friendly name. - */ - private String networkFriendlyName; - - /* - * The test network type (see TestFailoverInput enum for possible values). - */ - private String networkType; - - /* - * The test VM details. - */ - private List protectedItemDetails; - - /** - * Creates an instance of TestFailoverJobDetails class. - */ - public TestFailoverJobDetails() { - } - - /** - * Get the instanceType property: Gets the type of job details (see JobDetailsTypes enum for possible values). - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the testFailoverStatus property: The test failover status. - * - * @return the testFailoverStatus value. - */ - public String testFailoverStatus() { - return this.testFailoverStatus; - } - - /** - * Set the testFailoverStatus property: 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 comments property: The test failover comments. - * - * @return the comments value. - */ - public String comments() { - return this.comments; - } - - /** - * Set the comments property: 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 networkName property: The test network name. - * - * @return the networkName value. - */ - public String networkName() { - return this.networkName; - } - - /** - * Set the networkName property: 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 networkFriendlyName property: The test network friendly name. - * - * @return the networkFriendlyName value. - */ - public String networkFriendlyName() { - return this.networkFriendlyName; - } - - /** - * Set the networkFriendlyName property: 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 networkType property: The test network type (see TestFailoverInput enum for possible values). - * - * @return the networkType value. - */ - public String networkType() { - return this.networkType; - } - - /** - * Set the networkType property: 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 protectedItemDetails property: The test VM details. - * - * @return the protectedItemDetails value. - */ - public List protectedItemDetails() { - return this.protectedItemDetails; - } - - /** - * Set the protectedItemDetails property: 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; - } - - /** - * {@inheritDoc} - */ - @Override - public TestFailoverJobDetails withAffectedObjectDetails(Map affectedObjectDetails) { - super.withAffectedObjectDetails(affectedObjectDetails); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (protectedItemDetails() != null) { - protectedItemDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("affectedObjectDetails", affectedObjectDetails(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("testFailoverStatus", this.testFailoverStatus); - jsonWriter.writeStringField("comments", this.comments); - jsonWriter.writeStringField("networkName", this.networkName); - jsonWriter.writeStringField("networkFriendlyName", this.networkFriendlyName); - jsonWriter.writeStringField("networkType", this.networkType); - jsonWriter.writeArrayField("protectedItemDetails", this.protectedItemDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TestFailoverJobDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TestFailoverJobDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the TestFailoverJobDetails. - */ - public static TestFailoverJobDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TestFailoverJobDetails deserializedTestFailoverJobDetails = new TestFailoverJobDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("affectedObjectDetails".equals(fieldName)) { - Map affectedObjectDetails = reader.readMap(reader1 -> reader1.getString()); - deserializedTestFailoverJobDetails.withAffectedObjectDetails(affectedObjectDetails); - } else if ("instanceType".equals(fieldName)) { - deserializedTestFailoverJobDetails.instanceType = reader.getString(); - } else if ("testFailoverStatus".equals(fieldName)) { - deserializedTestFailoverJobDetails.testFailoverStatus = reader.getString(); - } else if ("comments".equals(fieldName)) { - deserializedTestFailoverJobDetails.comments = reader.getString(); - } else if ("networkName".equals(fieldName)) { - deserializedTestFailoverJobDetails.networkName = reader.getString(); - } else if ("networkFriendlyName".equals(fieldName)) { - deserializedTestFailoverJobDetails.networkFriendlyName = reader.getString(); - } else if ("networkType".equals(fieldName)) { - deserializedTestFailoverJobDetails.networkType = reader.getString(); - } else if ("protectedItemDetails".equals(fieldName)) { - List protectedItemDetails - = reader.readArray(reader1 -> FailoverReplicationProtectedItemDetails.fromJson(reader1)); - deserializedTestFailoverJobDetails.protectedItemDetails = protectedItemDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedTestFailoverJobDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverProviderSpecificInput.java deleted file mode 100644 index 02904e929ca4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestFailoverProviderSpecificInput.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific test failover input. - */ -@Immutable -public class TestFailoverProviderSpecificInput implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "TestFailoverProviderSpecificInput"; - - /** - * Creates an instance of TestFailoverProviderSpecificInput class. - */ - public TestFailoverProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TestFailoverProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TestFailoverProviderSpecificInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TestFailoverProviderSpecificInput. - */ - public static TestFailoverProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2ATestFailoverInput.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzure".equals(discriminatorValue)) { - return HyperVReplicaAzureTestFailoverInput.fromJson(readerToUse.reset()); - } else if ("InMageAzureV2".equals(discriminatorValue)) { - return InMageAzureV2TestFailoverInput.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmTestFailoverInput.fromJson(readerToUse.reset()); - } else if ("InMage".equals(discriminatorValue)) { - return InMageTestFailoverInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static TestFailoverProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TestFailoverProviderSpecificInput deserializedTestFailoverProviderSpecificInput - = new TestFailoverProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedTestFailoverProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTestFailoverProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateCleanupInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateCleanupInput.java deleted file mode 100644 index dfb09c01b092..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateCleanupInput.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input for test migrate cleanup. - */ -@Fluent -public final class TestMigrateCleanupInput implements JsonSerializable { - /* - * Test migrate cleanup input properties. - */ - private TestMigrateCleanupInputProperties properties; - - /** - * Creates an instance of TestMigrateCleanupInput class. - */ - public TestMigrateCleanupInput() { - } - - /** - * Get the properties property: Test migrate cleanup input properties. - * - * @return the properties value. - */ - public TestMigrateCleanupInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Test migrate cleanup input properties. - * - * @param properties the properties value to set. - * @return the TestMigrateCleanupInput object itself. - */ - public TestMigrateCleanupInput withProperties(TestMigrateCleanupInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model TestMigrateCleanupInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TestMigrateCleanupInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TestMigrateCleanupInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TestMigrateCleanupInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TestMigrateCleanupInput. - */ - public static TestMigrateCleanupInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TestMigrateCleanupInput deserializedTestMigrateCleanupInput = new TestMigrateCleanupInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedTestMigrateCleanupInput.properties = TestMigrateCleanupInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTestMigrateCleanupInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateCleanupInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateCleanupInputProperties.java deleted file mode 100644 index d5f248110bed..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateCleanupInputProperties.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Test migrate cleanup input properties. - */ -@Fluent -public final class TestMigrateCleanupInputProperties implements JsonSerializable { - /* - * Test migrate cleanup comments. - */ - private String comments; - - /** - * Creates an instance of TestMigrateCleanupInputProperties class. - */ - public TestMigrateCleanupInputProperties() { - } - - /** - * Get the comments property: Test migrate cleanup comments. - * - * @return the comments value. - */ - public String comments() { - return this.comments; - } - - /** - * Set the comments property: Test migrate cleanup comments. - * - * @param comments the comments value to set. - * @return the TestMigrateCleanupInputProperties object itself. - */ - public TestMigrateCleanupInputProperties withComments(String comments) { - this.comments = comments; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("comments", this.comments); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TestMigrateCleanupInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TestMigrateCleanupInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TestMigrateCleanupInputProperties. - */ - public static TestMigrateCleanupInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TestMigrateCleanupInputProperties deserializedTestMigrateCleanupInputProperties - = new TestMigrateCleanupInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("comments".equals(fieldName)) { - deserializedTestMigrateCleanupInputProperties.comments = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTestMigrateCleanupInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateInput.java deleted file mode 100644 index e698661feea7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateInput.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input for test migrate. - */ -@Fluent -public final class TestMigrateInput implements JsonSerializable { - /* - * Test migrate input properties. - */ - private TestMigrateInputProperties properties; - - /** - * Creates an instance of TestMigrateInput class. - */ - public TestMigrateInput() { - } - - /** - * Get the properties property: Test migrate input properties. - * - * @return the properties value. - */ - public TestMigrateInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Test migrate input properties. - * - * @param properties the properties value to set. - * @return the TestMigrateInput object itself. - */ - public TestMigrateInput withProperties(TestMigrateInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model TestMigrateInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TestMigrateInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TestMigrateInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TestMigrateInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TestMigrateInput. - */ - public static TestMigrateInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TestMigrateInput deserializedTestMigrateInput = new TestMigrateInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedTestMigrateInput.properties = TestMigrateInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTestMigrateInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateInputProperties.java deleted file mode 100644 index 0ab0356060fe..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateInputProperties.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Test migrate input properties. - */ -@Fluent -public final class TestMigrateInputProperties implements JsonSerializable { - /* - * The provider specific details. - */ - private TestMigrateProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of TestMigrateInputProperties class. - */ - public TestMigrateInputProperties() { - } - - /** - * Get the providerSpecificDetails property: The provider specific details. - * - * @return the providerSpecificDetails value. - */ - public TestMigrateProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: The provider specific details. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the TestMigrateInputProperties object itself. - */ - public TestMigrateInputProperties - withProviderSpecificDetails(TestMigrateProviderSpecificInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property providerSpecificDetails in model TestMigrateInputProperties")); - } else { - providerSpecificDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TestMigrateInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TestMigrateInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TestMigrateInputProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TestMigrateInputProperties. - */ - public static TestMigrateInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TestMigrateInputProperties deserializedTestMigrateInputProperties = new TestMigrateInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificDetails".equals(fieldName)) { - deserializedTestMigrateInputProperties.providerSpecificDetails - = TestMigrateProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTestMigrateInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateProviderSpecificInput.java deleted file mode 100644 index f9108c12cf67..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrateProviderSpecificInput.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Test migrate provider specific input. - */ -@Immutable -public class TestMigrateProviderSpecificInput implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "TestMigrateProviderSpecificInput"; - - /** - * Creates an instance of TestMigrateProviderSpecificInput class. - */ - public TestMigrateProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TestMigrateProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TestMigrateProviderSpecificInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TestMigrateProviderSpecificInput. - */ - public static TestMigrateProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("VMwareCbt".equals(discriminatorValue)) { - return VMwareCbtTestMigrateInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static TestMigrateProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TestMigrateProviderSpecificInput deserializedTestMigrateProviderSpecificInput - = new TestMigrateProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedTestMigrateProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTestMigrateProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrationState.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrationState.java deleted file mode 100644 index ce7877902f6f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/TestMigrationState.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The test migrate state. - */ -public final class TestMigrationState extends ExpandableStringEnum { - /** - * Static value None for TestMigrationState. - */ - public static final TestMigrationState NONE = fromString("None"); - - /** - * Static value TestMigrationInProgress for TestMigrationState. - */ - public static final TestMigrationState TEST_MIGRATION_IN_PROGRESS = fromString("TestMigrationInProgress"); - - /** - * Static value TestMigrationSucceeded for TestMigrationState. - */ - public static final TestMigrationState TEST_MIGRATION_SUCCEEDED = fromString("TestMigrationSucceeded"); - - /** - * Static value TestMigrationFailed for TestMigrationState. - */ - public static final TestMigrationState TEST_MIGRATION_FAILED = fromString("TestMigrationFailed"); - - /** - * Static value TestMigrationCleanupInProgress for TestMigrationState. - */ - public static final TestMigrationState TEST_MIGRATION_CLEANUP_IN_PROGRESS - = fromString("TestMigrationCleanupInProgress"); - - /** - * Static value TestMigrationCompletedWithInformation for TestMigrationState. - */ - public static final TestMigrationState TEST_MIGRATION_COMPLETED_WITH_INFORMATION - = fromString("TestMigrationCompletedWithInformation"); - - /** - * Static value TestMigrationPartiallySucceeded for TestMigrationState. - */ - public static final TestMigrationState TEST_MIGRATION_PARTIALLY_SUCCEEDED - = fromString("TestMigrationPartiallySucceeded"); - - /** - * Creates a new instance of TestMigrationState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TestMigrationState() { - } - - /** - * Creates or finds a TestMigrationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding TestMigrationState. - */ - public static TestMigrationState fromString(String name) { - return fromString(name, TestMigrationState.class); - } - - /** - * Gets known TestMigrationState values. - * - * @return known TestMigrationState values. - */ - public static Collection values() { - return values(TestMigrationState.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UnplannedFailoverInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UnplannedFailoverInput.java deleted file mode 100644 index 7dc453d4278e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UnplannedFailoverInput.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input definition for unplanned failover. - */ -@Fluent -public final class UnplannedFailoverInput implements JsonSerializable { - /* - * Unplanned failover input properties. - */ - private UnplannedFailoverInputProperties properties; - - /** - * Creates an instance of UnplannedFailoverInput class. - */ - public UnplannedFailoverInput() { - } - - /** - * Get the properties property: Unplanned failover input properties. - * - * @return the properties value. - */ - public UnplannedFailoverInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Unplanned 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model UnplannedFailoverInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UnplannedFailoverInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UnplannedFailoverInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UnplannedFailoverInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UnplannedFailoverInput. - */ - public static UnplannedFailoverInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UnplannedFailoverInput deserializedUnplannedFailoverInput = new UnplannedFailoverInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedUnplannedFailoverInput.properties = UnplannedFailoverInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUnplannedFailoverInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UnplannedFailoverInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UnplannedFailoverInputProperties.java deleted file mode 100644 index a78d4fef20ab..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UnplannedFailoverInputProperties.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input definition for unplanned failover input properties. - */ -@Fluent -public final class UnplannedFailoverInputProperties implements JsonSerializable { - /* - * Failover direction. - */ - private String failoverDirection; - - /* - * Source site operations status. - */ - private String sourceSiteOperations; - - /* - * Provider specific settings. - */ - private UnplannedFailoverProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of UnplannedFailoverInputProperties class. - */ - public UnplannedFailoverInputProperties() { - } - - /** - * Get the failoverDirection property: Failover direction. - * - * @return the failoverDirection value. - */ - public String failoverDirection() { - return this.failoverDirection; - } - - /** - * Set the failoverDirection property: 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 the sourceSiteOperations property: Source site operations status. - * - * @return the sourceSiteOperations value. - */ - public String sourceSiteOperations() { - return this.sourceSiteOperations; - } - - /** - * Set the sourceSiteOperations property: 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 the providerSpecificDetails property: Provider specific settings. - * - * @return the providerSpecificDetails value. - */ - public UnplannedFailoverProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: Provider specific settings. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the UnplannedFailoverInputProperties object itself. - */ - public UnplannedFailoverInputProperties - withProviderSpecificDetails(UnplannedFailoverProviderSpecificInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("failoverDirection", this.failoverDirection); - jsonWriter.writeStringField("sourceSiteOperations", this.sourceSiteOperations); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UnplannedFailoverInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UnplannedFailoverInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UnplannedFailoverInputProperties. - */ - public static UnplannedFailoverInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UnplannedFailoverInputProperties deserializedUnplannedFailoverInputProperties - = new UnplannedFailoverInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("failoverDirection".equals(fieldName)) { - deserializedUnplannedFailoverInputProperties.failoverDirection = reader.getString(); - } else if ("sourceSiteOperations".equals(fieldName)) { - deserializedUnplannedFailoverInputProperties.sourceSiteOperations = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedUnplannedFailoverInputProperties.providerSpecificDetails - = UnplannedFailoverProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUnplannedFailoverInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UnplannedFailoverProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UnplannedFailoverProviderSpecificInput.java deleted file mode 100644 index 54d00c8141c0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UnplannedFailoverProviderSpecificInput.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provider specific unplanned failover input. - */ -@Immutable -public class UnplannedFailoverProviderSpecificInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "UnplannedFailoverProviderSpecificInput"; - - /** - * Creates an instance of UnplannedFailoverProviderSpecificInput class. - */ - public UnplannedFailoverProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UnplannedFailoverProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UnplannedFailoverProviderSpecificInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UnplannedFailoverProviderSpecificInput. - */ - public static UnplannedFailoverProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2AUnplannedFailoverInput.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzure".equals(discriminatorValue)) { - return HyperVReplicaAzureUnplannedFailoverInput.fromJson(readerToUse.reset()); - } else if ("InMageAzureV2".equals(discriminatorValue)) { - return InMageAzureV2UnplannedFailoverInput.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmUnplannedFailoverInput.fromJson(readerToUse.reset()); - } else if ("InMage".equals(discriminatorValue)) { - return InMageUnplannedFailoverInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static UnplannedFailoverProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UnplannedFailoverProviderSpecificInput deserializedUnplannedFailoverProviderSpecificInput - = new UnplannedFailoverProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedUnplannedFailoverProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUnplannedFailoverProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateApplianceForReplicationProtectedItemInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateApplianceForReplicationProtectedItemInput.java deleted file mode 100644 index 8628bda9e83e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateApplianceForReplicationProtectedItemInput.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update appliance for replication protected item input. - */ -@Fluent -public final class UpdateApplianceForReplicationProtectedItemInput - implements JsonSerializable { - /* - * Update appliance replication protected item properties. - */ - private UpdateApplianceForReplicationProtectedItemInputProperties properties; - - /** - * Creates an instance of UpdateApplianceForReplicationProtectedItemInput class. - */ - public UpdateApplianceForReplicationProtectedItemInput() { - } - - /** - * Get the properties property: Update appliance replication protected item properties. - * - * @return the properties value. - */ - public UpdateApplianceForReplicationProtectedItemInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Update appliance replication protected item properties. - * - * @param properties the properties value to set. - * @return the UpdateApplianceForReplicationProtectedItemInput object itself. - */ - public UpdateApplianceForReplicationProtectedItemInput - withProperties(UpdateApplianceForReplicationProtectedItemInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model UpdateApplianceForReplicationProtectedItemInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UpdateApplianceForReplicationProtectedItemInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateApplianceForReplicationProtectedItemInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateApplianceForReplicationProtectedItemInput if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UpdateApplianceForReplicationProtectedItemInput. - */ - public static UpdateApplianceForReplicationProtectedItemInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateApplianceForReplicationProtectedItemInput deserializedUpdateApplianceForReplicationProtectedItemInput - = new UpdateApplianceForReplicationProtectedItemInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedUpdateApplianceForReplicationProtectedItemInput.properties - = UpdateApplianceForReplicationProtectedItemInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateApplianceForReplicationProtectedItemInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateApplianceForReplicationProtectedItemInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateApplianceForReplicationProtectedItemInputProperties.java deleted file mode 100644 index 215b7c08ec31..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateApplianceForReplicationProtectedItemInputProperties.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update appliance for protected item input properties. - */ -@Fluent -public final class UpdateApplianceForReplicationProtectedItemInputProperties - implements JsonSerializable { - /* - * The target appliance Id. - */ - private String targetApplianceId; - - /* - * The provider specific input to update replication protected item. - */ - private UpdateReplicationProtectedItemProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of UpdateApplianceForReplicationProtectedItemInputProperties class. - */ - public UpdateApplianceForReplicationProtectedItemInputProperties() { - } - - /** - * Get the targetApplianceId property: The target appliance Id. - * - * @return the targetApplianceId value. - */ - public String targetApplianceId() { - return this.targetApplianceId; - } - - /** - * Set the targetApplianceId property: The target appliance Id. - * - * @param targetApplianceId the targetApplianceId value to set. - * @return the UpdateApplianceForReplicationProtectedItemInputProperties object itself. - */ - public UpdateApplianceForReplicationProtectedItemInputProperties withTargetApplianceId(String targetApplianceId) { - this.targetApplianceId = targetApplianceId; - return this; - } - - /** - * Get the providerSpecificDetails property: The provider specific input to update replication protected item. - * - * @return the providerSpecificDetails value. - */ - public UpdateReplicationProtectedItemProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: The provider specific input to update replication protected item. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the UpdateApplianceForReplicationProtectedItemInputProperties object itself. - */ - public UpdateApplianceForReplicationProtectedItemInputProperties - withProviderSpecificDetails(UpdateReplicationProtectedItemProviderSpecificInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetApplianceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetApplianceId in model UpdateApplianceForReplicationProtectedItemInputProperties")); - } - if (providerSpecificDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property providerSpecificDetails in model UpdateApplianceForReplicationProtectedItemInputProperties")); - } else { - providerSpecificDetails().validate(); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(UpdateApplianceForReplicationProtectedItemInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetApplianceId", this.targetApplianceId); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateApplianceForReplicationProtectedItemInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateApplianceForReplicationProtectedItemInputProperties if the JsonReader was pointing - * to an instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the - * UpdateApplianceForReplicationProtectedItemInputProperties. - */ - public static UpdateApplianceForReplicationProtectedItemInputProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - UpdateApplianceForReplicationProtectedItemInputProperties deserializedUpdateApplianceForReplicationProtectedItemInputProperties - = new UpdateApplianceForReplicationProtectedItemInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetApplianceId".equals(fieldName)) { - deserializedUpdateApplianceForReplicationProtectedItemInputProperties.targetApplianceId - = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedUpdateApplianceForReplicationProtectedItemInputProperties.providerSpecificDetails - = UpdateReplicationProtectedItemProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateApplianceForReplicationProtectedItemInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateDiskInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateDiskInput.java deleted file mode 100644 index 71c1005f37ac..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateDiskInput.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Disk input for update. - */ -@Fluent -public final class UpdateDiskInput implements JsonSerializable { - /* - * The disk Id. - */ - private String diskId; - - /* - * The target disk name. - */ - private String targetDiskName; - - /** - * Creates an instance of UpdateDiskInput class. - */ - public UpdateDiskInput() { - } - - /** - * Get the diskId property: The disk Id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: The disk Id. - * - * @param diskId the diskId value to set. - * @return the UpdateDiskInput object itself. - */ - public UpdateDiskInput withDiskId(String diskId) { - this.diskId = diskId; - return this; - } - - /** - * Get the targetDiskName property: The target disk name. - * - * @return the targetDiskName value. - */ - public String targetDiskName() { - return this.targetDiskName; - } - - /** - * Set the targetDiskName property: The target disk name. - * - * @param targetDiskName the targetDiskName value to set. - * @return the UpdateDiskInput object itself. - */ - public UpdateDiskInput withTargetDiskName(String targetDiskName) { - this.targetDiskName = targetDiskName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property diskId in model UpdateDiskInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UpdateDiskInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("targetDiskName", this.targetDiskName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateDiskInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateDiskInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UpdateDiskInput. - */ - public static UpdateDiskInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateDiskInput deserializedUpdateDiskInput = new UpdateDiskInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedUpdateDiskInput.diskId = reader.getString(); - } else if ("targetDiskName".equals(fieldName)) { - deserializedUpdateDiskInput.targetDiskName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateDiskInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMigrationItemInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMigrationItemInput.java deleted file mode 100644 index 51257312b1ec..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMigrationItemInput.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update migration item input. - */ -@Fluent -public final class UpdateMigrationItemInput implements JsonSerializable { - /* - * Update migration item input properties. - */ - private UpdateMigrationItemInputProperties properties; - - /** - * Creates an instance of UpdateMigrationItemInput class. - */ - public UpdateMigrationItemInput() { - } - - /** - * Get the properties property: Update migration item input properties. - * - * @return the properties value. - */ - public UpdateMigrationItemInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Update migration item input properties. - * - * @param properties the properties value to set. - * @return the UpdateMigrationItemInput object itself. - */ - public UpdateMigrationItemInput withProperties(UpdateMigrationItemInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateMigrationItemInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateMigrationItemInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateMigrationItemInput. - */ - public static UpdateMigrationItemInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateMigrationItemInput deserializedUpdateMigrationItemInput = new UpdateMigrationItemInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedUpdateMigrationItemInput.properties - = UpdateMigrationItemInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateMigrationItemInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMigrationItemInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMigrationItemInputProperties.java deleted file mode 100644 index 241bedaa0d8a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMigrationItemInputProperties.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update migration item input properties. - */ -@Fluent -public final class UpdateMigrationItemInputProperties implements JsonSerializable { - /* - * The provider specific input to update migration item. - */ - private UpdateMigrationItemProviderSpecificInput providerSpecificDetails; - - /** - * Creates an instance of UpdateMigrationItemInputProperties class. - */ - public UpdateMigrationItemInputProperties() { - } - - /** - * Get the providerSpecificDetails property: The provider specific input to update migration item. - * - * @return the providerSpecificDetails value. - */ - public UpdateMigrationItemProviderSpecificInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: The provider specific input to update migration item. - * - * @param providerSpecificDetails the providerSpecificDetails value to set. - * @return the UpdateMigrationItemInputProperties object itself. - */ - public UpdateMigrationItemInputProperties - withProviderSpecificDetails(UpdateMigrationItemProviderSpecificInput providerSpecificDetails) { - this.providerSpecificDetails = providerSpecificDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property providerSpecificDetails in model UpdateMigrationItemInputProperties")); - } else { - providerSpecificDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UpdateMigrationItemInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateMigrationItemInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateMigrationItemInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UpdateMigrationItemInputProperties. - */ - public static UpdateMigrationItemInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateMigrationItemInputProperties deserializedUpdateMigrationItemInputProperties - = new UpdateMigrationItemInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificDetails".equals(fieldName)) { - deserializedUpdateMigrationItemInputProperties.providerSpecificDetails - = UpdateMigrationItemProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateMigrationItemInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMigrationItemProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMigrationItemProviderSpecificInput.java deleted file mode 100644 index 65423a76fd1b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMigrationItemProviderSpecificInput.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update migration item provider specific input. - */ -@Immutable -public class UpdateMigrationItemProviderSpecificInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "UpdateMigrationItemProviderSpecificInput"; - - /** - * Creates an instance of UpdateMigrationItemProviderSpecificInput class. - */ - public UpdateMigrationItemProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateMigrationItemProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateMigrationItemProviderSpecificInput if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateMigrationItemProviderSpecificInput. - */ - public static UpdateMigrationItemProviderSpecificInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("VMwareCbt".equals(discriminatorValue)) { - return VMwareCbtUpdateMigrationItemInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static UpdateMigrationItemProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - UpdateMigrationItemProviderSpecificInput deserializedUpdateMigrationItemProviderSpecificInput - = new UpdateMigrationItemProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedUpdateMigrationItemProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateMigrationItemProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMobilityServiceRequest.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMobilityServiceRequest.java deleted file mode 100644 index 37933882d4c9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMobilityServiceRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Request to update the mobility service on a protected item. - */ -@Fluent -public final class UpdateMobilityServiceRequest implements JsonSerializable { - /* - * The properties of the update mobility service request. - */ - private UpdateMobilityServiceRequestProperties properties; - - /** - * Creates an instance of UpdateMobilityServiceRequest class. - */ - public UpdateMobilityServiceRequest() { - } - - /** - * Get the properties property: The properties of the update mobility service request. - * - * @return the properties value. - */ - public UpdateMobilityServiceRequestProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateMobilityServiceRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateMobilityServiceRequest if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateMobilityServiceRequest. - */ - public static UpdateMobilityServiceRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateMobilityServiceRequest deserializedUpdateMobilityServiceRequest = new UpdateMobilityServiceRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedUpdateMobilityServiceRequest.properties - = UpdateMobilityServiceRequestProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateMobilityServiceRequest; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMobilityServiceRequestProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMobilityServiceRequestProperties.java deleted file mode 100644 index 2d00693075a0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateMobilityServiceRequestProperties.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The properties of an update mobility service request. - */ -@Fluent -public final class UpdateMobilityServiceRequestProperties - implements JsonSerializable { - /* - * The CS run as account Id. - */ - private String runAsAccountId; - - /** - * Creates an instance of UpdateMobilityServiceRequestProperties class. - */ - public UpdateMobilityServiceRequestProperties() { - } - - /** - * Get the runAsAccountId property: The CS run as account Id. - * - * @return the runAsAccountId value. - */ - public String runAsAccountId() { - return this.runAsAccountId; - } - - /** - * Set the runAsAccountId property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("runAsAccountId", this.runAsAccountId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateMobilityServiceRequestProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateMobilityServiceRequestProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateMobilityServiceRequestProperties. - */ - public static UpdateMobilityServiceRequestProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateMobilityServiceRequestProperties deserializedUpdateMobilityServiceRequestProperties - = new UpdateMobilityServiceRequestProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("runAsAccountId".equals(fieldName)) { - deserializedUpdateMobilityServiceRequestProperties.runAsAccountId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateMobilityServiceRequestProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateNetworkMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateNetworkMappingInput.java deleted file mode 100644 index d397942d6fb1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateNetworkMappingInput.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update network mapping input. - */ -@Fluent -public final class UpdateNetworkMappingInput implements JsonSerializable { - /* - * The input properties needed to update network mapping. - */ - private UpdateNetworkMappingInputProperties properties; - - /** - * Creates an instance of UpdateNetworkMappingInput class. - */ - public UpdateNetworkMappingInput() { - } - - /** - * Get the properties property: The input properties needed to update network mapping. - * - * @return the properties value. - */ - public UpdateNetworkMappingInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateNetworkMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateNetworkMappingInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateNetworkMappingInput. - */ - public static UpdateNetworkMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateNetworkMappingInput deserializedUpdateNetworkMappingInput = new UpdateNetworkMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedUpdateNetworkMappingInput.properties - = UpdateNetworkMappingInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateNetworkMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateNetworkMappingInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateNetworkMappingInputProperties.java deleted file mode 100644 index 50835d4a9a70..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateNetworkMappingInputProperties.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Common input details for network mapping operation. - */ -@Fluent -public final class UpdateNetworkMappingInputProperties - implements JsonSerializable { - /* - * Recovery fabric name. - */ - private String recoveryFabricName; - - /* - * Recovery network Id. - */ - private String recoveryNetworkId; - - /* - * Fabrics specific input network Id. - */ - private FabricSpecificUpdateNetworkMappingInput fabricSpecificDetails; - - /** - * Creates an instance of UpdateNetworkMappingInputProperties class. - */ - public UpdateNetworkMappingInputProperties() { - } - - /** - * Get the recoveryFabricName property: Recovery fabric name. - * - * @return the recoveryFabricName value. - */ - public String recoveryFabricName() { - return this.recoveryFabricName; - } - - /** - * Set the recoveryFabricName property: 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 the recoveryNetworkId property: Recovery network Id. - * - * @return the recoveryNetworkId value. - */ - public String recoveryNetworkId() { - return this.recoveryNetworkId; - } - - /** - * Set the recoveryNetworkId property: 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 the fabricSpecificDetails property: Fabrics specific input network Id. - * - * @return the fabricSpecificDetails value. - */ - public FabricSpecificUpdateNetworkMappingInput fabricSpecificDetails() { - return this.fabricSpecificDetails; - } - - /** - * Set the fabricSpecificDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fabricSpecificDetails() != null) { - fabricSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryFabricName", this.recoveryFabricName); - jsonWriter.writeStringField("recoveryNetworkId", this.recoveryNetworkId); - jsonWriter.writeJsonField("fabricSpecificDetails", this.fabricSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateNetworkMappingInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateNetworkMappingInputProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateNetworkMappingInputProperties. - */ - public static UpdateNetworkMappingInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateNetworkMappingInputProperties deserializedUpdateNetworkMappingInputProperties - = new UpdateNetworkMappingInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryFabricName".equals(fieldName)) { - deserializedUpdateNetworkMappingInputProperties.recoveryFabricName = reader.getString(); - } else if ("recoveryNetworkId".equals(fieldName)) { - deserializedUpdateNetworkMappingInputProperties.recoveryNetworkId = reader.getString(); - } else if ("fabricSpecificDetails".equals(fieldName)) { - deserializedUpdateNetworkMappingInputProperties.fabricSpecificDetails - = FabricSpecificUpdateNetworkMappingInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateNetworkMappingInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdatePolicyInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdatePolicyInput.java deleted file mode 100644 index e62813a5cb0f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdatePolicyInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update policy input. - */ -@Fluent -public final class UpdatePolicyInput implements JsonSerializable { - /* - * The ReplicationProviderSettings. - */ - private UpdatePolicyInputProperties properties; - - /** - * Creates an instance of UpdatePolicyInput class. - */ - public UpdatePolicyInput() { - } - - /** - * Get the properties property: The ReplicationProviderSettings. - * - * @return the properties value. - */ - public UpdatePolicyInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The ReplicationProviderSettings. - * - * @param properties the properties value to set. - * @return the UpdatePolicyInput object itself. - */ - public UpdatePolicyInput withProperties(UpdatePolicyInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdatePolicyInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdatePolicyInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdatePolicyInput. - */ - public static UpdatePolicyInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdatePolicyInput deserializedUpdatePolicyInput = new UpdatePolicyInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedUpdatePolicyInput.properties = UpdatePolicyInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdatePolicyInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdatePolicyInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdatePolicyInputProperties.java deleted file mode 100644 index 1b7230246f4c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdatePolicyInputProperties.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Policy update properties. - */ -@Fluent -public final class UpdatePolicyInputProperties implements JsonSerializable { - /* - * The ReplicationProviderSettings. - */ - private PolicyProviderSpecificInput replicationProviderSettings; - - /** - * Creates an instance of UpdatePolicyInputProperties class. - */ - public UpdatePolicyInputProperties() { - } - - /** - * Get the replicationProviderSettings property: The ReplicationProviderSettings. - * - * @return the replicationProviderSettings value. - */ - public PolicyProviderSpecificInput replicationProviderSettings() { - return this.replicationProviderSettings; - } - - /** - * Set the replicationProviderSettings property: The ReplicationProviderSettings. - * - * @param replicationProviderSettings the replicationProviderSettings value to set. - * @return the UpdatePolicyInputProperties object itself. - */ - public UpdatePolicyInputProperties - withReplicationProviderSettings(PolicyProviderSpecificInput replicationProviderSettings) { - this.replicationProviderSettings = replicationProviderSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (replicationProviderSettings() != null) { - replicationProviderSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("replicationProviderSettings", this.replicationProviderSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdatePolicyInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdatePolicyInputProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdatePolicyInputProperties. - */ - public static UpdatePolicyInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdatePolicyInputProperties deserializedUpdatePolicyInputProperties = new UpdatePolicyInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("replicationProviderSettings".equals(fieldName)) { - deserializedUpdatePolicyInputProperties.replicationProviderSettings - = PolicyProviderSpecificInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdatePolicyInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateProtectionContainerMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateProtectionContainerMappingInput.java deleted file mode 100644 index f9e24b4e8f16..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateProtectionContainerMappingInput.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container pairing update input. - */ -@Fluent -public final class UpdateProtectionContainerMappingInput - implements JsonSerializable { - /* - * Update protection container mapping input properties. - */ - private UpdateProtectionContainerMappingInputProperties properties; - - /** - * Creates an instance of UpdateProtectionContainerMappingInput class. - */ - public UpdateProtectionContainerMappingInput() { - } - - /** - * Get the properties property: Update protection container mapping input properties. - * - * @return the properties value. - */ - public UpdateProtectionContainerMappingInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Update protection container mapping input properties. - * - * @param properties the properties value to set. - * @return the UpdateProtectionContainerMappingInput object itself. - */ - public UpdateProtectionContainerMappingInput - withProperties(UpdateProtectionContainerMappingInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateProtectionContainerMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateProtectionContainerMappingInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateProtectionContainerMappingInput. - */ - public static UpdateProtectionContainerMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateProtectionContainerMappingInput deserializedUpdateProtectionContainerMappingInput - = new UpdateProtectionContainerMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedUpdateProtectionContainerMappingInput.properties - = UpdateProtectionContainerMappingInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateProtectionContainerMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateProtectionContainerMappingInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateProtectionContainerMappingInputProperties.java deleted file mode 100644 index e2a94bfb2cab..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateProtectionContainerMappingInputProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container pairing update input. - */ -@Fluent -public final class UpdateProtectionContainerMappingInputProperties - implements JsonSerializable { - /* - * Provider specific input for updating protection container mapping. - */ - private ReplicationProviderSpecificUpdateContainerMappingInput providerSpecificInput; - - /** - * Creates an instance of UpdateProtectionContainerMappingInputProperties class. - */ - public UpdateProtectionContainerMappingInputProperties() { - } - - /** - * Get the providerSpecificInput property: Provider specific input for updating protection container mapping. - * - * @return the providerSpecificInput value. - */ - public ReplicationProviderSpecificUpdateContainerMappingInput providerSpecificInput() { - return this.providerSpecificInput; - } - - /** - * Set the providerSpecificInput property: Provider specific input for updating protection container mapping. - * - * @param providerSpecificInput the providerSpecificInput value to set. - * @return the UpdateProtectionContainerMappingInputProperties object itself. - */ - public UpdateProtectionContainerMappingInputProperties - withProviderSpecificInput(ReplicationProviderSpecificUpdateContainerMappingInput providerSpecificInput) { - this.providerSpecificInput = providerSpecificInput; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (providerSpecificInput() != null) { - providerSpecificInput().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerSpecificInput", this.providerSpecificInput); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateProtectionContainerMappingInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateProtectionContainerMappingInputProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateProtectionContainerMappingInputProperties. - */ - public static UpdateProtectionContainerMappingInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateProtectionContainerMappingInputProperties deserializedUpdateProtectionContainerMappingInputProperties - = new UpdateProtectionContainerMappingInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerSpecificInput".equals(fieldName)) { - deserializedUpdateProtectionContainerMappingInputProperties.providerSpecificInput - = ReplicationProviderSpecificUpdateContainerMappingInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateProtectionContainerMappingInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateRecoveryPlanInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateRecoveryPlanInput.java deleted file mode 100644 index be2c1008f785..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateRecoveryPlanInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update recovery plan input class. - */ -@Fluent -public final class UpdateRecoveryPlanInput implements JsonSerializable { - /* - * Recovery plan update properties. - */ - private UpdateRecoveryPlanInputProperties properties; - - /** - * Creates an instance of UpdateRecoveryPlanInput class. - */ - public UpdateRecoveryPlanInput() { - } - - /** - * Get the properties property: Recovery plan update properties. - * - * @return the properties value. - */ - public UpdateRecoveryPlanInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateRecoveryPlanInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateRecoveryPlanInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateRecoveryPlanInput. - */ - public static UpdateRecoveryPlanInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateRecoveryPlanInput deserializedUpdateRecoveryPlanInput = new UpdateRecoveryPlanInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedUpdateRecoveryPlanInput.properties = UpdateRecoveryPlanInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateRecoveryPlanInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateRecoveryPlanInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateRecoveryPlanInputProperties.java deleted file mode 100644 index 9df6d349d7d8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateRecoveryPlanInputProperties.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Recovery plan update properties. - */ -@Fluent -public final class UpdateRecoveryPlanInputProperties implements JsonSerializable { - /* - * The recovery plan groups. - */ - private List groups; - - /** - * Creates an instance of UpdateRecoveryPlanInputProperties class. - */ - public UpdateRecoveryPlanInputProperties() { - } - - /** - * Get the groups property: The recovery plan groups. - * - * @return the groups value. - */ - public List groups() { - return this.groups; - } - - /** - * Set the groups property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (groups() != null) { - groups().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("groups", this.groups, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateRecoveryPlanInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateRecoveryPlanInputProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateRecoveryPlanInputProperties. - */ - public static UpdateRecoveryPlanInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateRecoveryPlanInputProperties deserializedUpdateRecoveryPlanInputProperties - = new UpdateRecoveryPlanInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("groups".equals(fieldName)) { - List groups = reader.readArray(reader1 -> RecoveryPlanGroup.fromJson(reader1)); - deserializedUpdateRecoveryPlanInputProperties.groups = groups; - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateRecoveryPlanInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateReplicationProtectedItemInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateReplicationProtectedItemInput.java deleted file mode 100644 index a82d3afe8881..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateReplicationProtectedItemInput.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update replication protected item input. - */ -@Fluent -public final class UpdateReplicationProtectedItemInput - implements JsonSerializable { - /* - * Update replication protected item properties. - */ - private UpdateReplicationProtectedItemInputProperties properties; - - /** - * Creates an instance of UpdateReplicationProtectedItemInput class. - */ - public UpdateReplicationProtectedItemInput() { - } - - /** - * Get the properties property: Update replication protected item properties. - * - * @return the properties value. - */ - public UpdateReplicationProtectedItemInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateReplicationProtectedItemInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateReplicationProtectedItemInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateReplicationProtectedItemInput. - */ - public static UpdateReplicationProtectedItemInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateReplicationProtectedItemInput deserializedUpdateReplicationProtectedItemInput - = new UpdateReplicationProtectedItemInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedUpdateReplicationProtectedItemInput.properties - = UpdateReplicationProtectedItemInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateReplicationProtectedItemInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateReplicationProtectedItemInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateReplicationProtectedItemInputProperties.java deleted file mode 100644 index bf9460eb69e6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateReplicationProtectedItemInputProperties.java +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Update protected item input properties. - */ -@Fluent -public final class UpdateReplicationProtectedItemInputProperties - implements JsonSerializable { - /* - * Target Azure VM name given by the user. - */ - private String recoveryAzureVMName; - - /* - * Target Azure VM size. - */ - private String recoveryAzureVMSize; - - /* - * Target Azure Network Id. - */ - private String selectedRecoveryAzureNetworkId; - - /* - * The Azure Network Id for test failover. - */ - private String selectedTfoAzureNetworkId; - - /* - * The selected source nic Id which will be used as the primary nic during failover. - */ - private String selectedSourceNicId; - - /* - * The selected option to enable RDP\SSH on target vm after failover. String value of - * SrsDataContract.EnableRDPOnTargetOption enum. - */ - private String enableRdpOnTargetOption; - - /* - * The list of VM nic details. - */ - private List vmNics; - - /* - * License type. - */ - private LicenseType licenseType; - - /* - * The target availability set Id. - */ - private String recoveryAvailabilitySetId; - - /* - * The provider specific input to update replication protected item. - */ - private UpdateReplicationProtectedItemProviderInput providerSpecificDetails; - - /** - * Creates an instance of UpdateReplicationProtectedItemInputProperties class. - */ - public UpdateReplicationProtectedItemInputProperties() { - } - - /** - * Get the recoveryAzureVMName property: Target Azure VM name given by the user. - * - * @return the recoveryAzureVMName value. - */ - public String recoveryAzureVMName() { - return this.recoveryAzureVMName; - } - - /** - * Set the recoveryAzureVMName property: 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 the recoveryAzureVMSize property: Target Azure VM size. - * - * @return the recoveryAzureVMSize value. - */ - public String recoveryAzureVMSize() { - return this.recoveryAzureVMSize; - } - - /** - * Set the recoveryAzureVMSize property: 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 the selectedRecoveryAzureNetworkId property: Target Azure Network Id. - * - * @return the selectedRecoveryAzureNetworkId value. - */ - public String selectedRecoveryAzureNetworkId() { - return this.selectedRecoveryAzureNetworkId; - } - - /** - * Set the selectedRecoveryAzureNetworkId property: 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 selectedTfoAzureNetworkId property: The Azure Network Id for test failover. - * - * @return the selectedTfoAzureNetworkId value. - */ - public String selectedTfoAzureNetworkId() { - return this.selectedTfoAzureNetworkId; - } - - /** - * Set the selectedTfoAzureNetworkId property: The Azure Network Id for test failover. - * - * @param selectedTfoAzureNetworkId the selectedTfoAzureNetworkId value to set. - * @return the UpdateReplicationProtectedItemInputProperties object itself. - */ - public UpdateReplicationProtectedItemInputProperties - withSelectedTfoAzureNetworkId(String selectedTfoAzureNetworkId) { - this.selectedTfoAzureNetworkId = selectedTfoAzureNetworkId; - return this; - } - - /** - * Get the selectedSourceNicId property: The selected source nic Id which will be used as the primary nic during - * failover. - * - * @return the selectedSourceNicId value. - */ - public String selectedSourceNicId() { - return this.selectedSourceNicId; - } - - /** - * Set the selectedSourceNicId property: The selected source nic Id which will be used as the primary nic during - * failover. - * - * @param selectedSourceNicId the selectedSourceNicId value to set. - * @return the UpdateReplicationProtectedItemInputProperties object itself. - */ - public UpdateReplicationProtectedItemInputProperties withSelectedSourceNicId(String selectedSourceNicId) { - this.selectedSourceNicId = selectedSourceNicId; - return this; - } - - /** - * Get the enableRdpOnTargetOption property: 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 enableRdpOnTargetOption property: 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 vmNics property: The list of VM nic details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: 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 the licenseType property: License type. - * - * @return the licenseType value. - */ - public LicenseType licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: License type. - * - * @param licenseType the licenseType value to set. - * @return the UpdateReplicationProtectedItemInputProperties object itself. - */ - public UpdateReplicationProtectedItemInputProperties withLicenseType(LicenseType licenseType) { - this.licenseType = licenseType; - return this; - } - - /** - * Get the recoveryAvailabilitySetId property: The target availability set Id. - * - * @return the recoveryAvailabilitySetId value. - */ - public String recoveryAvailabilitySetId() { - return this.recoveryAvailabilitySetId; - } - - /** - * Set the recoveryAvailabilitySetId property: 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 providerSpecificDetails property: The provider specific input to update replication protected item. - * - * @return the providerSpecificDetails value. - */ - public UpdateReplicationProtectedItemProviderInput providerSpecificDetails() { - return this.providerSpecificDetails; - } - - /** - * Set the providerSpecificDetails property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - if (providerSpecificDetails() != null) { - providerSpecificDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryAzureVMName", this.recoveryAzureVMName); - jsonWriter.writeStringField("recoveryAzureVMSize", this.recoveryAzureVMSize); - jsonWriter.writeStringField("selectedRecoveryAzureNetworkId", this.selectedRecoveryAzureNetworkId); - jsonWriter.writeStringField("selectedTfoAzureNetworkId", this.selectedTfoAzureNetworkId); - jsonWriter.writeStringField("selectedSourceNicId", this.selectedSourceNicId); - jsonWriter.writeStringField("enableRdpOnTargetOption", this.enableRdpOnTargetOption); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); - jsonWriter.writeStringField("recoveryAvailabilitySetId", this.recoveryAvailabilitySetId); - jsonWriter.writeJsonField("providerSpecificDetails", this.providerSpecificDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateReplicationProtectedItemInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateReplicationProtectedItemInputProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateReplicationProtectedItemInputProperties. - */ - public static UpdateReplicationProtectedItemInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateReplicationProtectedItemInputProperties deserializedUpdateReplicationProtectedItemInputProperties - = new UpdateReplicationProtectedItemInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryAzureVMName".equals(fieldName)) { - deserializedUpdateReplicationProtectedItemInputProperties.recoveryAzureVMName = reader.getString(); - } else if ("recoveryAzureVMSize".equals(fieldName)) { - deserializedUpdateReplicationProtectedItemInputProperties.recoveryAzureVMSize = reader.getString(); - } else if ("selectedRecoveryAzureNetworkId".equals(fieldName)) { - deserializedUpdateReplicationProtectedItemInputProperties.selectedRecoveryAzureNetworkId - = reader.getString(); - } else if ("selectedTfoAzureNetworkId".equals(fieldName)) { - deserializedUpdateReplicationProtectedItemInputProperties.selectedTfoAzureNetworkId - = reader.getString(); - } else if ("selectedSourceNicId".equals(fieldName)) { - deserializedUpdateReplicationProtectedItemInputProperties.selectedSourceNicId = reader.getString(); - } else if ("enableRdpOnTargetOption".equals(fieldName)) { - deserializedUpdateReplicationProtectedItemInputProperties.enableRdpOnTargetOption - = reader.getString(); - } else if ("vmNics".equals(fieldName)) { - List vmNics = reader.readArray(reader1 -> VMNicInputDetails.fromJson(reader1)); - deserializedUpdateReplicationProtectedItemInputProperties.vmNics = vmNics; - } else if ("licenseType".equals(fieldName)) { - deserializedUpdateReplicationProtectedItemInputProperties.licenseType - = LicenseType.fromString(reader.getString()); - } else if ("recoveryAvailabilitySetId".equals(fieldName)) { - deserializedUpdateReplicationProtectedItemInputProperties.recoveryAvailabilitySetId - = reader.getString(); - } else if ("providerSpecificDetails".equals(fieldName)) { - deserializedUpdateReplicationProtectedItemInputProperties.providerSpecificDetails - = UpdateReplicationProtectedItemProviderInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateReplicationProtectedItemInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateReplicationProtectedItemProviderInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateReplicationProtectedItemProviderInput.java deleted file mode 100644 index 6f897da4cd55..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateReplicationProtectedItemProviderInput.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update replication protected item provider specific input. - */ -@Immutable -public class UpdateReplicationProtectedItemProviderInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "UpdateReplicationProtectedItemProviderInput"; - - /** - * Creates an instance of UpdateReplicationProtectedItemProviderInput class. - */ - public UpdateReplicationProtectedItemProviderInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateReplicationProtectedItemProviderInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateReplicationProtectedItemProviderInput if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateReplicationProtectedItemProviderInput. - */ - public static UpdateReplicationProtectedItemProviderInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("A2A".equals(discriminatorValue)) { - return A2AUpdateReplicationProtectedItemInput.fromJson(readerToUse.reset()); - } else if ("HyperVReplicaAzure".equals(discriminatorValue)) { - return HyperVReplicaAzureUpdateReplicationProtectedItemInput.fromJson(readerToUse.reset()); - } else if ("InMageAzureV2".equals(discriminatorValue)) { - return InMageAzureV2UpdateReplicationProtectedItemInput.fromJson(readerToUse.reset()); - } else if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmUpdateReplicationProtectedItemInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static UpdateReplicationProtectedItemProviderInput fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - UpdateReplicationProtectedItemProviderInput deserializedUpdateReplicationProtectedItemProviderInput - = new UpdateReplicationProtectedItemProviderInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedUpdateReplicationProtectedItemProviderInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateReplicationProtectedItemProviderInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateReplicationProtectedItemProviderSpecificInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateReplicationProtectedItemProviderSpecificInput.java deleted file mode 100644 index fece415aeb83..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateReplicationProtectedItemProviderSpecificInput.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update replication protected item provider specific input. - */ -@Immutable -public class UpdateReplicationProtectedItemProviderSpecificInput - implements JsonSerializable { - /* - * The class type. - */ - private String instanceType = "UpdateApplianceForReplicationProtectedItemProviderSpecificInput"; - - /** - * Creates an instance of UpdateReplicationProtectedItemProviderSpecificInput class. - */ - public UpdateReplicationProtectedItemProviderSpecificInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateReplicationProtectedItemProviderSpecificInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateReplicationProtectedItemProviderSpecificInput if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateReplicationProtectedItemProviderSpecificInput. - */ - public static UpdateReplicationProtectedItemProviderSpecificInput fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("instanceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("InMageRcm".equals(discriminatorValue)) { - return InMageRcmUpdateApplianceForReplicationProtectedItemInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static UpdateReplicationProtectedItemProviderSpecificInput fromJsonKnownDiscriminator(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - UpdateReplicationProtectedItemProviderSpecificInput deserializedUpdateReplicationProtectedItemProviderSpecificInput - = new UpdateReplicationProtectedItemProviderSpecificInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedUpdateReplicationProtectedItemProviderSpecificInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateReplicationProtectedItemProviderSpecificInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateVCenterRequest.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateVCenterRequest.java deleted file mode 100644 index 4f04457b2407..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateVCenterRequest.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input required to update vCenter. - */ -@Fluent -public final class UpdateVCenterRequest implements JsonSerializable { - /* - * The update VCenter Request Properties. - */ - private UpdateVCenterRequestProperties properties; - - /** - * Creates an instance of UpdateVCenterRequest class. - */ - public UpdateVCenterRequest() { - } - - /** - * Get the properties property: The update VCenter Request Properties. - * - * @return the properties value. - */ - public UpdateVCenterRequestProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateVCenterRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateVCenterRequest if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateVCenterRequest. - */ - public static UpdateVCenterRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateVCenterRequest deserializedUpdateVCenterRequest = new UpdateVCenterRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedUpdateVCenterRequest.properties = UpdateVCenterRequestProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateVCenterRequest; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateVCenterRequestProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateVCenterRequestProperties.java deleted file mode 100644 index b918495a4eb9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/UpdateVCenterRequestProperties.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The properties of an update vCenter request. - */ -@Fluent -public final class UpdateVCenterRequestProperties implements JsonSerializable { - /* - * The friendly name of the vCenter. - */ - private String friendlyName; - - /* - * The IP address of the vCenter to be discovered. - */ - private String ipAddress; - - /* - * The process server Id from where the update can be orchestrated. - */ - private String processServerId; - - /* - * The port number for discovery. - */ - private String port; - - /* - * The CS account Id which has privileges to update the vCenter. - */ - private String runAsAccountId; - - /** - * Creates an instance of UpdateVCenterRequestProperties class. - */ - public UpdateVCenterRequestProperties() { - } - - /** - * Get the friendlyName property: The friendly name of the vCenter. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 ipAddress property: The IP address of the vCenter to be discovered. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: 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 processServerId property: The process server Id from where the update can be orchestrated. - * - * @return the processServerId value. - */ - public String processServerId() { - return this.processServerId; - } - - /** - * Set the processServerId property: 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 property: The port number for discovery. - * - * @return the port value. - */ - public String port() { - return this.port; - } - - /** - * Set the port property: 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 runAsAccountId property: The CS account Id which has privileges to update the vCenter. - * - * @return the runAsAccountId value. - */ - public String runAsAccountId() { - return this.runAsAccountId; - } - - /** - * Set the runAsAccountId property: The CS account Id which has privileges 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("processServerId", this.processServerId); - jsonWriter.writeStringField("port", this.port); - jsonWriter.writeStringField("runAsAccountId", this.runAsAccountId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateVCenterRequestProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateVCenterRequestProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateVCenterRequestProperties. - */ - public static UpdateVCenterRequestProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateVCenterRequestProperties deserializedUpdateVCenterRequestProperties - = new UpdateVCenterRequestProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedUpdateVCenterRequestProperties.friendlyName = reader.getString(); - } else if ("ipAddress".equals(fieldName)) { - deserializedUpdateVCenterRequestProperties.ipAddress = reader.getString(); - } else if ("processServerId".equals(fieldName)) { - deserializedUpdateVCenterRequestProperties.processServerId = reader.getString(); - } else if ("port".equals(fieldName)) { - deserializedUpdateVCenterRequestProperties.port = reader.getString(); - } else if ("runAsAccountId".equals(fieldName)) { - deserializedUpdateVCenterRequestProperties.runAsAccountId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateVCenterRequestProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VCenter.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VCenter.java deleted file mode 100644 index 331cbc20db7d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VCenter.java +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VCenterInner; - -/** - * An immutable client-side representation of VCenter. - */ -public interface VCenter { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: VCenter related data. - * - * @return the properties value. - */ - VCenterProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VCenterInner object. - * - * @return the inner object. - */ - VCenterInner innerModel(); - - /** - * The entirety of the VCenter definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The VCenter definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the VCenter definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the VCenter definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName, fabricName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name. - * @return the next definition stage. - */ - WithCreate withExistingReplicationFabric(String resourceName, String resourceGroupName, String fabricName); - } - - /** - * The stage of the VCenter definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - VCenter create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - VCenter create(Context context); - } - - /** - * The stage of the VCenter definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of an add vCenter request.. - * - * @param properties The properties of an add vCenter request. - * @return the next definition stage. - */ - WithCreate withProperties(AddVCenterRequestProperties properties); - } - } - - /** - * Begins update for the VCenter resource. - * - * @return the stage of resource update. - */ - VCenter.Update update(); - - /** - * The template for VCenter update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - VCenter apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - VCenter apply(Context context); - } - - /** - * The VCenter update stages. - */ - interface UpdateStages { - /** - * The stage of the VCenter update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The update VCenter Request Properties.. - * - * @param properties The update VCenter Request Properties. - * @return the next definition stage. - */ - Update withProperties(UpdateVCenterRequestProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - VCenter refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - VCenter refresh(Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VCenterCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VCenterCollection.java deleted file mode 100644 index 804815437d4d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VCenterCollection.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VCenterInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of vCenter details. - */ -@Fluent -public final class VCenterCollection implements JsonSerializable { - /* - * The vCenter details. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of VCenterCollection class. - */ - public VCenterCollection() { - } - - /** - * Get the value property: The vCenter details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The vCenter details. - * - * @param value the value value to set. - * @return the VCenterCollection object itself. - */ - public VCenterCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the VCenterCollection object itself. - */ - public VCenterCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VCenterCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VCenterCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VCenterCollection. - */ - public static VCenterCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VCenterCollection deserializedVCenterCollection = new VCenterCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> VCenterInner.fromJson(reader1)); - deserializedVCenterCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedVCenterCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVCenterCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VCenterProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VCenterProperties.java deleted file mode 100644 index c02be4dbd214..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VCenterProperties.java +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * vCenter properties. - */ -@Fluent -public final class VCenterProperties implements JsonSerializable { - /* - * Friendly name of the vCenter. - */ - private String friendlyName; - - /* - * VCenter internal ID. - */ - private String internalId; - - /* - * The time when the last heartbeat was received by vCenter. - */ - private OffsetDateTime lastHeartbeat; - - /* - * The VCenter discovery status. - */ - private String discoveryStatus; - - /* - * The process server Id. - */ - private String processServerId; - - /* - * The IP address of the vCenter. - */ - private String ipAddress; - - /* - * The infrastructure Id of vCenter. - */ - private String infrastructureId; - - /* - * The port number for discovery. - */ - private String port; - - /* - * The account Id which has privileges to discover the vCenter. - */ - private String runAsAccountId; - - /* - * The ARM resource name of the fabric containing this VCenter. - */ - private String fabricArmResourceName; - - /* - * The health errors for this VCenter. - */ - private List healthErrors; - - /** - * Creates an instance of VCenterProperties class. - */ - public VCenterProperties() { - } - - /** - * Get the friendlyName property: Friendly name of the vCenter. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: 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 the internalId property: VCenter internal ID. - * - * @return the internalId value. - */ - public String internalId() { - return this.internalId; - } - - /** - * Set the internalId property: 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 lastHeartbeat property: The time when the last heartbeat was received by vCenter. - * - * @return the lastHeartbeat value. - */ - public OffsetDateTime lastHeartbeat() { - return this.lastHeartbeat; - } - - /** - * Set the lastHeartbeat property: The time when the last heartbeat was received by vCenter. - * - * @param lastHeartbeat the lastHeartbeat value to set. - * @return the VCenterProperties object itself. - */ - public VCenterProperties withLastHeartbeat(OffsetDateTime lastHeartbeat) { - this.lastHeartbeat = lastHeartbeat; - return this; - } - - /** - * Get the discoveryStatus property: The VCenter discovery status. - * - * @return the discoveryStatus value. - */ - public String discoveryStatus() { - return this.discoveryStatus; - } - - /** - * Set the discoveryStatus property: 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 processServerId property: The process server Id. - * - * @return the processServerId value. - */ - public String processServerId() { - return this.processServerId; - } - - /** - * Set the processServerId property: 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 ipAddress property: The IP address of the vCenter. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: 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 infrastructureId property: The infrastructure Id of vCenter. - * - * @return the infrastructureId value. - */ - public String infrastructureId() { - return this.infrastructureId; - } - - /** - * Set the infrastructureId property: 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 property: The port number for discovery. - * - * @return the port value. - */ - public String port() { - return this.port; - } - - /** - * Set the port property: 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 runAsAccountId property: The account Id which has privileges to discover the vCenter. - * - * @return the runAsAccountId value. - */ - public String runAsAccountId() { - return this.runAsAccountId; - } - - /** - * Set the runAsAccountId property: 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 fabricArmResourceName property: The ARM resource name of the fabric containing this VCenter. - * - * @return the fabricArmResourceName value. - */ - public String fabricArmResourceName() { - return this.fabricArmResourceName; - } - - /** - * Set the fabricArmResourceName property: 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; - } - - /** - * Get the healthErrors property: The health errors for this VCenter. - * - * @return the healthErrors value. - */ - public List healthErrors() { - return this.healthErrors; - } - - /** - * Set the healthErrors property: The health errors for this VCenter. - * - * @param healthErrors the healthErrors value to set. - * @return the VCenterProperties object itself. - */ - public VCenterProperties withHealthErrors(List healthErrors) { - this.healthErrors = healthErrors; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (healthErrors() != null) { - healthErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("internalId", this.internalId); - jsonWriter.writeStringField("lastHeartbeat", - this.lastHeartbeat == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastHeartbeat)); - jsonWriter.writeStringField("discoveryStatus", this.discoveryStatus); - jsonWriter.writeStringField("processServerId", this.processServerId); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("infrastructureId", this.infrastructureId); - jsonWriter.writeStringField("port", this.port); - jsonWriter.writeStringField("runAsAccountId", this.runAsAccountId); - jsonWriter.writeStringField("fabricArmResourceName", this.fabricArmResourceName); - jsonWriter.writeArrayField("healthErrors", this.healthErrors, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VCenterProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VCenterProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VCenterProperties. - */ - public static VCenterProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VCenterProperties deserializedVCenterProperties = new VCenterProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("friendlyName".equals(fieldName)) { - deserializedVCenterProperties.friendlyName = reader.getString(); - } else if ("internalId".equals(fieldName)) { - deserializedVCenterProperties.internalId = reader.getString(); - } else if ("lastHeartbeat".equals(fieldName)) { - deserializedVCenterProperties.lastHeartbeat = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("discoveryStatus".equals(fieldName)) { - deserializedVCenterProperties.discoveryStatus = reader.getString(); - } else if ("processServerId".equals(fieldName)) { - deserializedVCenterProperties.processServerId = reader.getString(); - } else if ("ipAddress".equals(fieldName)) { - deserializedVCenterProperties.ipAddress = reader.getString(); - } else if ("infrastructureId".equals(fieldName)) { - deserializedVCenterProperties.infrastructureId = reader.getString(); - } else if ("port".equals(fieldName)) { - deserializedVCenterProperties.port = reader.getString(); - } else if ("runAsAccountId".equals(fieldName)) { - deserializedVCenterProperties.runAsAccountId = reader.getString(); - } else if ("fabricArmResourceName".equals(fieldName)) { - deserializedVCenterProperties.fabricArmResourceName = reader.getString(); - } else if ("healthErrors".equals(fieldName)) { - List healthErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedVCenterProperties.healthErrors = healthErrors; - } else { - reader.skipChildren(); - } - } - - return deserializedVCenterProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMNicDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMNicDetails.java deleted file mode 100644 index 2eaf277d972f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMNicDetails.java +++ /dev/null @@ -1,615 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Hyper V VM network details. - */ -@Fluent -public final class VMNicDetails implements JsonSerializable { - /* - * The nic Id. - */ - private String nicId; - - /* - * The replica nic Id. - */ - private String replicaNicId; - - /* - * The source nic ARM Id. - */ - private String sourceNicArmId; - - /* - * VM network name. - */ - private String vMNetworkName; - - /* - * Recovery VM network Id. - */ - private String recoveryVMNetworkId; - - /* - * The IP configurations of the NIC. - */ - private List ipConfigs; - - /* - * Selection type for failover. - */ - private String selectionType; - - /* - * The id of the NSG associated with the NIC. - */ - private String recoveryNetworkSecurityGroupId; - - /* - * A value indicating whether the NIC has accelerated networking enabled. - */ - private Boolean enableAcceleratedNetworkingOnRecovery; - - /* - * The network to be used by NIC during test failover. - */ - private String tfoVMNetworkId; - - /* - * The NSG to be used by NIC during test failover. - */ - private String tfoNetworkSecurityGroupId; - - /* - * Whether the TFO NIC has accelerated networking enabled. - */ - private Boolean enableAcceleratedNetworkingOnTfo; - - /* - * The name of the NIC to be used when creating target NICs. - */ - private String recoveryNicName; - - /* - * The resource group of the NIC to be used when creating target NICs. - */ - private String recoveryNicResourceGroupName; - - /* - * A value indicating whether an existing NIC is allowed to be reused during failover subject to availability. - */ - private Boolean reuseExistingNic; - - /* - * The name of the NIC to be used when creating target NICs in TFO. - */ - private String tfoRecoveryNicName; - - /* - * The resource group of the NIC to be used when creating target NICs in TFO. - */ - private String tfoRecoveryNicResourceGroupName; - - /* - * A value indicating whether an existing NIC is allowed to be reused during test failover subject to availability. - */ - private Boolean tfoReuseExistingNic; - - /* - * Target NIC name. - */ - private String targetNicName; - - /** - * Creates an instance of VMNicDetails class. - */ - public VMNicDetails() { - } - - /** - * Get the nicId property: The nic Id. - * - * @return the nicId value. - */ - public String nicId() { - return this.nicId; - } - - /** - * Set the nicId property: 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 replicaNicId property: The replica nic Id. - * - * @return the replicaNicId value. - */ - public String replicaNicId() { - return this.replicaNicId; - } - - /** - * Set the replicaNicId property: 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 sourceNicArmId property: The source nic ARM Id. - * - * @return the sourceNicArmId value. - */ - public String sourceNicArmId() { - return this.sourceNicArmId; - } - - /** - * Set the sourceNicArmId property: 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 the vMNetworkName property: VM network name. - * - * @return the vMNetworkName value. - */ - public String vMNetworkName() { - return this.vMNetworkName; - } - - /** - * Set the vMNetworkName property: 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 the recoveryVMNetworkId property: Recovery VM network Id. - * - * @return the recoveryVMNetworkId value. - */ - public String recoveryVMNetworkId() { - return this.recoveryVMNetworkId; - } - - /** - * Set the recoveryVMNetworkId property: 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 the ipConfigs property: The IP configurations of the NIC. - * - * @return the ipConfigs value. - */ - public List ipConfigs() { - return this.ipConfigs; - } - - /** - * Set the ipConfigs property: The IP configurations of the NIC. - * - * @param ipConfigs the ipConfigs value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withIpConfigs(List ipConfigs) { - this.ipConfigs = ipConfigs; - return this; - } - - /** - * Get the selectionType property: Selection type for failover. - * - * @return the selectionType value. - */ - public String selectionType() { - return this.selectionType; - } - - /** - * Set the selectionType property: 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 the recoveryNetworkSecurityGroupId property: The id of the NSG associated with the NIC. - * - * @return the recoveryNetworkSecurityGroupId value. - */ - public String recoveryNetworkSecurityGroupId() { - return this.recoveryNetworkSecurityGroupId; - } - - /** - * Set the recoveryNetworkSecurityGroupId property: The id of the NSG associated with the NIC. - * - * @param recoveryNetworkSecurityGroupId the recoveryNetworkSecurityGroupId value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withRecoveryNetworkSecurityGroupId(String recoveryNetworkSecurityGroupId) { - this.recoveryNetworkSecurityGroupId = recoveryNetworkSecurityGroupId; - return this; - } - - /** - * Get the enableAcceleratedNetworkingOnRecovery property: A value indicating whether the NIC has accelerated - * networking enabled. - * - * @return the enableAcceleratedNetworkingOnRecovery value. - */ - public Boolean enableAcceleratedNetworkingOnRecovery() { - return this.enableAcceleratedNetworkingOnRecovery; - } - - /** - * Set the enableAcceleratedNetworkingOnRecovery property: A value indicating whether the NIC has accelerated - * networking enabled. - * - * @param enableAcceleratedNetworkingOnRecovery the enableAcceleratedNetworkingOnRecovery value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withEnableAcceleratedNetworkingOnRecovery(Boolean enableAcceleratedNetworkingOnRecovery) { - this.enableAcceleratedNetworkingOnRecovery = enableAcceleratedNetworkingOnRecovery; - return this; - } - - /** - * Get the tfoVMNetworkId property: The network to be used by NIC during test failover. - * - * @return the tfoVMNetworkId value. - */ - public String tfoVMNetworkId() { - return this.tfoVMNetworkId; - } - - /** - * Set the tfoVMNetworkId property: The network to be used by NIC during test failover. - * - * @param tfoVMNetworkId the tfoVMNetworkId value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withTfoVMNetworkId(String tfoVMNetworkId) { - this.tfoVMNetworkId = tfoVMNetworkId; - return this; - } - - /** - * Get the tfoNetworkSecurityGroupId property: The NSG to be used by NIC during test failover. - * - * @return the tfoNetworkSecurityGroupId value. - */ - public String tfoNetworkSecurityGroupId() { - return this.tfoNetworkSecurityGroupId; - } - - /** - * Set the tfoNetworkSecurityGroupId property: The NSG to be used by NIC during test failover. - * - * @param tfoNetworkSecurityGroupId the tfoNetworkSecurityGroupId value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withTfoNetworkSecurityGroupId(String tfoNetworkSecurityGroupId) { - this.tfoNetworkSecurityGroupId = tfoNetworkSecurityGroupId; - return this; - } - - /** - * Get the enableAcceleratedNetworkingOnTfo property: Whether the TFO NIC has accelerated networking enabled. - * - * @return the enableAcceleratedNetworkingOnTfo value. - */ - public Boolean enableAcceleratedNetworkingOnTfo() { - return this.enableAcceleratedNetworkingOnTfo; - } - - /** - * Set the enableAcceleratedNetworkingOnTfo property: Whether the TFO NIC has accelerated networking enabled. - * - * @param enableAcceleratedNetworkingOnTfo the enableAcceleratedNetworkingOnTfo value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withEnableAcceleratedNetworkingOnTfo(Boolean enableAcceleratedNetworkingOnTfo) { - this.enableAcceleratedNetworkingOnTfo = enableAcceleratedNetworkingOnTfo; - return this; - } - - /** - * Get the recoveryNicName property: The name of the NIC to be used when creating target NICs. - * - * @return the recoveryNicName value. - */ - public String recoveryNicName() { - return this.recoveryNicName; - } - - /** - * Set the recoveryNicName property: The name of the NIC to be used when creating target NICs. - * - * @param recoveryNicName the recoveryNicName value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withRecoveryNicName(String recoveryNicName) { - this.recoveryNicName = recoveryNicName; - return this; - } - - /** - * Get the recoveryNicResourceGroupName property: The resource group of the NIC to be used when creating target - * NICs. - * - * @return the recoveryNicResourceGroupName value. - */ - public String recoveryNicResourceGroupName() { - return this.recoveryNicResourceGroupName; - } - - /** - * Set the recoveryNicResourceGroupName property: The resource group of the NIC to be used when creating target - * NICs. - * - * @param recoveryNicResourceGroupName the recoveryNicResourceGroupName value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withRecoveryNicResourceGroupName(String recoveryNicResourceGroupName) { - this.recoveryNicResourceGroupName = recoveryNicResourceGroupName; - return this; - } - - /** - * Get the reuseExistingNic property: A value indicating whether an existing NIC is allowed to be reused during - * failover subject to availability. - * - * @return the reuseExistingNic value. - */ - public Boolean reuseExistingNic() { - return this.reuseExistingNic; - } - - /** - * Set the reuseExistingNic property: A value indicating whether an existing NIC is allowed to be reused during - * failover subject to availability. - * - * @param reuseExistingNic the reuseExistingNic value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withReuseExistingNic(Boolean reuseExistingNic) { - this.reuseExistingNic = reuseExistingNic; - return this; - } - - /** - * Get the tfoRecoveryNicName property: The name of the NIC to be used when creating target NICs in TFO. - * - * @return the tfoRecoveryNicName value. - */ - public String tfoRecoveryNicName() { - return this.tfoRecoveryNicName; - } - - /** - * Set the tfoRecoveryNicName property: The name of the NIC to be used when creating target NICs in TFO. - * - * @param tfoRecoveryNicName the tfoRecoveryNicName value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withTfoRecoveryNicName(String tfoRecoveryNicName) { - this.tfoRecoveryNicName = tfoRecoveryNicName; - return this; - } - - /** - * Get the tfoRecoveryNicResourceGroupName property: The resource group of the NIC to be used when creating target - * NICs in TFO. - * - * @return the tfoRecoveryNicResourceGroupName value. - */ - public String tfoRecoveryNicResourceGroupName() { - return this.tfoRecoveryNicResourceGroupName; - } - - /** - * Set the tfoRecoveryNicResourceGroupName property: The resource group of the NIC to be used when creating target - * NICs in TFO. - * - * @param tfoRecoveryNicResourceGroupName the tfoRecoveryNicResourceGroupName value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withTfoRecoveryNicResourceGroupName(String tfoRecoveryNicResourceGroupName) { - this.tfoRecoveryNicResourceGroupName = tfoRecoveryNicResourceGroupName; - return this; - } - - /** - * Get the tfoReuseExistingNic property: A value indicating whether an existing NIC is allowed to be reused during - * test failover subject to availability. - * - * @return the tfoReuseExistingNic value. - */ - public Boolean tfoReuseExistingNic() { - return this.tfoReuseExistingNic; - } - - /** - * Set the tfoReuseExistingNic property: A value indicating whether an existing NIC is allowed to be reused during - * test failover subject to availability. - * - * @param tfoReuseExistingNic the tfoReuseExistingNic value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withTfoReuseExistingNic(Boolean tfoReuseExistingNic) { - this.tfoReuseExistingNic = tfoReuseExistingNic; - return this; - } - - /** - * Get the targetNicName property: Target NIC name. - * - * @return the targetNicName value. - */ - public String targetNicName() { - return this.targetNicName; - } - - /** - * Set the targetNicName property: Target NIC name. - * - * @param targetNicName the targetNicName value to set. - * @return the VMNicDetails object itself. - */ - public VMNicDetails withTargetNicName(String targetNicName) { - this.targetNicName = targetNicName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipConfigs() != null) { - ipConfigs().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nicId", this.nicId); - jsonWriter.writeStringField("replicaNicId", this.replicaNicId); - jsonWriter.writeStringField("sourceNicArmId", this.sourceNicArmId); - jsonWriter.writeStringField("vMNetworkName", this.vMNetworkName); - jsonWriter.writeStringField("recoveryVMNetworkId", this.recoveryVMNetworkId); - jsonWriter.writeArrayField("ipConfigs", this.ipConfigs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("selectionType", this.selectionType); - jsonWriter.writeStringField("recoveryNetworkSecurityGroupId", this.recoveryNetworkSecurityGroupId); - jsonWriter.writeBooleanField("enableAcceleratedNetworkingOnRecovery", - this.enableAcceleratedNetworkingOnRecovery); - jsonWriter.writeStringField("tfoVMNetworkId", this.tfoVMNetworkId); - jsonWriter.writeStringField("tfoNetworkSecurityGroupId", this.tfoNetworkSecurityGroupId); - jsonWriter.writeBooleanField("enableAcceleratedNetworkingOnTfo", this.enableAcceleratedNetworkingOnTfo); - jsonWriter.writeStringField("recoveryNicName", this.recoveryNicName); - jsonWriter.writeStringField("recoveryNicResourceGroupName", this.recoveryNicResourceGroupName); - jsonWriter.writeBooleanField("reuseExistingNic", this.reuseExistingNic); - jsonWriter.writeStringField("tfoRecoveryNicName", this.tfoRecoveryNicName); - jsonWriter.writeStringField("tfoRecoveryNicResourceGroupName", this.tfoRecoveryNicResourceGroupName); - jsonWriter.writeBooleanField("tfoReuseExistingNic", this.tfoReuseExistingNic); - jsonWriter.writeStringField("targetNicName", this.targetNicName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMNicDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMNicDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VMNicDetails. - */ - public static VMNicDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMNicDetails deserializedVMNicDetails = new VMNicDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nicId".equals(fieldName)) { - deserializedVMNicDetails.nicId = reader.getString(); - } else if ("replicaNicId".equals(fieldName)) { - deserializedVMNicDetails.replicaNicId = reader.getString(); - } else if ("sourceNicArmId".equals(fieldName)) { - deserializedVMNicDetails.sourceNicArmId = reader.getString(); - } else if ("vMNetworkName".equals(fieldName)) { - deserializedVMNicDetails.vMNetworkName = reader.getString(); - } else if ("recoveryVMNetworkId".equals(fieldName)) { - deserializedVMNicDetails.recoveryVMNetworkId = reader.getString(); - } else if ("ipConfigs".equals(fieldName)) { - List ipConfigs = reader.readArray(reader1 -> IpConfigDetails.fromJson(reader1)); - deserializedVMNicDetails.ipConfigs = ipConfigs; - } else if ("selectionType".equals(fieldName)) { - deserializedVMNicDetails.selectionType = reader.getString(); - } else if ("recoveryNetworkSecurityGroupId".equals(fieldName)) { - deserializedVMNicDetails.recoveryNetworkSecurityGroupId = reader.getString(); - } else if ("enableAcceleratedNetworkingOnRecovery".equals(fieldName)) { - deserializedVMNicDetails.enableAcceleratedNetworkingOnRecovery - = reader.getNullable(JsonReader::getBoolean); - } else if ("tfoVMNetworkId".equals(fieldName)) { - deserializedVMNicDetails.tfoVMNetworkId = reader.getString(); - } else if ("tfoNetworkSecurityGroupId".equals(fieldName)) { - deserializedVMNicDetails.tfoNetworkSecurityGroupId = reader.getString(); - } else if ("enableAcceleratedNetworkingOnTfo".equals(fieldName)) { - deserializedVMNicDetails.enableAcceleratedNetworkingOnTfo - = reader.getNullable(JsonReader::getBoolean); - } else if ("recoveryNicName".equals(fieldName)) { - deserializedVMNicDetails.recoveryNicName = reader.getString(); - } else if ("recoveryNicResourceGroupName".equals(fieldName)) { - deserializedVMNicDetails.recoveryNicResourceGroupName = reader.getString(); - } else if ("reuseExistingNic".equals(fieldName)) { - deserializedVMNicDetails.reuseExistingNic = reader.getNullable(JsonReader::getBoolean); - } else if ("tfoRecoveryNicName".equals(fieldName)) { - deserializedVMNicDetails.tfoRecoveryNicName = reader.getString(); - } else if ("tfoRecoveryNicResourceGroupName".equals(fieldName)) { - deserializedVMNicDetails.tfoRecoveryNicResourceGroupName = reader.getString(); - } else if ("tfoReuseExistingNic".equals(fieldName)) { - deserializedVMNicDetails.tfoReuseExistingNic = reader.getNullable(JsonReader::getBoolean); - } else if ("targetNicName".equals(fieldName)) { - deserializedVMNicDetails.targetNicName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMNicDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMNicInputDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMNicInputDetails.java deleted file mode 100644 index bca52e387563..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMNicInputDetails.java +++ /dev/null @@ -1,474 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Hyper V VM network input details. - */ -@Fluent -public final class VMNicInputDetails implements JsonSerializable { - /* - * The nic Id. - */ - private String nicId; - - /* - * The IP configurations to be used by NIC during test failover and failover. - */ - private List ipConfigs; - - /* - * Selection type for failover. - */ - private String selectionType; - - /* - * The id of the NSG associated with the NIC. - */ - private String recoveryNetworkSecurityGroupId; - - /* - * Whether the NIC has accelerated networking enabled. - */ - private Boolean enableAcceleratedNetworkingOnRecovery; - - /* - * The NSG to be used by NIC during test failover. - */ - private String tfoNetworkSecurityGroupId; - - /* - * Whether the test NIC has accelerated networking enabled. - */ - private Boolean enableAcceleratedNetworkingOnTfo; - - /* - * The name of the NIC to be used when creating target NICs. - */ - private String recoveryNicName; - - /* - * The resource group of the NIC to be used when creating target NICs. - */ - private String recoveryNicResourceGroupName; - - /* - * A value indicating whether an existing NIC is allowed to be reused during failover subject to availability. - */ - private Boolean reuseExistingNic; - - /* - * The name of the NIC to be used when creating target NICs in TFO. - */ - private String tfoNicName; - - /* - * The resource group of the NIC to be used when creating target NICs in TFO. - */ - private String tfoNicResourceGroupName; - - /* - * A value indicating whether an existing NIC is allowed to be reused during test failover subject to availability. - */ - private Boolean tfoReuseExistingNic; - - /* - * Target NIC name. - */ - private String targetNicName; - - /** - * Creates an instance of VMNicInputDetails class. - */ - public VMNicInputDetails() { - } - - /** - * Get the nicId property: The nic Id. - * - * @return the nicId value. - */ - public String nicId() { - return this.nicId; - } - - /** - * Set the nicId property: 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 the ipConfigs property: The IP configurations to be used by NIC during test failover and failover. - * - * @return the ipConfigs value. - */ - public List ipConfigs() { - return this.ipConfigs; - } - - /** - * Set the ipConfigs property: The IP configurations to be used by NIC during test failover and failover. - * - * @param ipConfigs the ipConfigs value to set. - * @return the VMNicInputDetails object itself. - */ - public VMNicInputDetails withIpConfigs(List ipConfigs) { - this.ipConfigs = ipConfigs; - return this; - } - - /** - * Get the selectionType property: Selection type for failover. - * - * @return the selectionType value. - */ - public String selectionType() { - return this.selectionType; - } - - /** - * Set the selectionType property: 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; - } - - /** - * Get the recoveryNetworkSecurityGroupId property: The id of the NSG associated with the NIC. - * - * @return the recoveryNetworkSecurityGroupId value. - */ - public String recoveryNetworkSecurityGroupId() { - return this.recoveryNetworkSecurityGroupId; - } - - /** - * Set the recoveryNetworkSecurityGroupId property: The id of the NSG associated with the NIC. - * - * @param recoveryNetworkSecurityGroupId the recoveryNetworkSecurityGroupId value to set. - * @return the VMNicInputDetails object itself. - */ - public VMNicInputDetails withRecoveryNetworkSecurityGroupId(String recoveryNetworkSecurityGroupId) { - this.recoveryNetworkSecurityGroupId = recoveryNetworkSecurityGroupId; - return this; - } - - /** - * Get the enableAcceleratedNetworkingOnRecovery property: Whether the NIC has accelerated networking enabled. - * - * @return the enableAcceleratedNetworkingOnRecovery value. - */ - public Boolean enableAcceleratedNetworkingOnRecovery() { - return this.enableAcceleratedNetworkingOnRecovery; - } - - /** - * Set the enableAcceleratedNetworkingOnRecovery property: Whether the NIC has accelerated networking enabled. - * - * @param enableAcceleratedNetworkingOnRecovery the enableAcceleratedNetworkingOnRecovery value to set. - * @return the VMNicInputDetails object itself. - */ - public VMNicInputDetails withEnableAcceleratedNetworkingOnRecovery(Boolean enableAcceleratedNetworkingOnRecovery) { - this.enableAcceleratedNetworkingOnRecovery = enableAcceleratedNetworkingOnRecovery; - return this; - } - - /** - * Get the tfoNetworkSecurityGroupId property: The NSG to be used by NIC during test failover. - * - * @return the tfoNetworkSecurityGroupId value. - */ - public String tfoNetworkSecurityGroupId() { - return this.tfoNetworkSecurityGroupId; - } - - /** - * Set the tfoNetworkSecurityGroupId property: The NSG to be used by NIC during test failover. - * - * @param tfoNetworkSecurityGroupId the tfoNetworkSecurityGroupId value to set. - * @return the VMNicInputDetails object itself. - */ - public VMNicInputDetails withTfoNetworkSecurityGroupId(String tfoNetworkSecurityGroupId) { - this.tfoNetworkSecurityGroupId = tfoNetworkSecurityGroupId; - return this; - } - - /** - * Get the enableAcceleratedNetworkingOnTfo property: Whether the test NIC has accelerated networking enabled. - * - * @return the enableAcceleratedNetworkingOnTfo value. - */ - public Boolean enableAcceleratedNetworkingOnTfo() { - return this.enableAcceleratedNetworkingOnTfo; - } - - /** - * Set the enableAcceleratedNetworkingOnTfo property: Whether the test NIC has accelerated networking enabled. - * - * @param enableAcceleratedNetworkingOnTfo the enableAcceleratedNetworkingOnTfo value to set. - * @return the VMNicInputDetails object itself. - */ - public VMNicInputDetails withEnableAcceleratedNetworkingOnTfo(Boolean enableAcceleratedNetworkingOnTfo) { - this.enableAcceleratedNetworkingOnTfo = enableAcceleratedNetworkingOnTfo; - return this; - } - - /** - * Get the recoveryNicName property: The name of the NIC to be used when creating target NICs. - * - * @return the recoveryNicName value. - */ - public String recoveryNicName() { - return this.recoveryNicName; - } - - /** - * Set the recoveryNicName property: The name of the NIC to be used when creating target NICs. - * - * @param recoveryNicName the recoveryNicName value to set. - * @return the VMNicInputDetails object itself. - */ - public VMNicInputDetails withRecoveryNicName(String recoveryNicName) { - this.recoveryNicName = recoveryNicName; - return this; - } - - /** - * Get the recoveryNicResourceGroupName property: The resource group of the NIC to be used when creating target - * NICs. - * - * @return the recoveryNicResourceGroupName value. - */ - public String recoveryNicResourceGroupName() { - return this.recoveryNicResourceGroupName; - } - - /** - * Set the recoveryNicResourceGroupName property: The resource group of the NIC to be used when creating target - * NICs. - * - * @param recoveryNicResourceGroupName the recoveryNicResourceGroupName value to set. - * @return the VMNicInputDetails object itself. - */ - public VMNicInputDetails withRecoveryNicResourceGroupName(String recoveryNicResourceGroupName) { - this.recoveryNicResourceGroupName = recoveryNicResourceGroupName; - return this; - } - - /** - * Get the reuseExistingNic property: A value indicating whether an existing NIC is allowed to be reused during - * failover subject to availability. - * - * @return the reuseExistingNic value. - */ - public Boolean reuseExistingNic() { - return this.reuseExistingNic; - } - - /** - * Set the reuseExistingNic property: A value indicating whether an existing NIC is allowed to be reused during - * failover subject to availability. - * - * @param reuseExistingNic the reuseExistingNic value to set. - * @return the VMNicInputDetails object itself. - */ - public VMNicInputDetails withReuseExistingNic(Boolean reuseExistingNic) { - this.reuseExistingNic = reuseExistingNic; - return this; - } - - /** - * Get the tfoNicName property: The name of the NIC to be used when creating target NICs in TFO. - * - * @return the tfoNicName value. - */ - public String tfoNicName() { - return this.tfoNicName; - } - - /** - * Set the tfoNicName property: The name of the NIC to be used when creating target NICs in TFO. - * - * @param tfoNicName the tfoNicName value to set. - * @return the VMNicInputDetails object itself. - */ - public VMNicInputDetails withTfoNicName(String tfoNicName) { - this.tfoNicName = tfoNicName; - return this; - } - - /** - * Get the tfoNicResourceGroupName property: The resource group of the NIC to be used when creating target NICs in - * TFO. - * - * @return the tfoNicResourceGroupName value. - */ - public String tfoNicResourceGroupName() { - return this.tfoNicResourceGroupName; - } - - /** - * Set the tfoNicResourceGroupName property: The resource group of the NIC to be used when creating target NICs in - * TFO. - * - * @param tfoNicResourceGroupName the tfoNicResourceGroupName value to set. - * @return the VMNicInputDetails object itself. - */ - public VMNicInputDetails withTfoNicResourceGroupName(String tfoNicResourceGroupName) { - this.tfoNicResourceGroupName = tfoNicResourceGroupName; - return this; - } - - /** - * Get the tfoReuseExistingNic property: A value indicating whether an existing NIC is allowed to be reused during - * test failover subject to availability. - * - * @return the tfoReuseExistingNic value. - */ - public Boolean tfoReuseExistingNic() { - return this.tfoReuseExistingNic; - } - - /** - * Set the tfoReuseExistingNic property: A value indicating whether an existing NIC is allowed to be reused during - * test failover subject to availability. - * - * @param tfoReuseExistingNic the tfoReuseExistingNic value to set. - * @return the VMNicInputDetails object itself. - */ - public VMNicInputDetails withTfoReuseExistingNic(Boolean tfoReuseExistingNic) { - this.tfoReuseExistingNic = tfoReuseExistingNic; - return this; - } - - /** - * Get the targetNicName property: Target NIC name. - * - * @return the targetNicName value. - */ - public String targetNicName() { - return this.targetNicName; - } - - /** - * Set the targetNicName property: Target NIC name. - * - * @param targetNicName the targetNicName value to set. - * @return the VMNicInputDetails object itself. - */ - public VMNicInputDetails withTargetNicName(String targetNicName) { - this.targetNicName = targetNicName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipConfigs() != null) { - ipConfigs().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nicId", this.nicId); - jsonWriter.writeArrayField("ipConfigs", this.ipConfigs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("selectionType", this.selectionType); - jsonWriter.writeStringField("recoveryNetworkSecurityGroupId", this.recoveryNetworkSecurityGroupId); - jsonWriter.writeBooleanField("enableAcceleratedNetworkingOnRecovery", - this.enableAcceleratedNetworkingOnRecovery); - jsonWriter.writeStringField("tfoNetworkSecurityGroupId", this.tfoNetworkSecurityGroupId); - jsonWriter.writeBooleanField("enableAcceleratedNetworkingOnTfo", this.enableAcceleratedNetworkingOnTfo); - jsonWriter.writeStringField("recoveryNicName", this.recoveryNicName); - jsonWriter.writeStringField("recoveryNicResourceGroupName", this.recoveryNicResourceGroupName); - jsonWriter.writeBooleanField("reuseExistingNic", this.reuseExistingNic); - jsonWriter.writeStringField("tfoNicName", this.tfoNicName); - jsonWriter.writeStringField("tfoNicResourceGroupName", this.tfoNicResourceGroupName); - jsonWriter.writeBooleanField("tfoReuseExistingNic", this.tfoReuseExistingNic); - jsonWriter.writeStringField("targetNicName", this.targetNicName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMNicInputDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMNicInputDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VMNicInputDetails. - */ - public static VMNicInputDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMNicInputDetails deserializedVMNicInputDetails = new VMNicInputDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nicId".equals(fieldName)) { - deserializedVMNicInputDetails.nicId = reader.getString(); - } else if ("ipConfigs".equals(fieldName)) { - List ipConfigs - = reader.readArray(reader1 -> IpConfigInputDetails.fromJson(reader1)); - deserializedVMNicInputDetails.ipConfigs = ipConfigs; - } else if ("selectionType".equals(fieldName)) { - deserializedVMNicInputDetails.selectionType = reader.getString(); - } else if ("recoveryNetworkSecurityGroupId".equals(fieldName)) { - deserializedVMNicInputDetails.recoveryNetworkSecurityGroupId = reader.getString(); - } else if ("enableAcceleratedNetworkingOnRecovery".equals(fieldName)) { - deserializedVMNicInputDetails.enableAcceleratedNetworkingOnRecovery - = reader.getNullable(JsonReader::getBoolean); - } else if ("tfoNetworkSecurityGroupId".equals(fieldName)) { - deserializedVMNicInputDetails.tfoNetworkSecurityGroupId = reader.getString(); - } else if ("enableAcceleratedNetworkingOnTfo".equals(fieldName)) { - deserializedVMNicInputDetails.enableAcceleratedNetworkingOnTfo - = reader.getNullable(JsonReader::getBoolean); - } else if ("recoveryNicName".equals(fieldName)) { - deserializedVMNicInputDetails.recoveryNicName = reader.getString(); - } else if ("recoveryNicResourceGroupName".equals(fieldName)) { - deserializedVMNicInputDetails.recoveryNicResourceGroupName = reader.getString(); - } else if ("reuseExistingNic".equals(fieldName)) { - deserializedVMNicInputDetails.reuseExistingNic = reader.getNullable(JsonReader::getBoolean); - } else if ("tfoNicName".equals(fieldName)) { - deserializedVMNicInputDetails.tfoNicName = reader.getString(); - } else if ("tfoNicResourceGroupName".equals(fieldName)) { - deserializedVMNicInputDetails.tfoNicResourceGroupName = reader.getString(); - } else if ("tfoReuseExistingNic".equals(fieldName)) { - deserializedVMNicInputDetails.tfoReuseExistingNic = reader.getNullable(JsonReader::getBoolean); - } else if ("targetNicName".equals(fieldName)) { - deserializedVMNicInputDetails.targetNicName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMNicInputDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtContainerCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtContainerCreationInput.java deleted file mode 100644 index 307508e2ce38..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtContainerCreationInput.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMwareCbt container creation input. - */ -@Immutable -public final class VMwareCbtContainerCreationInput extends ReplicationProviderSpecificContainerCreationInput { - /* - * The class type. - */ - private String instanceType = "VMwareCbt"; - - /** - * Creates an instance of VMwareCbtContainerCreationInput class. - */ - public VMwareCbtContainerCreationInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtContainerCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtContainerCreationInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareCbtContainerCreationInput. - */ - public static VMwareCbtContainerCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtContainerCreationInput deserializedVMwareCbtContainerCreationInput - = new VMwareCbtContainerCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVMwareCbtContainerCreationInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtContainerCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtContainerMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtContainerMappingInput.java deleted file mode 100644 index 2459b6294763..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtContainerMappingInput.java +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMwareCbt container mapping input. - */ -@Fluent -public final class VMwareCbtContainerMappingInput extends ReplicationProviderSpecificContainerMappingInput { - /* - * The class type. - */ - private String instanceType = "VMwareCbt"; - - /* - * The target key vault ARM Id. - */ - private String keyVaultId; - - /* - * The target key vault URL. - */ - private String keyVaultUri; - - /* - * The storage account ARM Id. - */ - private String storageAccountId; - - /* - * The secret name of the storage account. - */ - private String storageAccountSasSecretName; - - /* - * The secret name of the service bus connection string. - */ - private String serviceBusConnectionStringSecretName; - - /* - * The target location. - */ - private String targetLocation; - - /** - * Creates an instance of VMwareCbtContainerMappingInput class. - */ - public VMwareCbtContainerMappingInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the keyVaultId property: The target key vault ARM Id. - * - * @return the keyVaultId value. - */ - public String keyVaultId() { - return this.keyVaultId; - } - - /** - * Set the keyVaultId property: The target key vault ARM Id. - * - * @param keyVaultId the keyVaultId value to set. - * @return the VMwareCbtContainerMappingInput object itself. - */ - public VMwareCbtContainerMappingInput withKeyVaultId(String keyVaultId) { - this.keyVaultId = keyVaultId; - return this; - } - - /** - * Get the keyVaultUri property: The target key vault URL. - * - * @return the keyVaultUri value. - */ - public String keyVaultUri() { - return this.keyVaultUri; - } - - /** - * Set the keyVaultUri property: The target key vault URL. - * - * @param keyVaultUri the keyVaultUri value to set. - * @return the VMwareCbtContainerMappingInput object itself. - */ - public VMwareCbtContainerMappingInput withKeyVaultUri(String keyVaultUri) { - this.keyVaultUri = keyVaultUri; - return this; - } - - /** - * Get the storageAccountId property: The storage account ARM Id. - * - * @return the storageAccountId value. - */ - public String storageAccountId() { - return this.storageAccountId; - } - - /** - * Set the storageAccountId property: The storage account ARM Id. - * - * @param storageAccountId the storageAccountId value to set. - * @return the VMwareCbtContainerMappingInput object itself. - */ - public VMwareCbtContainerMappingInput withStorageAccountId(String storageAccountId) { - this.storageAccountId = storageAccountId; - return this; - } - - /** - * Get the storageAccountSasSecretName property: The secret name of the storage account. - * - * @return the storageAccountSasSecretName value. - */ - public String storageAccountSasSecretName() { - return this.storageAccountSasSecretName; - } - - /** - * Set the storageAccountSasSecretName property: The secret name of the storage account. - * - * @param storageAccountSasSecretName the storageAccountSasSecretName value to set. - * @return the VMwareCbtContainerMappingInput object itself. - */ - public VMwareCbtContainerMappingInput withStorageAccountSasSecretName(String storageAccountSasSecretName) { - this.storageAccountSasSecretName = storageAccountSasSecretName; - return this; - } - - /** - * Get the serviceBusConnectionStringSecretName property: The secret name of the service bus connection string. - * - * @return the serviceBusConnectionStringSecretName value. - */ - public String serviceBusConnectionStringSecretName() { - return this.serviceBusConnectionStringSecretName; - } - - /** - * Set the serviceBusConnectionStringSecretName property: The secret name of the service bus connection string. - * - * @param serviceBusConnectionStringSecretName the serviceBusConnectionStringSecretName value to set. - * @return the VMwareCbtContainerMappingInput object itself. - */ - public VMwareCbtContainerMappingInput - withServiceBusConnectionStringSecretName(String serviceBusConnectionStringSecretName) { - this.serviceBusConnectionStringSecretName = serviceBusConnectionStringSecretName; - return this; - } - - /** - * Get the targetLocation property: The target location. - * - * @return the targetLocation value. - */ - public String targetLocation() { - return this.targetLocation; - } - - /** - * Set the targetLocation property: The target location. - * - * @param targetLocation the targetLocation value to set. - * @return the VMwareCbtContainerMappingInput object itself. - */ - public VMwareCbtContainerMappingInput withTargetLocation(String targetLocation) { - this.targetLocation = targetLocation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (storageAccountId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property storageAccountId in model VMwareCbtContainerMappingInput")); - } - if (targetLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetLocation in model VMwareCbtContainerMappingInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VMwareCbtContainerMappingInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("storageAccountId", this.storageAccountId); - jsonWriter.writeStringField("targetLocation", this.targetLocation); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("keyVaultId", this.keyVaultId); - jsonWriter.writeStringField("keyVaultUri", this.keyVaultUri); - jsonWriter.writeStringField("storageAccountSasSecretName", this.storageAccountSasSecretName); - jsonWriter.writeStringField("serviceBusConnectionStringSecretName", this.serviceBusConnectionStringSecretName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtContainerMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtContainerMappingInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VMwareCbtContainerMappingInput. - */ - public static VMwareCbtContainerMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtContainerMappingInput deserializedVMwareCbtContainerMappingInput - = new VMwareCbtContainerMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("storageAccountId".equals(fieldName)) { - deserializedVMwareCbtContainerMappingInput.storageAccountId = reader.getString(); - } else if ("targetLocation".equals(fieldName)) { - deserializedVMwareCbtContainerMappingInput.targetLocation = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedVMwareCbtContainerMappingInput.instanceType = reader.getString(); - } else if ("keyVaultId".equals(fieldName)) { - deserializedVMwareCbtContainerMappingInput.keyVaultId = reader.getString(); - } else if ("keyVaultUri".equals(fieldName)) { - deserializedVMwareCbtContainerMappingInput.keyVaultUri = reader.getString(); - } else if ("storageAccountSasSecretName".equals(fieldName)) { - deserializedVMwareCbtContainerMappingInput.storageAccountSasSecretName = reader.getString(); - } else if ("serviceBusConnectionStringSecretName".equals(fieldName)) { - deserializedVMwareCbtContainerMappingInput.serviceBusConnectionStringSecretName - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtContainerMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtDiskInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtDiskInput.java deleted file mode 100644 index 43b5a0bb9208..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtDiskInput.java +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMwareCbt disk input. - */ -@Fluent -public final class VMwareCbtDiskInput implements JsonSerializable { - /* - * The disk Id. - */ - private String diskId; - - /* - * The disk type. - */ - private DiskAccountType diskType; - - /* - * A value indicating whether the disk is the OS disk. - */ - private String isOSDisk; - - /* - * The log storage account ARM Id. - */ - private String logStorageAccountId; - - /* - * The key vault secret name of the log storage account. - */ - private String logStorageAccountSasSecretName; - - /* - * The DiskEncryptionSet ARM Id. - */ - private String diskEncryptionSetId; - - /** - * Creates an instance of VMwareCbtDiskInput class. - */ - public VMwareCbtDiskInput() { - } - - /** - * Get the diskId property: The disk Id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: The disk Id. - * - * @param diskId the diskId value to set. - * @return the VMwareCbtDiskInput object itself. - */ - public VMwareCbtDiskInput withDiskId(String diskId) { - this.diskId = diskId; - return this; - } - - /** - * Get the diskType property: The disk type. - * - * @return the diskType value. - */ - public DiskAccountType diskType() { - return this.diskType; - } - - /** - * Set the diskType property: The disk type. - * - * @param diskType the diskType value to set. - * @return the VMwareCbtDiskInput object itself. - */ - public VMwareCbtDiskInput withDiskType(DiskAccountType diskType) { - this.diskType = diskType; - return this; - } - - /** - * Get the isOSDisk property: A value indicating whether the disk is the OS disk. - * - * @return the isOSDisk value. - */ - public String isOSDisk() { - return this.isOSDisk; - } - - /** - * Set the isOSDisk property: A value indicating whether the disk is the OS disk. - * - * @param isOSDisk the isOSDisk value to set. - * @return the VMwareCbtDiskInput object itself. - */ - public VMwareCbtDiskInput withIsOSDisk(String isOSDisk) { - this.isOSDisk = isOSDisk; - return this; - } - - /** - * Get the logStorageAccountId property: The log storage account ARM Id. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Set the logStorageAccountId property: The log storage account ARM Id. - * - * @param logStorageAccountId the logStorageAccountId value to set. - * @return the VMwareCbtDiskInput object itself. - */ - public VMwareCbtDiskInput withLogStorageAccountId(String logStorageAccountId) { - this.logStorageAccountId = logStorageAccountId; - return this; - } - - /** - * Get the logStorageAccountSasSecretName property: The key vault secret name of the log storage account. - * - * @return the logStorageAccountSasSecretName value. - */ - public String logStorageAccountSasSecretName() { - return this.logStorageAccountSasSecretName; - } - - /** - * Set the logStorageAccountSasSecretName property: The key vault secret name of the log storage account. - * - * @param logStorageAccountSasSecretName the logStorageAccountSasSecretName value to set. - * @return the VMwareCbtDiskInput object itself. - */ - public VMwareCbtDiskInput withLogStorageAccountSasSecretName(String logStorageAccountSasSecretName) { - this.logStorageAccountSasSecretName = logStorageAccountSasSecretName; - return this; - } - - /** - * Get the diskEncryptionSetId property: The DiskEncryptionSet ARM Id. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Set the diskEncryptionSetId property: The DiskEncryptionSet ARM Id. - * - * @param diskEncryptionSetId the diskEncryptionSetId value to set. - * @return the VMwareCbtDiskInput object itself. - */ - public VMwareCbtDiskInput withDiskEncryptionSetId(String diskEncryptionSetId) { - this.diskEncryptionSetId = diskEncryptionSetId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property diskId in model VMwareCbtDiskInput")); - } - if (isOSDisk() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property isOSDisk in model VMwareCbtDiskInput")); - } - if (logStorageAccountId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property logStorageAccountId in model VMwareCbtDiskInput")); - } - if (logStorageAccountSasSecretName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property logStorageAccountSasSecretName in model VMwareCbtDiskInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VMwareCbtDiskInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("isOSDisk", this.isOSDisk); - jsonWriter.writeStringField("logStorageAccountId", this.logStorageAccountId); - jsonWriter.writeStringField("logStorageAccountSasSecretName", this.logStorageAccountSasSecretName); - jsonWriter.writeStringField("diskType", this.diskType == null ? null : this.diskType.toString()); - jsonWriter.writeStringField("diskEncryptionSetId", this.diskEncryptionSetId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtDiskInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtDiskInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VMwareCbtDiskInput. - */ - public static VMwareCbtDiskInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtDiskInput deserializedVMwareCbtDiskInput = new VMwareCbtDiskInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedVMwareCbtDiskInput.diskId = reader.getString(); - } else if ("isOSDisk".equals(fieldName)) { - deserializedVMwareCbtDiskInput.isOSDisk = reader.getString(); - } else if ("logStorageAccountId".equals(fieldName)) { - deserializedVMwareCbtDiskInput.logStorageAccountId = reader.getString(); - } else if ("logStorageAccountSasSecretName".equals(fieldName)) { - deserializedVMwareCbtDiskInput.logStorageAccountSasSecretName = reader.getString(); - } else if ("diskType".equals(fieldName)) { - deserializedVMwareCbtDiskInput.diskType = DiskAccountType.fromString(reader.getString()); - } else if ("diskEncryptionSetId".equals(fieldName)) { - deserializedVMwareCbtDiskInput.diskEncryptionSetId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtDiskInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtEnableMigrationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtEnableMigrationInput.java deleted file mode 100644 index 4cde9489c7d6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtEnableMigrationInput.java +++ /dev/null @@ -1,840 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * VMwareCbt specific enable migration input. - */ -@Fluent -public final class VMwareCbtEnableMigrationInput extends EnableMigrationProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "VMwareCbt"; - - /* - * The ARM Id of the VM discovered in VMware. - */ - private String vmwareMachineId; - - /* - * The disks to include list. - */ - private List disksToInclude; - - /* - * License type. - */ - private LicenseType licenseType; - - /* - * The SQL Server license type. - */ - private SqlServerLicenseType sqlServerLicenseType; - - /* - * A value indicating whether bulk SQL RP registration to be done. - */ - private String performSqlBulkRegistration; - - /* - * The data mover run as account Id. - */ - private String dataMoverRunAsAccountId; - - /* - * The snapshot run as account Id. - */ - private String snapshotRunAsAccountId; - - /* - * The target VM name. - */ - private String targetVmName; - - /* - * The target VM size. - */ - private String targetVmSize; - - /* - * The target resource group ARM Id. - */ - private String targetResourceGroupId; - - /* - * The target network ARM Id. - */ - private String targetNetworkId; - - /* - * The selected test network ARM Id. - */ - private String testNetworkId; - - /* - * The target subnet name. - */ - private String targetSubnetName; - - /* - * The selected test subnet name. - */ - private String testSubnetName; - - /* - * The target availability set ARM Id. - */ - private String targetAvailabilitySetId; - - /* - * The target availability zone. - */ - private String targetAvailabilityZone; - - /* - * The target proximity placement group ARM Id. - */ - private String targetProximityPlacementGroupId; - - /* - * The confidential VM key vault Id for ADE installation. - */ - private String confidentialVmKeyVaultId; - - /* - * The target VM security profile. - */ - private VMwareCbtSecurityProfileProperties targetVmSecurityProfile; - - /* - * The target boot diagnostics storage account ARM Id. - */ - private String targetBootDiagnosticsStorageAccountId; - - /* - * A value indicating whether auto resync is to be done. - */ - private String performAutoResync; - - /* - * The target VM tags. - */ - private Map targetVmTags; - - /* - * The tags for the seed disks. - */ - private Map seedDiskTags; - - /* - * The tags for the target disks. - */ - private Map targetDiskTags; - - /* - * The tags for the target NICs. - */ - private Map targetNicTags; - - /** - * Creates an instance of VMwareCbtEnableMigrationInput class. - */ - public VMwareCbtEnableMigrationInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the vmwareMachineId property: The ARM Id of the VM discovered in VMware. - * - * @return the vmwareMachineId value. - */ - public String vmwareMachineId() { - return this.vmwareMachineId; - } - - /** - * Set the vmwareMachineId property: The ARM Id of the VM discovered in VMware. - * - * @param vmwareMachineId the vmwareMachineId value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withVmwareMachineId(String vmwareMachineId) { - this.vmwareMachineId = vmwareMachineId; - return this; - } - - /** - * Get the disksToInclude property: The disks to include list. - * - * @return the disksToInclude value. - */ - public List disksToInclude() { - return this.disksToInclude; - } - - /** - * Set the disksToInclude property: The disks to include list. - * - * @param disksToInclude the disksToInclude value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withDisksToInclude(List disksToInclude) { - this.disksToInclude = disksToInclude; - return this; - } - - /** - * Get the licenseType property: License type. - * - * @return the licenseType value. - */ - public LicenseType licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: License type. - * - * @param licenseType the licenseType value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withLicenseType(LicenseType licenseType) { - this.licenseType = licenseType; - return this; - } - - /** - * Get the sqlServerLicenseType property: The SQL Server license type. - * - * @return the sqlServerLicenseType value. - */ - public SqlServerLicenseType sqlServerLicenseType() { - return this.sqlServerLicenseType; - } - - /** - * Set the sqlServerLicenseType property: The SQL Server license type. - * - * @param sqlServerLicenseType the sqlServerLicenseType value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withSqlServerLicenseType(SqlServerLicenseType sqlServerLicenseType) { - this.sqlServerLicenseType = sqlServerLicenseType; - return this; - } - - /** - * Get the performSqlBulkRegistration property: A value indicating whether bulk SQL RP registration to be done. - * - * @return the performSqlBulkRegistration value. - */ - public String performSqlBulkRegistration() { - return this.performSqlBulkRegistration; - } - - /** - * Set the performSqlBulkRegistration property: A value indicating whether bulk SQL RP registration to be done. - * - * @param performSqlBulkRegistration the performSqlBulkRegistration value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withPerformSqlBulkRegistration(String performSqlBulkRegistration) { - this.performSqlBulkRegistration = performSqlBulkRegistration; - return this; - } - - /** - * Get the dataMoverRunAsAccountId property: The data mover run as account Id. - * - * @return the dataMoverRunAsAccountId value. - */ - public String dataMoverRunAsAccountId() { - return this.dataMoverRunAsAccountId; - } - - /** - * Set the dataMoverRunAsAccountId property: The data mover run as account Id. - * - * @param dataMoverRunAsAccountId the dataMoverRunAsAccountId value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withDataMoverRunAsAccountId(String dataMoverRunAsAccountId) { - this.dataMoverRunAsAccountId = dataMoverRunAsAccountId; - return this; - } - - /** - * Get the snapshotRunAsAccountId property: The snapshot run as account Id. - * - * @return the snapshotRunAsAccountId value. - */ - public String snapshotRunAsAccountId() { - return this.snapshotRunAsAccountId; - } - - /** - * Set the snapshotRunAsAccountId property: The snapshot run as account Id. - * - * @param snapshotRunAsAccountId the snapshotRunAsAccountId value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withSnapshotRunAsAccountId(String snapshotRunAsAccountId) { - this.snapshotRunAsAccountId = snapshotRunAsAccountId; - return this; - } - - /** - * Get the targetVmName property: The target VM name. - * - * @return the targetVmName value. - */ - public String targetVmName() { - return this.targetVmName; - } - - /** - * Set the targetVmName property: The target VM name. - * - * @param targetVmName the targetVmName value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTargetVmName(String targetVmName) { - this.targetVmName = targetVmName; - return this; - } - - /** - * Get the targetVmSize property: The target VM size. - * - * @return the targetVmSize value. - */ - public String targetVmSize() { - return this.targetVmSize; - } - - /** - * Set the targetVmSize property: The target VM size. - * - * @param targetVmSize the targetVmSize value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTargetVmSize(String targetVmSize) { - this.targetVmSize = targetVmSize; - return this; - } - - /** - * Get the targetResourceGroupId property: The target resource group ARM Id. - * - * @return the targetResourceGroupId value. - */ - public String targetResourceGroupId() { - return this.targetResourceGroupId; - } - - /** - * Set the targetResourceGroupId property: The target resource group ARM Id. - * - * @param targetResourceGroupId the targetResourceGroupId value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTargetResourceGroupId(String targetResourceGroupId) { - this.targetResourceGroupId = targetResourceGroupId; - return this; - } - - /** - * Get the targetNetworkId property: The target network ARM Id. - * - * @return the targetNetworkId value. - */ - public String targetNetworkId() { - return this.targetNetworkId; - } - - /** - * Set the targetNetworkId property: The target network ARM Id. - * - * @param targetNetworkId the targetNetworkId value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTargetNetworkId(String targetNetworkId) { - this.targetNetworkId = targetNetworkId; - return this; - } - - /** - * Get the testNetworkId property: The selected test network ARM Id. - * - * @return the testNetworkId value. - */ - public String testNetworkId() { - return this.testNetworkId; - } - - /** - * Set the testNetworkId property: The selected test network ARM Id. - * - * @param testNetworkId the testNetworkId value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTestNetworkId(String testNetworkId) { - this.testNetworkId = testNetworkId; - return this; - } - - /** - * Get the targetSubnetName property: The target subnet name. - * - * @return the targetSubnetName value. - */ - public String targetSubnetName() { - return this.targetSubnetName; - } - - /** - * Set the targetSubnetName property: The target subnet name. - * - * @param targetSubnetName the targetSubnetName value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTargetSubnetName(String targetSubnetName) { - this.targetSubnetName = targetSubnetName; - return this; - } - - /** - * Get the testSubnetName property: The selected test subnet name. - * - * @return the testSubnetName value. - */ - public String testSubnetName() { - return this.testSubnetName; - } - - /** - * Set the testSubnetName property: The selected test subnet name. - * - * @param testSubnetName the testSubnetName value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTestSubnetName(String testSubnetName) { - this.testSubnetName = testSubnetName; - return this; - } - - /** - * Get the targetAvailabilitySetId property: The target availability set ARM Id. - * - * @return the targetAvailabilitySetId value. - */ - public String targetAvailabilitySetId() { - return this.targetAvailabilitySetId; - } - - /** - * Set the targetAvailabilitySetId property: The target availability set ARM Id. - * - * @param targetAvailabilitySetId the targetAvailabilitySetId value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTargetAvailabilitySetId(String targetAvailabilitySetId) { - this.targetAvailabilitySetId = targetAvailabilitySetId; - return this; - } - - /** - * Get the targetAvailabilityZone property: The target availability zone. - * - * @return the targetAvailabilityZone value. - */ - public String targetAvailabilityZone() { - return this.targetAvailabilityZone; - } - - /** - * Set the targetAvailabilityZone property: The target availability zone. - * - * @param targetAvailabilityZone the targetAvailabilityZone value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTargetAvailabilityZone(String targetAvailabilityZone) { - this.targetAvailabilityZone = targetAvailabilityZone; - return this; - } - - /** - * Get the targetProximityPlacementGroupId property: The target proximity placement group ARM Id. - * - * @return the targetProximityPlacementGroupId value. - */ - public String targetProximityPlacementGroupId() { - return this.targetProximityPlacementGroupId; - } - - /** - * Set the targetProximityPlacementGroupId property: The target proximity placement group ARM Id. - * - * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) { - this.targetProximityPlacementGroupId = targetProximityPlacementGroupId; - return this; - } - - /** - * Get the confidentialVmKeyVaultId property: The confidential VM key vault Id for ADE installation. - * - * @return the confidentialVmKeyVaultId value. - */ - public String confidentialVmKeyVaultId() { - return this.confidentialVmKeyVaultId; - } - - /** - * Set the confidentialVmKeyVaultId property: The confidential VM key vault Id for ADE installation. - * - * @param confidentialVmKeyVaultId the confidentialVmKeyVaultId value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withConfidentialVmKeyVaultId(String confidentialVmKeyVaultId) { - this.confidentialVmKeyVaultId = confidentialVmKeyVaultId; - return this; - } - - /** - * Get the targetVmSecurityProfile property: The target VM security profile. - * - * @return the targetVmSecurityProfile value. - */ - public VMwareCbtSecurityProfileProperties targetVmSecurityProfile() { - return this.targetVmSecurityProfile; - } - - /** - * Set the targetVmSecurityProfile property: The target VM security profile. - * - * @param targetVmSecurityProfile the targetVmSecurityProfile value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput - withTargetVmSecurityProfile(VMwareCbtSecurityProfileProperties targetVmSecurityProfile) { - this.targetVmSecurityProfile = targetVmSecurityProfile; - return this; - } - - /** - * Get the targetBootDiagnosticsStorageAccountId property: The target boot diagnostics storage account ARM Id. - * - * @return the targetBootDiagnosticsStorageAccountId value. - */ - public String targetBootDiagnosticsStorageAccountId() { - return this.targetBootDiagnosticsStorageAccountId; - } - - /** - * Set the targetBootDiagnosticsStorageAccountId property: The target boot diagnostics storage account ARM Id. - * - * @param targetBootDiagnosticsStorageAccountId the targetBootDiagnosticsStorageAccountId value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput - withTargetBootDiagnosticsStorageAccountId(String targetBootDiagnosticsStorageAccountId) { - this.targetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; - return this; - } - - /** - * Get the performAutoResync property: A value indicating whether auto resync is to be done. - * - * @return the performAutoResync value. - */ - public String performAutoResync() { - return this.performAutoResync; - } - - /** - * Set the performAutoResync property: A value indicating whether auto resync is to be done. - * - * @param performAutoResync the performAutoResync value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withPerformAutoResync(String performAutoResync) { - this.performAutoResync = performAutoResync; - return this; - } - - /** - * Get the targetVmTags property: The target VM tags. - * - * @return the targetVmTags value. - */ - public Map targetVmTags() { - return this.targetVmTags; - } - - /** - * Set the targetVmTags property: The target VM tags. - * - * @param targetVmTags the targetVmTags value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTargetVmTags(Map targetVmTags) { - this.targetVmTags = targetVmTags; - return this; - } - - /** - * Get the seedDiskTags property: The tags for the seed disks. - * - * @return the seedDiskTags value. - */ - public Map seedDiskTags() { - return this.seedDiskTags; - } - - /** - * Set the seedDiskTags property: The tags for the seed disks. - * - * @param seedDiskTags the seedDiskTags value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withSeedDiskTags(Map seedDiskTags) { - this.seedDiskTags = seedDiskTags; - return this; - } - - /** - * Get the targetDiskTags property: The tags for the target disks. - * - * @return the targetDiskTags value. - */ - public Map targetDiskTags() { - return this.targetDiskTags; - } - - /** - * Set the targetDiskTags property: The tags for the target disks. - * - * @param targetDiskTags the targetDiskTags value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTargetDiskTags(Map targetDiskTags) { - this.targetDiskTags = targetDiskTags; - return this; - } - - /** - * Get the targetNicTags property: The tags for the target NICs. - * - * @return the targetNicTags value. - */ - public Map targetNicTags() { - return this.targetNicTags; - } - - /** - * Set the targetNicTags property: The tags for the target NICs. - * - * @param targetNicTags the targetNicTags value to set. - * @return the VMwareCbtEnableMigrationInput object itself. - */ - public VMwareCbtEnableMigrationInput withTargetNicTags(Map targetNicTags) { - this.targetNicTags = targetNicTags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmwareMachineId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property vmwareMachineId in model VMwareCbtEnableMigrationInput")); - } - if (disksToInclude() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property disksToInclude in model VMwareCbtEnableMigrationInput")); - } else { - disksToInclude().forEach(e -> e.validate()); - } - if (dataMoverRunAsAccountId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property dataMoverRunAsAccountId in model VMwareCbtEnableMigrationInput")); - } - if (snapshotRunAsAccountId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property snapshotRunAsAccountId in model VMwareCbtEnableMigrationInput")); - } - if (targetResourceGroupId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetResourceGroupId in model VMwareCbtEnableMigrationInput")); - } - if (targetNetworkId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetNetworkId in model VMwareCbtEnableMigrationInput")); - } - if (targetVmSecurityProfile() != null) { - targetVmSecurityProfile().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VMwareCbtEnableMigrationInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("vmwareMachineId", this.vmwareMachineId); - jsonWriter.writeArrayField("disksToInclude", this.disksToInclude, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("dataMoverRunAsAccountId", this.dataMoverRunAsAccountId); - jsonWriter.writeStringField("snapshotRunAsAccountId", this.snapshotRunAsAccountId); - jsonWriter.writeStringField("targetResourceGroupId", this.targetResourceGroupId); - jsonWriter.writeStringField("targetNetworkId", this.targetNetworkId); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); - jsonWriter.writeStringField("sqlServerLicenseType", - this.sqlServerLicenseType == null ? null : this.sqlServerLicenseType.toString()); - jsonWriter.writeStringField("performSqlBulkRegistration", this.performSqlBulkRegistration); - jsonWriter.writeStringField("targetVmName", this.targetVmName); - jsonWriter.writeStringField("targetVmSize", this.targetVmSize); - jsonWriter.writeStringField("testNetworkId", this.testNetworkId); - jsonWriter.writeStringField("targetSubnetName", this.targetSubnetName); - jsonWriter.writeStringField("testSubnetName", this.testSubnetName); - jsonWriter.writeStringField("targetAvailabilitySetId", this.targetAvailabilitySetId); - jsonWriter.writeStringField("targetAvailabilityZone", this.targetAvailabilityZone); - jsonWriter.writeStringField("targetProximityPlacementGroupId", this.targetProximityPlacementGroupId); - jsonWriter.writeStringField("confidentialVmKeyVaultId", this.confidentialVmKeyVaultId); - jsonWriter.writeJsonField("targetVmSecurityProfile", this.targetVmSecurityProfile); - jsonWriter.writeStringField("targetBootDiagnosticsStorageAccountId", - this.targetBootDiagnosticsStorageAccountId); - jsonWriter.writeStringField("performAutoResync", this.performAutoResync); - jsonWriter.writeMapField("targetVmTags", this.targetVmTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("seedDiskTags", this.seedDiskTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetDiskTags", this.targetDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetNicTags", this.targetNicTags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtEnableMigrationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtEnableMigrationInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VMwareCbtEnableMigrationInput. - */ - public static VMwareCbtEnableMigrationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtEnableMigrationInput deserializedVMwareCbtEnableMigrationInput - = new VMwareCbtEnableMigrationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("vmwareMachineId".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.vmwareMachineId = reader.getString(); - } else if ("disksToInclude".equals(fieldName)) { - List disksToInclude - = reader.readArray(reader1 -> VMwareCbtDiskInput.fromJson(reader1)); - deserializedVMwareCbtEnableMigrationInput.disksToInclude = disksToInclude; - } else if ("dataMoverRunAsAccountId".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.dataMoverRunAsAccountId = reader.getString(); - } else if ("snapshotRunAsAccountId".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.snapshotRunAsAccountId = reader.getString(); - } else if ("targetResourceGroupId".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.targetResourceGroupId = reader.getString(); - } else if ("targetNetworkId".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.targetNetworkId = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.instanceType = reader.getString(); - } else if ("licenseType".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.licenseType = LicenseType.fromString(reader.getString()); - } else if ("sqlServerLicenseType".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.sqlServerLicenseType - = SqlServerLicenseType.fromString(reader.getString()); - } else if ("performSqlBulkRegistration".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.performSqlBulkRegistration = reader.getString(); - } else if ("targetVmName".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.targetVmName = reader.getString(); - } else if ("targetVmSize".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.targetVmSize = reader.getString(); - } else if ("testNetworkId".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.testNetworkId = reader.getString(); - } else if ("targetSubnetName".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.targetSubnetName = reader.getString(); - } else if ("testSubnetName".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.testSubnetName = reader.getString(); - } else if ("targetAvailabilitySetId".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.targetAvailabilitySetId = reader.getString(); - } else if ("targetAvailabilityZone".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.targetAvailabilityZone = reader.getString(); - } else if ("targetProximityPlacementGroupId".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.targetProximityPlacementGroupId = reader.getString(); - } else if ("confidentialVmKeyVaultId".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.confidentialVmKeyVaultId = reader.getString(); - } else if ("targetVmSecurityProfile".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.targetVmSecurityProfile - = VMwareCbtSecurityProfileProperties.fromJson(reader); - } else if ("targetBootDiagnosticsStorageAccountId".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.targetBootDiagnosticsStorageAccountId - = reader.getString(); - } else if ("performAutoResync".equals(fieldName)) { - deserializedVMwareCbtEnableMigrationInput.performAutoResync = reader.getString(); - } else if ("targetVmTags".equals(fieldName)) { - Map targetVmTags = reader.readMap(reader1 -> reader1.getString()); - deserializedVMwareCbtEnableMigrationInput.targetVmTags = targetVmTags; - } else if ("seedDiskTags".equals(fieldName)) { - Map seedDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedVMwareCbtEnableMigrationInput.seedDiskTags = seedDiskTags; - } else if ("targetDiskTags".equals(fieldName)) { - Map targetDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedVMwareCbtEnableMigrationInput.targetDiskTags = targetDiskTags; - } else if ("targetNicTags".equals(fieldName)) { - Map targetNicTags = reader.readMap(reader1 -> reader1.getString()); - deserializedVMwareCbtEnableMigrationInput.targetNicTags = targetNicTags; - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtEnableMigrationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtEventDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtEventDetails.java deleted file mode 100644 index 2b4ce1a1a820..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtEventDetails.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Event details for VMwareCbt provider. - */ -@Immutable -public final class VMwareCbtEventDetails extends EventProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "VMwareCbt"; - - /* - * The migration item name. - */ - private String migrationItemName; - - /** - * Creates an instance of VMwareCbtEventDetails class. - */ - public VMwareCbtEventDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the migrationItemName property: The migration item name. - * - * @return the migrationItemName value. - */ - public String migrationItemName() { - return this.migrationItemName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtEventDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtEventDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareCbtEventDetails. - */ - public static VMwareCbtEventDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtEventDetails deserializedVMwareCbtEventDetails = new VMwareCbtEventDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVMwareCbtEventDetails.instanceType = reader.getString(); - } else if ("migrationItemName".equals(fieldName)) { - deserializedVMwareCbtEventDetails.migrationItemName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtEventDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtMigrateInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtMigrateInput.java deleted file mode 100644 index 9669c89f8a37..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtMigrateInput.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMwareCbt specific migrate input. - */ -@Fluent -public final class VMwareCbtMigrateInput extends MigrateProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "VMwareCbt"; - - /* - * A value indicating whether VM is to be shutdown. - */ - private String performShutdown; - - /* - * A value indicating the inplace OS Upgrade version. - */ - private String osUpgradeVersion; - - /** - * Creates an instance of VMwareCbtMigrateInput class. - */ - public VMwareCbtMigrateInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the performShutdown property: A value indicating whether VM is to be shutdown. - * - * @return the performShutdown value. - */ - public String performShutdown() { - return this.performShutdown; - } - - /** - * Set the performShutdown property: A value indicating whether VM is to be shutdown. - * - * @param performShutdown the performShutdown value to set. - * @return the VMwareCbtMigrateInput object itself. - */ - public VMwareCbtMigrateInput withPerformShutdown(String performShutdown) { - this.performShutdown = performShutdown; - return this; - } - - /** - * Get the osUpgradeVersion property: A value indicating the inplace OS Upgrade version. - * - * @return the osUpgradeVersion value. - */ - public String osUpgradeVersion() { - return this.osUpgradeVersion; - } - - /** - * Set the osUpgradeVersion property: A value indicating the inplace OS Upgrade version. - * - * @param osUpgradeVersion the osUpgradeVersion value to set. - * @return the VMwareCbtMigrateInput object itself. - */ - public VMwareCbtMigrateInput withOsUpgradeVersion(String osUpgradeVersion) { - this.osUpgradeVersion = osUpgradeVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (performShutdown() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property performShutdown in model VMwareCbtMigrateInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VMwareCbtMigrateInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("performShutdown", this.performShutdown); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("osUpgradeVersion", this.osUpgradeVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtMigrateInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtMigrateInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VMwareCbtMigrateInput. - */ - public static VMwareCbtMigrateInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtMigrateInput deserializedVMwareCbtMigrateInput = new VMwareCbtMigrateInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("performShutdown".equals(fieldName)) { - deserializedVMwareCbtMigrateInput.performShutdown = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedVMwareCbtMigrateInput.instanceType = reader.getString(); - } else if ("osUpgradeVersion".equals(fieldName)) { - deserializedVMwareCbtMigrateInput.osUpgradeVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtMigrateInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtMigrationDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtMigrationDetails.java deleted file mode 100644 index 5289dbce03c3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtMigrationDetails.java +++ /dev/null @@ -1,1148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** - * VMwareCbt provider specific settings. - */ -@Fluent -public final class VMwareCbtMigrationDetails extends MigrationProviderSpecificSettings { - /* - * Gets the instance type. - */ - private String instanceType = "VMwareCbt"; - - /* - * The ARM Id of the VM discovered in VMware. - */ - private String vmwareMachineId; - - /* - * The type of the OS on the VM. - */ - private String osType; - - /* - * The name of the OS on the VM. - */ - private String osName; - - /* - * The firmware type. - */ - private String firmwareType; - - /* - * The target generation. - */ - private String targetGeneration; - - /* - * License Type of the VM to be used. - */ - private String licenseType; - - /* - * The SQL Server license type. - */ - private String sqlServerLicenseType; - - /* - * The data mover run as account Id. - */ - private String dataMoverRunAsAccountId; - - /* - * The snapshot run as account Id. - */ - private String snapshotRunAsAccountId; - - /* - * The replication storage account ARM Id. This is applicable only for the blob based replication test hook. - */ - private String storageAccountId; - - /* - * Target VM name. - */ - private String targetVmName; - - /* - * The target VM size. - */ - private String targetVmSize; - - /* - * The target location. - */ - private String targetLocation; - - /* - * The target resource group Id. - */ - private String targetResourceGroupId; - - /* - * The target availability set Id. - */ - private String targetAvailabilitySetId; - - /* - * The target availability zone. - */ - private String targetAvailabilityZone; - - /* - * The target proximity placement group Id. - */ - private String targetProximityPlacementGroupId; - - /* - * The confidential VM key vault Id for ADE installation. - */ - private String confidentialVmKeyVaultId; - - /* - * The target VM security profile. - */ - private VMwareCbtSecurityProfileProperties targetVmSecurityProfile; - - /* - * The target boot diagnostics storage account ARM Id. - */ - private String targetBootDiagnosticsStorageAccountId; - - /* - * The target VM tags. - */ - private Map targetVmTags; - - /* - * The list of protected disks. - */ - private List protectedDisks; - - /* - * The target network Id. - */ - private String targetNetworkId; - - /* - * The test network Id. - */ - private String testNetworkId; - - /* - * The network details. - */ - private List vmNics; - - /* - * The tags for the target NICs. - */ - private Map targetNicTags; - - /* - * The recovery point Id to which the VM was migrated. - */ - private String migrationRecoveryPointId; - - /* - * The last recovery point received time. - */ - private OffsetDateTime lastRecoveryPointReceived; - - /* - * The last recovery point Id. - */ - private String lastRecoveryPointId; - - /* - * The initial seeding progress percentage. - */ - private Integer initialSeedingProgressPercentage; - - /* - * The migration progress percentage. - */ - private Integer migrationProgressPercentage; - - /* - * The resync progress percentage. - */ - private Integer resyncProgressPercentage; - - /* - * The resume progress percentage. - */ - private Integer resumeProgressPercentage; - - /* - * The delta sync progress percentage. - */ - private Integer deltaSyncProgressPercentage; - - /* - * A value indicating whether checksum resync cycle is in progress. - */ - private String isCheckSumResyncCycle; - - /* - * The initial seeding retry count. - */ - private Long initialSeedingRetryCount; - - /* - * The resync retry count. - */ - private Long resyncRetryCount; - - /* - * The resume retry count. - */ - private Long resumeRetryCount; - - /* - * The delta sync retry count. - */ - private Long deltaSyncRetryCount; - - /* - * A value indicating whether resync is required. - */ - private String resyncRequired; - - /* - * The resync state. - */ - private ResyncState resyncState; - - /* - * A value indicating whether auto resync is to be done. - */ - private String performAutoResync; - - /* - * The tags for the seed disks. - */ - private Map seedDiskTags; - - /* - * The tags for the target disks. - */ - private Map targetDiskTags; - - /* - * A value indicating the inplace OS Upgrade version. - */ - private List supportedOSVersions; - - /* - * A value indicating the appliance monitoring details. - */ - private ApplianceMonitoringDetails applianceMonitoringDetails; - - /* - * A value indicating the gateway operation details. - */ - private GatewayOperationDetails gatewayOperationDetails; - - /* - * A value indicating the SRS operation name. - */ - private String operationName; - - /** - * Creates an instance of VMwareCbtMigrationDetails class. - */ - public VMwareCbtMigrationDetails() { - } - - /** - * Get the instanceType property: Gets the instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the vmwareMachineId property: The ARM Id of the VM discovered in VMware. - * - * @return the vmwareMachineId value. - */ - public String vmwareMachineId() { - return this.vmwareMachineId; - } - - /** - * Get the osType property: The type of the OS on the VM. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Get the osName property: The name of the OS on the VM. - * - * @return the osName value. - */ - public String osName() { - return this.osName; - } - - /** - * Get the firmwareType property: The firmware type. - * - * @return the firmwareType value. - */ - public String firmwareType() { - return this.firmwareType; - } - - /** - * Get the targetGeneration property: The target generation. - * - * @return the targetGeneration value. - */ - public String targetGeneration() { - return this.targetGeneration; - } - - /** - * Get the licenseType property: License Type of the VM to be used. - * - * @return the licenseType value. - */ - public String licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: License Type of the VM to be used. - * - * @param licenseType the licenseType value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withLicenseType(String licenseType) { - this.licenseType = licenseType; - return this; - } - - /** - * Get the sqlServerLicenseType property: The SQL Server license type. - * - * @return the sqlServerLicenseType value. - */ - public String sqlServerLicenseType() { - return this.sqlServerLicenseType; - } - - /** - * Set the sqlServerLicenseType property: The SQL Server license type. - * - * @param sqlServerLicenseType the sqlServerLicenseType value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withSqlServerLicenseType(String sqlServerLicenseType) { - this.sqlServerLicenseType = sqlServerLicenseType; - return this; - } - - /** - * Get the dataMoverRunAsAccountId property: The data mover run as account Id. - * - * @return the dataMoverRunAsAccountId value. - */ - public String dataMoverRunAsAccountId() { - return this.dataMoverRunAsAccountId; - } - - /** - * Get the snapshotRunAsAccountId property: The snapshot run as account Id. - * - * @return the snapshotRunAsAccountId value. - */ - public String snapshotRunAsAccountId() { - return this.snapshotRunAsAccountId; - } - - /** - * Get the storageAccountId property: The replication storage account ARM Id. This is applicable only for the blob - * based replication test hook. - * - * @return the storageAccountId value. - */ - public String storageAccountId() { - return this.storageAccountId; - } - - /** - * Get the targetVmName property: Target VM name. - * - * @return the targetVmName value. - */ - public String targetVmName() { - return this.targetVmName; - } - - /** - * Set the targetVmName property: Target VM name. - * - * @param targetVmName the targetVmName value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withTargetVmName(String targetVmName) { - this.targetVmName = targetVmName; - return this; - } - - /** - * Get the targetVmSize property: The target VM size. - * - * @return the targetVmSize value. - */ - public String targetVmSize() { - return this.targetVmSize; - } - - /** - * Set the targetVmSize property: The target VM size. - * - * @param targetVmSize the targetVmSize value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withTargetVmSize(String targetVmSize) { - this.targetVmSize = targetVmSize; - return this; - } - - /** - * Get the targetLocation property: The target location. - * - * @return the targetLocation value. - */ - public String targetLocation() { - return this.targetLocation; - } - - /** - * Get the targetResourceGroupId property: The target resource group Id. - * - * @return the targetResourceGroupId value. - */ - public String targetResourceGroupId() { - return this.targetResourceGroupId; - } - - /** - * Set the targetResourceGroupId property: The target resource group Id. - * - * @param targetResourceGroupId the targetResourceGroupId value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withTargetResourceGroupId(String targetResourceGroupId) { - this.targetResourceGroupId = targetResourceGroupId; - return this; - } - - /** - * Get the targetAvailabilitySetId property: The target availability set Id. - * - * @return the targetAvailabilitySetId value. - */ - public String targetAvailabilitySetId() { - return this.targetAvailabilitySetId; - } - - /** - * Set the targetAvailabilitySetId property: The target availability set Id. - * - * @param targetAvailabilitySetId the targetAvailabilitySetId value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withTargetAvailabilitySetId(String targetAvailabilitySetId) { - this.targetAvailabilitySetId = targetAvailabilitySetId; - return this; - } - - /** - * Get the targetAvailabilityZone property: The target availability zone. - * - * @return the targetAvailabilityZone value. - */ - public String targetAvailabilityZone() { - return this.targetAvailabilityZone; - } - - /** - * Set the targetAvailabilityZone property: The target availability zone. - * - * @param targetAvailabilityZone the targetAvailabilityZone value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withTargetAvailabilityZone(String targetAvailabilityZone) { - this.targetAvailabilityZone = targetAvailabilityZone; - return this; - } - - /** - * Get the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @return the targetProximityPlacementGroupId value. - */ - public String targetProximityPlacementGroupId() { - return this.targetProximityPlacementGroupId; - } - - /** - * Set the targetProximityPlacementGroupId property: The target proximity placement group Id. - * - * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) { - this.targetProximityPlacementGroupId = targetProximityPlacementGroupId; - return this; - } - - /** - * Get the confidentialVmKeyVaultId property: The confidential VM key vault Id for ADE installation. - * - * @return the confidentialVmKeyVaultId value. - */ - public String confidentialVmKeyVaultId() { - return this.confidentialVmKeyVaultId; - } - - /** - * Set the confidentialVmKeyVaultId property: The confidential VM key vault Id for ADE installation. - * - * @param confidentialVmKeyVaultId the confidentialVmKeyVaultId value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withConfidentialVmKeyVaultId(String confidentialVmKeyVaultId) { - this.confidentialVmKeyVaultId = confidentialVmKeyVaultId; - return this; - } - - /** - * Get the targetVmSecurityProfile property: The target VM security profile. - * - * @return the targetVmSecurityProfile value. - */ - public VMwareCbtSecurityProfileProperties targetVmSecurityProfile() { - return this.targetVmSecurityProfile; - } - - /** - * Set the targetVmSecurityProfile property: The target VM security profile. - * - * @param targetVmSecurityProfile the targetVmSecurityProfile value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails - withTargetVmSecurityProfile(VMwareCbtSecurityProfileProperties targetVmSecurityProfile) { - this.targetVmSecurityProfile = targetVmSecurityProfile; - return this; - } - - /** - * Get the targetBootDiagnosticsStorageAccountId property: The target boot diagnostics storage account ARM Id. - * - * @return the targetBootDiagnosticsStorageAccountId value. - */ - public String targetBootDiagnosticsStorageAccountId() { - return this.targetBootDiagnosticsStorageAccountId; - } - - /** - * Set the targetBootDiagnosticsStorageAccountId property: The target boot diagnostics storage account ARM Id. - * - * @param targetBootDiagnosticsStorageAccountId the targetBootDiagnosticsStorageAccountId value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails - withTargetBootDiagnosticsStorageAccountId(String targetBootDiagnosticsStorageAccountId) { - this.targetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; - return this; - } - - /** - * Get the targetVmTags property: The target VM tags. - * - * @return the targetVmTags value. - */ - public Map targetVmTags() { - return this.targetVmTags; - } - - /** - * Set the targetVmTags property: The target VM tags. - * - * @param targetVmTags the targetVmTags value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withTargetVmTags(Map targetVmTags) { - this.targetVmTags = targetVmTags; - return this; - } - - /** - * Get the protectedDisks property: The list of protected disks. - * - * @return the protectedDisks value. - */ - public List protectedDisks() { - return this.protectedDisks; - } - - /** - * Set the protectedDisks property: The list of protected disks. - * - * @param protectedDisks the protectedDisks value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withProtectedDisks(List protectedDisks) { - this.protectedDisks = protectedDisks; - return this; - } - - /** - * Get the targetNetworkId property: The target network Id. - * - * @return the targetNetworkId value. - */ - public String targetNetworkId() { - return this.targetNetworkId; - } - - /** - * Set the targetNetworkId property: The target network Id. - * - * @param targetNetworkId the targetNetworkId value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withTargetNetworkId(String targetNetworkId) { - this.targetNetworkId = targetNetworkId; - return this; - } - - /** - * Get the testNetworkId property: The test network Id. - * - * @return the testNetworkId value. - */ - public String testNetworkId() { - return this.testNetworkId; - } - - /** - * Set the testNetworkId property: The test network Id. - * - * @param testNetworkId the testNetworkId value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withTestNetworkId(String testNetworkId) { - this.testNetworkId = testNetworkId; - return this; - } - - /** - * Get the vmNics property: The network details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: The network details. - * - * @param vmNics the vmNics value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withVmNics(List vmNics) { - this.vmNics = vmNics; - return this; - } - - /** - * Get the targetNicTags property: The tags for the target NICs. - * - * @return the targetNicTags value. - */ - public Map targetNicTags() { - return this.targetNicTags; - } - - /** - * Set the targetNicTags property: The tags for the target NICs. - * - * @param targetNicTags the targetNicTags value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withTargetNicTags(Map targetNicTags) { - this.targetNicTags = targetNicTags; - return this; - } - - /** - * Get the migrationRecoveryPointId property: The recovery point Id to which the VM was migrated. - * - * @return the migrationRecoveryPointId value. - */ - public String migrationRecoveryPointId() { - return this.migrationRecoveryPointId; - } - - /** - * Get the lastRecoveryPointReceived property: The last recovery point received time. - * - * @return the lastRecoveryPointReceived value. - */ - public OffsetDateTime lastRecoveryPointReceived() { - return this.lastRecoveryPointReceived; - } - - /** - * Get the lastRecoveryPointId property: The last recovery point Id. - * - * @return the lastRecoveryPointId value. - */ - public String lastRecoveryPointId() { - return this.lastRecoveryPointId; - } - - /** - * Get the initialSeedingProgressPercentage property: The initial seeding progress percentage. - * - * @return the initialSeedingProgressPercentage value. - */ - public Integer initialSeedingProgressPercentage() { - return this.initialSeedingProgressPercentage; - } - - /** - * Get the migrationProgressPercentage property: The migration progress percentage. - * - * @return the migrationProgressPercentage value. - */ - public Integer migrationProgressPercentage() { - return this.migrationProgressPercentage; - } - - /** - * Get the resyncProgressPercentage property: The resync progress percentage. - * - * @return the resyncProgressPercentage value. - */ - public Integer resyncProgressPercentage() { - return this.resyncProgressPercentage; - } - - /** - * Get the resumeProgressPercentage property: The resume progress percentage. - * - * @return the resumeProgressPercentage value. - */ - public Integer resumeProgressPercentage() { - return this.resumeProgressPercentage; - } - - /** - * Get the deltaSyncProgressPercentage property: The delta sync progress percentage. - * - * @return the deltaSyncProgressPercentage value. - */ - public Integer deltaSyncProgressPercentage() { - return this.deltaSyncProgressPercentage; - } - - /** - * Get the isCheckSumResyncCycle property: A value indicating whether checksum resync cycle is in progress. - * - * @return the isCheckSumResyncCycle value. - */ - public String isCheckSumResyncCycle() { - return this.isCheckSumResyncCycle; - } - - /** - * Get the initialSeedingRetryCount property: The initial seeding retry count. - * - * @return the initialSeedingRetryCount value. - */ - public Long initialSeedingRetryCount() { - return this.initialSeedingRetryCount; - } - - /** - * Get the resyncRetryCount property: The resync retry count. - * - * @return the resyncRetryCount value. - */ - public Long resyncRetryCount() { - return this.resyncRetryCount; - } - - /** - * Get the resumeRetryCount property: The resume retry count. - * - * @return the resumeRetryCount value. - */ - public Long resumeRetryCount() { - return this.resumeRetryCount; - } - - /** - * Get the deltaSyncRetryCount property: The delta sync retry count. - * - * @return the deltaSyncRetryCount value. - */ - public Long deltaSyncRetryCount() { - return this.deltaSyncRetryCount; - } - - /** - * Get the resyncRequired property: A value indicating whether resync is required. - * - * @return the resyncRequired value. - */ - public String resyncRequired() { - return this.resyncRequired; - } - - /** - * Get the resyncState property: The resync state. - * - * @return the resyncState value. - */ - public ResyncState resyncState() { - return this.resyncState; - } - - /** - * Get the performAutoResync property: A value indicating whether auto resync is to be done. - * - * @return the performAutoResync value. - */ - public String performAutoResync() { - return this.performAutoResync; - } - - /** - * Set the performAutoResync property: A value indicating whether auto resync is to be done. - * - * @param performAutoResync the performAutoResync value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withPerformAutoResync(String performAutoResync) { - this.performAutoResync = performAutoResync; - return this; - } - - /** - * Get the seedDiskTags property: The tags for the seed disks. - * - * @return the seedDiskTags value. - */ - public Map seedDiskTags() { - return this.seedDiskTags; - } - - /** - * Set the seedDiskTags property: The tags for the seed disks. - * - * @param seedDiskTags the seedDiskTags value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withSeedDiskTags(Map seedDiskTags) { - this.seedDiskTags = seedDiskTags; - return this; - } - - /** - * Get the targetDiskTags property: The tags for the target disks. - * - * @return the targetDiskTags value. - */ - public Map targetDiskTags() { - return this.targetDiskTags; - } - - /** - * Set the targetDiskTags property: The tags for the target disks. - * - * @param targetDiskTags the targetDiskTags value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withTargetDiskTags(Map targetDiskTags) { - this.targetDiskTags = targetDiskTags; - return this; - } - - /** - * Get the supportedOSVersions property: A value indicating the inplace OS Upgrade version. - * - * @return the supportedOSVersions value. - */ - public List supportedOSVersions() { - return this.supportedOSVersions; - } - - /** - * Set the supportedOSVersions property: A value indicating the inplace OS Upgrade version. - * - * @param supportedOSVersions the supportedOSVersions value to set. - * @return the VMwareCbtMigrationDetails object itself. - */ - public VMwareCbtMigrationDetails withSupportedOSVersions(List supportedOSVersions) { - this.supportedOSVersions = supportedOSVersions; - return this; - } - - /** - * Get the applianceMonitoringDetails property: A value indicating the appliance monitoring details. - * - * @return the applianceMonitoringDetails value. - */ - public ApplianceMonitoringDetails applianceMonitoringDetails() { - return this.applianceMonitoringDetails; - } - - /** - * Get the gatewayOperationDetails property: A value indicating the gateway operation details. - * - * @return the gatewayOperationDetails value. - */ - public GatewayOperationDetails gatewayOperationDetails() { - return this.gatewayOperationDetails; - } - - /** - * Get the operationName property: A value indicating the SRS operation name. - * - * @return the operationName value. - */ - public String operationName() { - return this.operationName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (targetVmSecurityProfile() != null) { - targetVmSecurityProfile().validate(); - } - if (protectedDisks() != null) { - protectedDisks().forEach(e -> e.validate()); - } - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - if (applianceMonitoringDetails() != null) { - applianceMonitoringDetails().validate(); - } - if (gatewayOperationDetails() != null) { - gatewayOperationDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("licenseType", this.licenseType); - jsonWriter.writeStringField("sqlServerLicenseType", this.sqlServerLicenseType); - jsonWriter.writeStringField("targetVmName", this.targetVmName); - jsonWriter.writeStringField("targetVmSize", this.targetVmSize); - jsonWriter.writeStringField("targetResourceGroupId", this.targetResourceGroupId); - jsonWriter.writeStringField("targetAvailabilitySetId", this.targetAvailabilitySetId); - jsonWriter.writeStringField("targetAvailabilityZone", this.targetAvailabilityZone); - jsonWriter.writeStringField("targetProximityPlacementGroupId", this.targetProximityPlacementGroupId); - jsonWriter.writeStringField("confidentialVmKeyVaultId", this.confidentialVmKeyVaultId); - jsonWriter.writeJsonField("targetVmSecurityProfile", this.targetVmSecurityProfile); - jsonWriter.writeStringField("targetBootDiagnosticsStorageAccountId", - this.targetBootDiagnosticsStorageAccountId); - jsonWriter.writeMapField("targetVmTags", this.targetVmTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("protectedDisks", this.protectedDisks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("targetNetworkId", this.targetNetworkId); - jsonWriter.writeStringField("testNetworkId", this.testNetworkId); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("targetNicTags", this.targetNicTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("performAutoResync", this.performAutoResync); - jsonWriter.writeMapField("seedDiskTags", this.seedDiskTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetDiskTags", this.targetDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("supportedOSVersions", this.supportedOSVersions, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtMigrationDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtMigrationDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareCbtMigrationDetails. - */ - public static VMwareCbtMigrationDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtMigrationDetails deserializedVMwareCbtMigrationDetails = new VMwareCbtMigrationDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.instanceType = reader.getString(); - } else if ("vmwareMachineId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.vmwareMachineId = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.osType = reader.getString(); - } else if ("osName".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.osName = reader.getString(); - } else if ("firmwareType".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.firmwareType = reader.getString(); - } else if ("targetGeneration".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.targetGeneration = reader.getString(); - } else if ("licenseType".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.licenseType = reader.getString(); - } else if ("sqlServerLicenseType".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.sqlServerLicenseType = reader.getString(); - } else if ("dataMoverRunAsAccountId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.dataMoverRunAsAccountId = reader.getString(); - } else if ("snapshotRunAsAccountId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.snapshotRunAsAccountId = reader.getString(); - } else if ("storageAccountId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.storageAccountId = reader.getString(); - } else if ("targetVmName".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.targetVmName = reader.getString(); - } else if ("targetVmSize".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.targetVmSize = reader.getString(); - } else if ("targetLocation".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.targetLocation = reader.getString(); - } else if ("targetResourceGroupId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.targetResourceGroupId = reader.getString(); - } else if ("targetAvailabilitySetId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.targetAvailabilitySetId = reader.getString(); - } else if ("targetAvailabilityZone".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.targetAvailabilityZone = reader.getString(); - } else if ("targetProximityPlacementGroupId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.targetProximityPlacementGroupId = reader.getString(); - } else if ("confidentialVmKeyVaultId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.confidentialVmKeyVaultId = reader.getString(); - } else if ("targetVmSecurityProfile".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.targetVmSecurityProfile - = VMwareCbtSecurityProfileProperties.fromJson(reader); - } else if ("targetBootDiagnosticsStorageAccountId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.targetBootDiagnosticsStorageAccountId = reader.getString(); - } else if ("targetVmTags".equals(fieldName)) { - Map targetVmTags = reader.readMap(reader1 -> reader1.getString()); - deserializedVMwareCbtMigrationDetails.targetVmTags = targetVmTags; - } else if ("protectedDisks".equals(fieldName)) { - List protectedDisks - = reader.readArray(reader1 -> VMwareCbtProtectedDiskDetails.fromJson(reader1)); - deserializedVMwareCbtMigrationDetails.protectedDisks = protectedDisks; - } else if ("targetNetworkId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.targetNetworkId = reader.getString(); - } else if ("testNetworkId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.testNetworkId = reader.getString(); - } else if ("vmNics".equals(fieldName)) { - List vmNics - = reader.readArray(reader1 -> VMwareCbtNicDetails.fromJson(reader1)); - deserializedVMwareCbtMigrationDetails.vmNics = vmNics; - } else if ("targetNicTags".equals(fieldName)) { - Map targetNicTags = reader.readMap(reader1 -> reader1.getString()); - deserializedVMwareCbtMigrationDetails.targetNicTags = targetNicTags; - } else if ("migrationRecoveryPointId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.migrationRecoveryPointId = reader.getString(); - } else if ("lastRecoveryPointReceived".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.lastRecoveryPointReceived = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastRecoveryPointId".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.lastRecoveryPointId = reader.getString(); - } else if ("initialSeedingProgressPercentage".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.initialSeedingProgressPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("migrationProgressPercentage".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.migrationProgressPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("resyncProgressPercentage".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.resyncProgressPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("resumeProgressPercentage".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.resumeProgressPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("deltaSyncProgressPercentage".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.deltaSyncProgressPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("isCheckSumResyncCycle".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.isCheckSumResyncCycle = reader.getString(); - } else if ("initialSeedingRetryCount".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.initialSeedingRetryCount - = reader.getNullable(JsonReader::getLong); - } else if ("resyncRetryCount".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.resyncRetryCount = reader.getNullable(JsonReader::getLong); - } else if ("resumeRetryCount".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.resumeRetryCount = reader.getNullable(JsonReader::getLong); - } else if ("deltaSyncRetryCount".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.deltaSyncRetryCount = reader.getNullable(JsonReader::getLong); - } else if ("resyncRequired".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.resyncRequired = reader.getString(); - } else if ("resyncState".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.resyncState = ResyncState.fromString(reader.getString()); - } else if ("performAutoResync".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.performAutoResync = reader.getString(); - } else if ("seedDiskTags".equals(fieldName)) { - Map seedDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedVMwareCbtMigrationDetails.seedDiskTags = seedDiskTags; - } else if ("targetDiskTags".equals(fieldName)) { - Map targetDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedVMwareCbtMigrationDetails.targetDiskTags = targetDiskTags; - } else if ("supportedOSVersions".equals(fieldName)) { - List supportedOSVersions = reader.readArray(reader1 -> reader1.getString()); - deserializedVMwareCbtMigrationDetails.supportedOSVersions = supportedOSVersions; - } else if ("applianceMonitoringDetails".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.applianceMonitoringDetails - = ApplianceMonitoringDetails.fromJson(reader); - } else if ("gatewayOperationDetails".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.gatewayOperationDetails - = GatewayOperationDetails.fromJson(reader); - } else if ("operationName".equals(fieldName)) { - deserializedVMwareCbtMigrationDetails.operationName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtMigrationDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtNicDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtNicDetails.java deleted file mode 100644 index 05ab72bfe05d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtNicDetails.java +++ /dev/null @@ -1,414 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMwareCbt NIC details. - */ -@Fluent -public final class VMwareCbtNicDetails implements JsonSerializable { - /* - * The NIC Id. - */ - private String nicId; - - /* - * A value indicating whether this is the primary NIC. - */ - private String isPrimaryNic; - - /* - * The source IP address. - */ - private String sourceIpAddress; - - /* - * The source IP address type. - */ - private EthernetAddressType sourceIpAddressType; - - /* - * Source network Id. - */ - private String sourceNetworkId; - - /* - * The target IP address. - */ - private String targetIpAddress; - - /* - * The target IP address type. - */ - private EthernetAddressType targetIpAddressType; - - /* - * Target subnet name. - */ - private String targetSubnetName; - - /* - * Source network Id. - */ - private String testNetworkId; - - /* - * Test subnet name. - */ - private String testSubnetName; - - /* - * The test IP address. - */ - private String testIpAddress; - - /* - * The test IP address type. - */ - private EthernetAddressType testIpAddressType; - - /* - * Target NIC name. - */ - private String targetNicName; - - /* - * A value indicating whether this NIC is selected for migration. - */ - private String isSelectedForMigration; - - /** - * Creates an instance of VMwareCbtNicDetails class. - */ - public VMwareCbtNicDetails() { - } - - /** - * Get the nicId property: The NIC Id. - * - * @return the nicId value. - */ - public String nicId() { - return this.nicId; - } - - /** - * Get the isPrimaryNic property: A value indicating whether this is the primary NIC. - * - * @return the isPrimaryNic value. - */ - public String isPrimaryNic() { - return this.isPrimaryNic; - } - - /** - * Set the isPrimaryNic property: A value indicating whether this is the primary NIC. - * - * @param isPrimaryNic the isPrimaryNic value to set. - * @return the VMwareCbtNicDetails object itself. - */ - public VMwareCbtNicDetails withIsPrimaryNic(String isPrimaryNic) { - this.isPrimaryNic = isPrimaryNic; - return this; - } - - /** - * Get the sourceIpAddress property: The source IP address. - * - * @return the sourceIpAddress value. - */ - public String sourceIpAddress() { - return this.sourceIpAddress; - } - - /** - * Get the sourceIpAddressType property: The source IP address type. - * - * @return the sourceIpAddressType value. - */ - public EthernetAddressType sourceIpAddressType() { - return this.sourceIpAddressType; - } - - /** - * Get the sourceNetworkId property: Source network Id. - * - * @return the sourceNetworkId value. - */ - public String sourceNetworkId() { - return this.sourceNetworkId; - } - - /** - * Get the targetIpAddress property: The target IP address. - * - * @return the targetIpAddress value. - */ - public String targetIpAddress() { - return this.targetIpAddress; - } - - /** - * Set the targetIpAddress property: The target IP address. - * - * @param targetIpAddress the targetIpAddress value to set. - * @return the VMwareCbtNicDetails object itself. - */ - public VMwareCbtNicDetails withTargetIpAddress(String targetIpAddress) { - this.targetIpAddress = targetIpAddress; - return this; - } - - /** - * Get the targetIpAddressType property: The target IP address type. - * - * @return the targetIpAddressType value. - */ - public EthernetAddressType targetIpAddressType() { - return this.targetIpAddressType; - } - - /** - * Set the targetIpAddressType property: The target IP address type. - * - * @param targetIpAddressType the targetIpAddressType value to set. - * @return the VMwareCbtNicDetails object itself. - */ - public VMwareCbtNicDetails withTargetIpAddressType(EthernetAddressType targetIpAddressType) { - this.targetIpAddressType = targetIpAddressType; - return this; - } - - /** - * Get the targetSubnetName property: Target subnet name. - * - * @return the targetSubnetName value. - */ - public String targetSubnetName() { - return this.targetSubnetName; - } - - /** - * Set the targetSubnetName property: Target subnet name. - * - * @param targetSubnetName the targetSubnetName value to set. - * @return the VMwareCbtNicDetails object itself. - */ - public VMwareCbtNicDetails withTargetSubnetName(String targetSubnetName) { - this.targetSubnetName = targetSubnetName; - return this; - } - - /** - * Get the testNetworkId property: Source network Id. - * - * @return the testNetworkId value. - */ - public String testNetworkId() { - return this.testNetworkId; - } - - /** - * Set the testNetworkId property: Source network Id. - * - * @param testNetworkId the testNetworkId value to set. - * @return the VMwareCbtNicDetails object itself. - */ - public VMwareCbtNicDetails withTestNetworkId(String testNetworkId) { - this.testNetworkId = testNetworkId; - return this; - } - - /** - * Get the testSubnetName property: Test subnet name. - * - * @return the testSubnetName value. - */ - public String testSubnetName() { - return this.testSubnetName; - } - - /** - * Set the testSubnetName property: Test subnet name. - * - * @param testSubnetName the testSubnetName value to set. - * @return the VMwareCbtNicDetails object itself. - */ - public VMwareCbtNicDetails withTestSubnetName(String testSubnetName) { - this.testSubnetName = testSubnetName; - return this; - } - - /** - * Get the testIpAddress property: The test IP address. - * - * @return the testIpAddress value. - */ - public String testIpAddress() { - return this.testIpAddress; - } - - /** - * Set the testIpAddress property: The test IP address. - * - * @param testIpAddress the testIpAddress value to set. - * @return the VMwareCbtNicDetails object itself. - */ - public VMwareCbtNicDetails withTestIpAddress(String testIpAddress) { - this.testIpAddress = testIpAddress; - return this; - } - - /** - * Get the testIpAddressType property: The test IP address type. - * - * @return the testIpAddressType value. - */ - public EthernetAddressType testIpAddressType() { - return this.testIpAddressType; - } - - /** - * Set the testIpAddressType property: The test IP address type. - * - * @param testIpAddressType the testIpAddressType value to set. - * @return the VMwareCbtNicDetails object itself. - */ - public VMwareCbtNicDetails withTestIpAddressType(EthernetAddressType testIpAddressType) { - this.testIpAddressType = testIpAddressType; - return this; - } - - /** - * Get the targetNicName property: Target NIC name. - * - * @return the targetNicName value. - */ - public String targetNicName() { - return this.targetNicName; - } - - /** - * Set the targetNicName property: Target NIC name. - * - * @param targetNicName the targetNicName value to set. - * @return the VMwareCbtNicDetails object itself. - */ - public VMwareCbtNicDetails withTargetNicName(String targetNicName) { - this.targetNicName = targetNicName; - return this; - } - - /** - * Get the isSelectedForMigration property: A value indicating whether this NIC is selected for migration. - * - * @return the isSelectedForMigration value. - */ - public String isSelectedForMigration() { - return this.isSelectedForMigration; - } - - /** - * Set the isSelectedForMigration property: A value indicating whether this NIC is selected for migration. - * - * @param isSelectedForMigration the isSelectedForMigration value to set. - * @return the VMwareCbtNicDetails object itself. - */ - public VMwareCbtNicDetails withIsSelectedForMigration(String isSelectedForMigration) { - this.isSelectedForMigration = isSelectedForMigration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("isPrimaryNic", this.isPrimaryNic); - jsonWriter.writeStringField("targetIPAddress", this.targetIpAddress); - jsonWriter.writeStringField("targetIPAddressType", - this.targetIpAddressType == null ? null : this.targetIpAddressType.toString()); - jsonWriter.writeStringField("targetSubnetName", this.targetSubnetName); - jsonWriter.writeStringField("testNetworkId", this.testNetworkId); - jsonWriter.writeStringField("testSubnetName", this.testSubnetName); - jsonWriter.writeStringField("testIPAddress", this.testIpAddress); - jsonWriter.writeStringField("testIPAddressType", - this.testIpAddressType == null ? null : this.testIpAddressType.toString()); - jsonWriter.writeStringField("targetNicName", this.targetNicName); - jsonWriter.writeStringField("isSelectedForMigration", this.isSelectedForMigration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtNicDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtNicDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareCbtNicDetails. - */ - public static VMwareCbtNicDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtNicDetails deserializedVMwareCbtNicDetails = new VMwareCbtNicDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nicId".equals(fieldName)) { - deserializedVMwareCbtNicDetails.nicId = reader.getString(); - } else if ("isPrimaryNic".equals(fieldName)) { - deserializedVMwareCbtNicDetails.isPrimaryNic = reader.getString(); - } else if ("sourceIPAddress".equals(fieldName)) { - deserializedVMwareCbtNicDetails.sourceIpAddress = reader.getString(); - } else if ("sourceIPAddressType".equals(fieldName)) { - deserializedVMwareCbtNicDetails.sourceIpAddressType - = EthernetAddressType.fromString(reader.getString()); - } else if ("sourceNetworkId".equals(fieldName)) { - deserializedVMwareCbtNicDetails.sourceNetworkId = reader.getString(); - } else if ("targetIPAddress".equals(fieldName)) { - deserializedVMwareCbtNicDetails.targetIpAddress = reader.getString(); - } else if ("targetIPAddressType".equals(fieldName)) { - deserializedVMwareCbtNicDetails.targetIpAddressType - = EthernetAddressType.fromString(reader.getString()); - } else if ("targetSubnetName".equals(fieldName)) { - deserializedVMwareCbtNicDetails.targetSubnetName = reader.getString(); - } else if ("testNetworkId".equals(fieldName)) { - deserializedVMwareCbtNicDetails.testNetworkId = reader.getString(); - } else if ("testSubnetName".equals(fieldName)) { - deserializedVMwareCbtNicDetails.testSubnetName = reader.getString(); - } else if ("testIPAddress".equals(fieldName)) { - deserializedVMwareCbtNicDetails.testIpAddress = reader.getString(); - } else if ("testIPAddressType".equals(fieldName)) { - deserializedVMwareCbtNicDetails.testIpAddressType - = EthernetAddressType.fromString(reader.getString()); - } else if ("targetNicName".equals(fieldName)) { - deserializedVMwareCbtNicDetails.targetNicName = reader.getString(); - } else if ("isSelectedForMigration".equals(fieldName)) { - deserializedVMwareCbtNicDetails.isSelectedForMigration = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtNicDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtNicInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtNicInput.java deleted file mode 100644 index f8b0a2e12349..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtNicInput.java +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMwareCbt NIC input. - */ -@Fluent -public final class VMwareCbtNicInput implements JsonSerializable { - /* - * The NIC Id. - */ - private String nicId; - - /* - * A value indicating whether this is the primary NIC. - */ - private String isPrimaryNic; - - /* - * Target subnet name. - */ - private String targetSubnetName; - - /* - * The static IP address. - */ - private String targetStaticIpAddress; - - /* - * A value indicating whether this NIC is selected for migration. - */ - private String isSelectedForMigration; - - /* - * Target NIC name. - */ - private String targetNicName; - - /* - * The test subnet name. - */ - private String testSubnetName; - - /* - * The test static IP address. - */ - private String testStaticIpAddress; - - /** - * Creates an instance of VMwareCbtNicInput class. - */ - public VMwareCbtNicInput() { - } - - /** - * Get the nicId property: The NIC Id. - * - * @return the nicId value. - */ - public String nicId() { - return this.nicId; - } - - /** - * Set the nicId property: The NIC Id. - * - * @param nicId the nicId value to set. - * @return the VMwareCbtNicInput object itself. - */ - public VMwareCbtNicInput withNicId(String nicId) { - this.nicId = nicId; - return this; - } - - /** - * Get the isPrimaryNic property: A value indicating whether this is the primary NIC. - * - * @return the isPrimaryNic value. - */ - public String isPrimaryNic() { - return this.isPrimaryNic; - } - - /** - * Set the isPrimaryNic property: A value indicating whether this is the primary NIC. - * - * @param isPrimaryNic the isPrimaryNic value to set. - * @return the VMwareCbtNicInput object itself. - */ - public VMwareCbtNicInput withIsPrimaryNic(String isPrimaryNic) { - this.isPrimaryNic = isPrimaryNic; - return this; - } - - /** - * Get the targetSubnetName property: Target subnet name. - * - * @return the targetSubnetName value. - */ - public String targetSubnetName() { - return this.targetSubnetName; - } - - /** - * Set the targetSubnetName property: Target subnet name. - * - * @param targetSubnetName the targetSubnetName value to set. - * @return the VMwareCbtNicInput object itself. - */ - public VMwareCbtNicInput withTargetSubnetName(String targetSubnetName) { - this.targetSubnetName = targetSubnetName; - return this; - } - - /** - * Get the targetStaticIpAddress property: The static IP address. - * - * @return the targetStaticIpAddress value. - */ - public String targetStaticIpAddress() { - return this.targetStaticIpAddress; - } - - /** - * Set the targetStaticIpAddress property: The static IP address. - * - * @param targetStaticIpAddress the targetStaticIpAddress value to set. - * @return the VMwareCbtNicInput object itself. - */ - public VMwareCbtNicInput withTargetStaticIpAddress(String targetStaticIpAddress) { - this.targetStaticIpAddress = targetStaticIpAddress; - return this; - } - - /** - * Get the isSelectedForMigration property: A value indicating whether this NIC is selected for migration. - * - * @return the isSelectedForMigration value. - */ - public String isSelectedForMigration() { - return this.isSelectedForMigration; - } - - /** - * Set the isSelectedForMigration property: A value indicating whether this NIC is selected for migration. - * - * @param isSelectedForMigration the isSelectedForMigration value to set. - * @return the VMwareCbtNicInput object itself. - */ - public VMwareCbtNicInput withIsSelectedForMigration(String isSelectedForMigration) { - this.isSelectedForMigration = isSelectedForMigration; - return this; - } - - /** - * Get the targetNicName property: Target NIC name. - * - * @return the targetNicName value. - */ - public String targetNicName() { - return this.targetNicName; - } - - /** - * Set the targetNicName property: Target NIC name. - * - * @param targetNicName the targetNicName value to set. - * @return the VMwareCbtNicInput object itself. - */ - public VMwareCbtNicInput withTargetNicName(String targetNicName) { - this.targetNicName = targetNicName; - return this; - } - - /** - * Get the testSubnetName property: The test subnet name. - * - * @return the testSubnetName value. - */ - public String testSubnetName() { - return this.testSubnetName; - } - - /** - * Set the testSubnetName property: The test subnet name. - * - * @param testSubnetName the testSubnetName value to set. - * @return the VMwareCbtNicInput object itself. - */ - public VMwareCbtNicInput withTestSubnetName(String testSubnetName) { - this.testSubnetName = testSubnetName; - return this; - } - - /** - * Get the testStaticIpAddress property: The test static IP address. - * - * @return the testStaticIpAddress value. - */ - public String testStaticIpAddress() { - return this.testStaticIpAddress; - } - - /** - * Set the testStaticIpAddress property: The test static IP address. - * - * @param testStaticIpAddress the testStaticIpAddress value to set. - * @return the VMwareCbtNicInput object itself. - */ - public VMwareCbtNicInput withTestStaticIpAddress(String testStaticIpAddress) { - this.testStaticIpAddress = testStaticIpAddress; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nicId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property nicId in model VMwareCbtNicInput")); - } - if (isPrimaryNic() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property isPrimaryNic in model VMwareCbtNicInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VMwareCbtNicInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nicId", this.nicId); - jsonWriter.writeStringField("isPrimaryNic", this.isPrimaryNic); - jsonWriter.writeStringField("targetSubnetName", this.targetSubnetName); - jsonWriter.writeStringField("targetStaticIPAddress", this.targetStaticIpAddress); - jsonWriter.writeStringField("isSelectedForMigration", this.isSelectedForMigration); - jsonWriter.writeStringField("targetNicName", this.targetNicName); - jsonWriter.writeStringField("testSubnetName", this.testSubnetName); - jsonWriter.writeStringField("testStaticIPAddress", this.testStaticIpAddress); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtNicInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtNicInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VMwareCbtNicInput. - */ - public static VMwareCbtNicInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtNicInput deserializedVMwareCbtNicInput = new VMwareCbtNicInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nicId".equals(fieldName)) { - deserializedVMwareCbtNicInput.nicId = reader.getString(); - } else if ("isPrimaryNic".equals(fieldName)) { - deserializedVMwareCbtNicInput.isPrimaryNic = reader.getString(); - } else if ("targetSubnetName".equals(fieldName)) { - deserializedVMwareCbtNicInput.targetSubnetName = reader.getString(); - } else if ("targetStaticIPAddress".equals(fieldName)) { - deserializedVMwareCbtNicInput.targetStaticIpAddress = reader.getString(); - } else if ("isSelectedForMigration".equals(fieldName)) { - deserializedVMwareCbtNicInput.isSelectedForMigration = reader.getString(); - } else if ("targetNicName".equals(fieldName)) { - deserializedVMwareCbtNicInput.targetNicName = reader.getString(); - } else if ("testSubnetName".equals(fieldName)) { - deserializedVMwareCbtNicInput.testSubnetName = reader.getString(); - } else if ("testStaticIPAddress".equals(fieldName)) { - deserializedVMwareCbtNicInput.testStaticIpAddress = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtNicInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtPolicyCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtPolicyCreationInput.java deleted file mode 100644 index fa5d6fa11773..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtPolicyCreationInput.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMware Cbt policy creation input. - */ -@Fluent -public final class VMwareCbtPolicyCreationInput extends PolicyProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "VMwareCbt"; - - /* - * The duration in minutes until which the recovery points need to be stored. - */ - private Integer recoveryPointHistoryInMinutes; - - /* - * The crash consistent snapshot frequency (in minutes). - */ - private Integer crashConsistentFrequencyInMinutes; - - /* - * The app consistent snapshot frequency (in minutes). - */ - private Integer appConsistentFrequencyInMinutes; - - /** - * Creates an instance of VMwareCbtPolicyCreationInput class. - */ - public VMwareCbtPolicyCreationInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointHistoryInMinutes property: The duration in minutes until which the recovery points need to - * be stored. - * - * @return the recoveryPointHistoryInMinutes value. - */ - public Integer recoveryPointHistoryInMinutes() { - return this.recoveryPointHistoryInMinutes; - } - - /** - * Set the recoveryPointHistoryInMinutes property: The duration in minutes until which the recovery points need to - * be stored. - * - * @param recoveryPointHistoryInMinutes the recoveryPointHistoryInMinutes value to set. - * @return the VMwareCbtPolicyCreationInput object itself. - */ - public VMwareCbtPolicyCreationInput withRecoveryPointHistoryInMinutes(Integer recoveryPointHistoryInMinutes) { - this.recoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; - return this; - } - - /** - * Get the crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency (in minutes). - * - * @return the crashConsistentFrequencyInMinutes value. - */ - public Integer crashConsistentFrequencyInMinutes() { - return this.crashConsistentFrequencyInMinutes; - } - - /** - * Set the crashConsistentFrequencyInMinutes property: 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 appConsistentFrequencyInMinutes property: The app consistent snapshot frequency (in minutes). - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPointHistoryInMinutes", this.recoveryPointHistoryInMinutes); - jsonWriter.writeNumberField("crashConsistentFrequencyInMinutes", this.crashConsistentFrequencyInMinutes); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtPolicyCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtPolicyCreationInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareCbtPolicyCreationInput. - */ - public static VMwareCbtPolicyCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtPolicyCreationInput deserializedVMwareCbtPolicyCreationInput = new VMwareCbtPolicyCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVMwareCbtPolicyCreationInput.instanceType = reader.getString(); - } else if ("recoveryPointHistoryInMinutes".equals(fieldName)) { - deserializedVMwareCbtPolicyCreationInput.recoveryPointHistoryInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("crashConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedVMwareCbtPolicyCreationInput.crashConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedVMwareCbtPolicyCreationInput.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtPolicyCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtProtectedDiskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtProtectedDiskDetails.java deleted file mode 100644 index 9a18f61030a9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtProtectedDiskDetails.java +++ /dev/null @@ -1,334 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMwareCbt protected disk details. - */ -@Fluent -public final class VMwareCbtProtectedDiskDetails implements JsonSerializable { - /* - * The disk id. - */ - private String diskId; - - /* - * The disk name. - */ - private String diskName; - - /* - * The disk type. - */ - private DiskAccountType diskType; - - /* - * The disk path. - */ - private String diskPath; - - /* - * A value indicating whether the disk is the OS disk. - */ - private String isOSDisk; - - /* - * The disk capacity in bytes. - */ - private Long capacityInBytes; - - /* - * The log storage account ARM Id. - */ - private String logStorageAccountId; - - /* - * The key vault secret name of the log storage account. - */ - private String logStorageAccountSasSecretName; - - /* - * The DiskEncryptionSet ARM Id. - */ - private String diskEncryptionSetId; - - /* - * The ARM Id of the seed managed disk. - */ - private String seedManagedDiskId; - - /* - * The uri of the seed blob. - */ - private String seedBlobUri; - - /* - * The ARM Id of the target managed disk. - */ - private String targetManagedDiskId; - - /* - * The uri of the target blob. - */ - private String targetBlobUri; - - /* - * The name for the target managed disk. - */ - private String targetDiskName; - - /* - * A value indicating the gateway operation details. - */ - private GatewayOperationDetails gatewayOperationDetails; - - /** - * Creates an instance of VMwareCbtProtectedDiskDetails class. - */ - public VMwareCbtProtectedDiskDetails() { - } - - /** - * Get the diskId property: The disk id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Get the diskName property: The disk name. - * - * @return the diskName value. - */ - public String diskName() { - return this.diskName; - } - - /** - * Get the diskType property: The disk type. - * - * @return the diskType value. - */ - public DiskAccountType diskType() { - return this.diskType; - } - - /** - * Set the diskType property: The disk type. - * - * @param diskType the diskType value to set. - * @return the VMwareCbtProtectedDiskDetails object itself. - */ - public VMwareCbtProtectedDiskDetails withDiskType(DiskAccountType diskType) { - this.diskType = diskType; - return this; - } - - /** - * Get the diskPath property: The disk path. - * - * @return the diskPath value. - */ - public String diskPath() { - return this.diskPath; - } - - /** - * Get the isOSDisk property: A value indicating whether the disk is the OS disk. - * - * @return the isOSDisk value. - */ - public String isOSDisk() { - return this.isOSDisk; - } - - /** - * Get the capacityInBytes property: The disk capacity in bytes. - * - * @return the capacityInBytes value. - */ - public Long capacityInBytes() { - return this.capacityInBytes; - } - - /** - * Get the logStorageAccountId property: The log storage account ARM Id. - * - * @return the logStorageAccountId value. - */ - public String logStorageAccountId() { - return this.logStorageAccountId; - } - - /** - * Get the logStorageAccountSasSecretName property: The key vault secret name of the log storage account. - * - * @return the logStorageAccountSasSecretName value. - */ - public String logStorageAccountSasSecretName() { - return this.logStorageAccountSasSecretName; - } - - /** - * Get the diskEncryptionSetId property: The DiskEncryptionSet ARM Id. - * - * @return the diskEncryptionSetId value. - */ - public String diskEncryptionSetId() { - return this.diskEncryptionSetId; - } - - /** - * Get the seedManagedDiskId property: The ARM Id of the seed managed disk. - * - * @return the seedManagedDiskId value. - */ - public String seedManagedDiskId() { - return this.seedManagedDiskId; - } - - /** - * Get the seedBlobUri property: The uri of the seed blob. - * - * @return the seedBlobUri value. - */ - public String seedBlobUri() { - return this.seedBlobUri; - } - - /** - * Get the targetManagedDiskId property: The ARM Id of the target managed disk. - * - * @return the targetManagedDiskId value. - */ - public String targetManagedDiskId() { - return this.targetManagedDiskId; - } - - /** - * Get the targetBlobUri property: The uri of the target blob. - * - * @return the targetBlobUri value. - */ - public String targetBlobUri() { - return this.targetBlobUri; - } - - /** - * Get the targetDiskName property: The name for the target managed disk. - * - * @return the targetDiskName value. - */ - public String targetDiskName() { - return this.targetDiskName; - } - - /** - * Set the targetDiskName property: The name for the target managed disk. - * - * @param targetDiskName the targetDiskName value to set. - * @return the VMwareCbtProtectedDiskDetails object itself. - */ - public VMwareCbtProtectedDiskDetails withTargetDiskName(String targetDiskName) { - this.targetDiskName = targetDiskName; - return this; - } - - /** - * Get the gatewayOperationDetails property: A value indicating the gateway operation details. - * - * @return the gatewayOperationDetails value. - */ - public GatewayOperationDetails gatewayOperationDetails() { - return this.gatewayOperationDetails; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (gatewayOperationDetails() != null) { - gatewayOperationDetails().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskType", this.diskType == null ? null : this.diskType.toString()); - jsonWriter.writeStringField("targetDiskName", this.targetDiskName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtProtectedDiskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtProtectedDiskDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareCbtProtectedDiskDetails. - */ - public static VMwareCbtProtectedDiskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtProtectedDiskDetails deserializedVMwareCbtProtectedDiskDetails - = new VMwareCbtProtectedDiskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.diskId = reader.getString(); - } else if ("diskName".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.diskName = reader.getString(); - } else if ("diskType".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.diskType = DiskAccountType.fromString(reader.getString()); - } else if ("diskPath".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.diskPath = reader.getString(); - } else if ("isOSDisk".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.isOSDisk = reader.getString(); - } else if ("capacityInBytes".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.capacityInBytes = reader.getNullable(JsonReader::getLong); - } else if ("logStorageAccountId".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.logStorageAccountId = reader.getString(); - } else if ("logStorageAccountSasSecretName".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.logStorageAccountSasSecretName = reader.getString(); - } else if ("diskEncryptionSetId".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.diskEncryptionSetId = reader.getString(); - } else if ("seedManagedDiskId".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.seedManagedDiskId = reader.getString(); - } else if ("seedBlobUri".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.seedBlobUri = reader.getString(); - } else if ("targetManagedDiskId".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.targetManagedDiskId = reader.getString(); - } else if ("targetBlobUri".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.targetBlobUri = reader.getString(); - } else if ("targetDiskName".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.targetDiskName = reader.getString(); - } else if ("gatewayOperationDetails".equals(fieldName)) { - deserializedVMwareCbtProtectedDiskDetails.gatewayOperationDetails - = GatewayOperationDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtProtectedDiskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtProtectionContainerMappingDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtProtectionContainerMappingDetails.java deleted file mode 100644 index e44e01317c43..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtProtectionContainerMappingDetails.java +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * VMwareCbt provider specific container mapping details. - */ -@Fluent -public final class VMwareCbtProtectionContainerMappingDetails - extends ProtectionContainerMappingProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "VMwareCbt"; - - /* - * The target key vault ARM Id. - */ - private String keyVaultId; - - /* - * The target key vault URI. - */ - private String keyVaultUri; - - /* - * The storage account ARM Id. - */ - private String storageAccountId; - - /* - * The secret name of the storage account. - */ - private String storageAccountSasSecretName; - - /* - * The secret name of the service bus connection string. - */ - private String serviceBusConnectionStringSecretName; - - /* - * The target location. - */ - private String targetLocation; - - /* - * The role size to NIC count map. - */ - private Map roleSizeToNicCountMap; - - /* - * The SKUs to be excluded. - */ - private List excludedSkus; - - /** - * Creates an instance of VMwareCbtProtectionContainerMappingDetails class. - */ - public VMwareCbtProtectionContainerMappingDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the keyVaultId property: The target key vault ARM Id. - * - * @return the keyVaultId value. - */ - public String keyVaultId() { - return this.keyVaultId; - } - - /** - * Get the keyVaultUri property: The target key vault URI. - * - * @return the keyVaultUri value. - */ - public String keyVaultUri() { - return this.keyVaultUri; - } - - /** - * Get the storageAccountId property: The storage account ARM Id. - * - * @return the storageAccountId value. - */ - public String storageAccountId() { - return this.storageAccountId; - } - - /** - * Get the storageAccountSasSecretName property: The secret name of the storage account. - * - * @return the storageAccountSasSecretName value. - */ - public String storageAccountSasSecretName() { - return this.storageAccountSasSecretName; - } - - /** - * Get the serviceBusConnectionStringSecretName property: The secret name of the service bus connection string. - * - * @return the serviceBusConnectionStringSecretName value. - */ - public String serviceBusConnectionStringSecretName() { - return this.serviceBusConnectionStringSecretName; - } - - /** - * Get the targetLocation property: The target location. - * - * @return the targetLocation value. - */ - public String targetLocation() { - return this.targetLocation; - } - - /** - * Get the roleSizeToNicCountMap property: The role size to NIC count map. - * - * @return the roleSizeToNicCountMap value. - */ - public Map roleSizeToNicCountMap() { - return this.roleSizeToNicCountMap; - } - - /** - * Get the excludedSkus property: The SKUs to be excluded. - * - * @return the excludedSkus value. - */ - public List excludedSkus() { - return this.excludedSkus; - } - - /** - * Set the excludedSkus property: The SKUs to be excluded. - * - * @param excludedSkus the excludedSkus value to set. - * @return the VMwareCbtProtectionContainerMappingDetails object itself. - */ - public VMwareCbtProtectionContainerMappingDetails withExcludedSkus(List excludedSkus) { - this.excludedSkus = excludedSkus; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("excludedSkus", this.excludedSkus, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtProtectionContainerMappingDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtProtectionContainerMappingDetails if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareCbtProtectionContainerMappingDetails. - */ - public static VMwareCbtProtectionContainerMappingDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtProtectionContainerMappingDetails deserializedVMwareCbtProtectionContainerMappingDetails - = new VMwareCbtProtectionContainerMappingDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVMwareCbtProtectionContainerMappingDetails.instanceType = reader.getString(); - } else if ("keyVaultId".equals(fieldName)) { - deserializedVMwareCbtProtectionContainerMappingDetails.keyVaultId = reader.getString(); - } else if ("keyVaultUri".equals(fieldName)) { - deserializedVMwareCbtProtectionContainerMappingDetails.keyVaultUri = reader.getString(); - } else if ("storageAccountId".equals(fieldName)) { - deserializedVMwareCbtProtectionContainerMappingDetails.storageAccountId = reader.getString(); - } else if ("storageAccountSasSecretName".equals(fieldName)) { - deserializedVMwareCbtProtectionContainerMappingDetails.storageAccountSasSecretName - = reader.getString(); - } else if ("serviceBusConnectionStringSecretName".equals(fieldName)) { - deserializedVMwareCbtProtectionContainerMappingDetails.serviceBusConnectionStringSecretName - = reader.getString(); - } else if ("targetLocation".equals(fieldName)) { - deserializedVMwareCbtProtectionContainerMappingDetails.targetLocation = reader.getString(); - } else if ("roleSizeToNicCountMap".equals(fieldName)) { - Map roleSizeToNicCountMap = reader.readMap(reader1 -> reader1.getInt()); - deserializedVMwareCbtProtectionContainerMappingDetails.roleSizeToNicCountMap - = roleSizeToNicCountMap; - } else if ("excludedSkus".equals(fieldName)) { - List excludedSkus = reader.readArray(reader1 -> reader1.getString()); - deserializedVMwareCbtProtectionContainerMappingDetails.excludedSkus = excludedSkus; - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtProtectionContainerMappingDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtResumeReplicationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtResumeReplicationInput.java deleted file mode 100644 index 5874b3c5baad..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtResumeReplicationInput.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMwareCbt specific resume replication input. - */ -@Fluent -public final class VMwareCbtResumeReplicationInput extends ResumeReplicationProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "VMwareCbt"; - - /* - * A value indicating whether Migration resources to be deleted. - */ - private String deleteMigrationResources; - - /** - * Creates an instance of VMwareCbtResumeReplicationInput class. - */ - public VMwareCbtResumeReplicationInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the deleteMigrationResources property: A value indicating whether Migration resources to be deleted. - * - * @return the deleteMigrationResources value. - */ - public String deleteMigrationResources() { - return this.deleteMigrationResources; - } - - /** - * Set the deleteMigrationResources property: A value indicating whether Migration resources to be deleted. - * - * @param deleteMigrationResources the deleteMigrationResources value to set. - * @return the VMwareCbtResumeReplicationInput object itself. - */ - public VMwareCbtResumeReplicationInput withDeleteMigrationResources(String deleteMigrationResources) { - this.deleteMigrationResources = deleteMigrationResources; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("deleteMigrationResources", this.deleteMigrationResources); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtResumeReplicationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtResumeReplicationInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareCbtResumeReplicationInput. - */ - public static VMwareCbtResumeReplicationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtResumeReplicationInput deserializedVMwareCbtResumeReplicationInput - = new VMwareCbtResumeReplicationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVMwareCbtResumeReplicationInput.instanceType = reader.getString(); - } else if ("deleteMigrationResources".equals(fieldName)) { - deserializedVMwareCbtResumeReplicationInput.deleteMigrationResources = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtResumeReplicationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtResyncInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtResyncInput.java deleted file mode 100644 index 0c0e34ce4980..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtResyncInput.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMwareCbt specific resync input. - */ -@Fluent -public final class VMwareCbtResyncInput extends ResyncProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "VMwareCbt"; - - /* - * A value indicating whether CBT is to be reset. - */ - private String skipCbtReset; - - /** - * Creates an instance of VMwareCbtResyncInput class. - */ - public VMwareCbtResyncInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the skipCbtReset property: A value indicating whether CBT is to be reset. - * - * @return the skipCbtReset value. - */ - public String skipCbtReset() { - return this.skipCbtReset; - } - - /** - * Set the skipCbtReset property: A value indicating whether CBT is to be reset. - * - * @param skipCbtReset the skipCbtReset value to set. - * @return the VMwareCbtResyncInput object itself. - */ - public VMwareCbtResyncInput withSkipCbtReset(String skipCbtReset) { - this.skipCbtReset = skipCbtReset; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (skipCbtReset() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property skipCbtReset in model VMwareCbtResyncInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VMwareCbtResyncInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("skipCbtReset", this.skipCbtReset); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtResyncInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtResyncInput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VMwareCbtResyncInput. - */ - public static VMwareCbtResyncInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtResyncInput deserializedVMwareCbtResyncInput = new VMwareCbtResyncInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("skipCbtReset".equals(fieldName)) { - deserializedVMwareCbtResyncInput.skipCbtReset = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedVMwareCbtResyncInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtResyncInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtSecurityProfileProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtSecurityProfileProperties.java deleted file mode 100644 index 620dab9b51c4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtSecurityProfileProperties.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMwareCbt security profile input. - */ -@Fluent -public final class VMwareCbtSecurityProfileProperties implements JsonSerializable { - /* - * The target VM security type. - */ - private SecurityType targetVmSecurityType; - - /* - * A value indicating whether secure boot to be enabled. - */ - private String isTargetVmSecureBootEnabled; - - /* - * A value indicating whether trusted platform module to be enabled. - */ - private String isTargetVmTpmEnabled; - - /* - * A value indicating whether integrity monitoring to be enabled. - */ - private String isTargetVmIntegrityMonitoringEnabled; - - /* - * A value indicating whether confidential compute encryption to be enabled. - */ - private String isTargetVmConfidentialEncryptionEnabled; - - /** - * Creates an instance of VMwareCbtSecurityProfileProperties class. - */ - public VMwareCbtSecurityProfileProperties() { - } - - /** - * Get the targetVmSecurityType property: The target VM security type. - * - * @return the targetVmSecurityType value. - */ - public SecurityType targetVmSecurityType() { - return this.targetVmSecurityType; - } - - /** - * Set the targetVmSecurityType property: The target VM security type. - * - * @param targetVmSecurityType the targetVmSecurityType value to set. - * @return the VMwareCbtSecurityProfileProperties object itself. - */ - public VMwareCbtSecurityProfileProperties withTargetVmSecurityType(SecurityType targetVmSecurityType) { - this.targetVmSecurityType = targetVmSecurityType; - return this; - } - - /** - * Get the isTargetVmSecureBootEnabled property: A value indicating whether secure boot to be enabled. - * - * @return the isTargetVmSecureBootEnabled value. - */ - public String isTargetVmSecureBootEnabled() { - return this.isTargetVmSecureBootEnabled; - } - - /** - * Set the isTargetVmSecureBootEnabled property: A value indicating whether secure boot to be enabled. - * - * @param isTargetVmSecureBootEnabled the isTargetVmSecureBootEnabled value to set. - * @return the VMwareCbtSecurityProfileProperties object itself. - */ - public VMwareCbtSecurityProfileProperties withIsTargetVmSecureBootEnabled(String isTargetVmSecureBootEnabled) { - this.isTargetVmSecureBootEnabled = isTargetVmSecureBootEnabled; - return this; - } - - /** - * Get the isTargetVmTpmEnabled property: A value indicating whether trusted platform module to be enabled. - * - * @return the isTargetVmTpmEnabled value. - */ - public String isTargetVmTpmEnabled() { - return this.isTargetVmTpmEnabled; - } - - /** - * Set the isTargetVmTpmEnabled property: A value indicating whether trusted platform module to be enabled. - * - * @param isTargetVmTpmEnabled the isTargetVmTpmEnabled value to set. - * @return the VMwareCbtSecurityProfileProperties object itself. - */ - public VMwareCbtSecurityProfileProperties withIsTargetVmTpmEnabled(String isTargetVmTpmEnabled) { - this.isTargetVmTpmEnabled = isTargetVmTpmEnabled; - return this; - } - - /** - * Get the isTargetVmIntegrityMonitoringEnabled property: A value indicating whether integrity monitoring to be - * enabled. - * - * @return the isTargetVmIntegrityMonitoringEnabled value. - */ - public String isTargetVmIntegrityMonitoringEnabled() { - return this.isTargetVmIntegrityMonitoringEnabled; - } - - /** - * Set the isTargetVmIntegrityMonitoringEnabled property: A value indicating whether integrity monitoring to be - * enabled. - * - * @param isTargetVmIntegrityMonitoringEnabled the isTargetVmIntegrityMonitoringEnabled value to set. - * @return the VMwareCbtSecurityProfileProperties object itself. - */ - public VMwareCbtSecurityProfileProperties - withIsTargetVmIntegrityMonitoringEnabled(String isTargetVmIntegrityMonitoringEnabled) { - this.isTargetVmIntegrityMonitoringEnabled = isTargetVmIntegrityMonitoringEnabled; - return this; - } - - /** - * Get the isTargetVmConfidentialEncryptionEnabled property: A value indicating whether confidential compute - * encryption to be enabled. - * - * @return the isTargetVmConfidentialEncryptionEnabled value. - */ - public String isTargetVmConfidentialEncryptionEnabled() { - return this.isTargetVmConfidentialEncryptionEnabled; - } - - /** - * Set the isTargetVmConfidentialEncryptionEnabled property: A value indicating whether confidential compute - * encryption to be enabled. - * - * @param isTargetVmConfidentialEncryptionEnabled the isTargetVmConfidentialEncryptionEnabled value to set. - * @return the VMwareCbtSecurityProfileProperties object itself. - */ - public VMwareCbtSecurityProfileProperties - withIsTargetVmConfidentialEncryptionEnabled(String isTargetVmConfidentialEncryptionEnabled) { - this.isTargetVmConfidentialEncryptionEnabled = isTargetVmConfidentialEncryptionEnabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetVmSecurityType", - this.targetVmSecurityType == null ? null : this.targetVmSecurityType.toString()); - jsonWriter.writeStringField("isTargetVmSecureBootEnabled", this.isTargetVmSecureBootEnabled); - jsonWriter.writeStringField("isTargetVmTpmEnabled", this.isTargetVmTpmEnabled); - jsonWriter.writeStringField("isTargetVmIntegrityMonitoringEnabled", this.isTargetVmIntegrityMonitoringEnabled); - jsonWriter.writeStringField("isTargetVmConfidentialEncryptionEnabled", - this.isTargetVmConfidentialEncryptionEnabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtSecurityProfileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtSecurityProfileProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareCbtSecurityProfileProperties. - */ - public static VMwareCbtSecurityProfileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtSecurityProfileProperties deserializedVMwareCbtSecurityProfileProperties - = new VMwareCbtSecurityProfileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetVmSecurityType".equals(fieldName)) { - deserializedVMwareCbtSecurityProfileProperties.targetVmSecurityType - = SecurityType.fromString(reader.getString()); - } else if ("isTargetVmSecureBootEnabled".equals(fieldName)) { - deserializedVMwareCbtSecurityProfileProperties.isTargetVmSecureBootEnabled = reader.getString(); - } else if ("isTargetVmTpmEnabled".equals(fieldName)) { - deserializedVMwareCbtSecurityProfileProperties.isTargetVmTpmEnabled = reader.getString(); - } else if ("isTargetVmIntegrityMonitoringEnabled".equals(fieldName)) { - deserializedVMwareCbtSecurityProfileProperties.isTargetVmIntegrityMonitoringEnabled - = reader.getString(); - } else if ("isTargetVmConfidentialEncryptionEnabled".equals(fieldName)) { - deserializedVMwareCbtSecurityProfileProperties.isTargetVmConfidentialEncryptionEnabled - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtSecurityProfileProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtTestMigrateInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtTestMigrateInput.java deleted file mode 100644 index 4a624996a61d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtTestMigrateInput.java +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * VMwareCbt specific test migrate input. - */ -@Fluent -public final class VMwareCbtTestMigrateInput extends TestMigrateProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "VMwareCbt"; - - /* - * The recovery point Id. - */ - private String recoveryPointId; - - /* - * The test network Id. - */ - private String networkId; - - /* - * The list of NIC details. - */ - private List vmNics; - - /* - * A value indicating the inplace OS Upgrade version. - */ - private String osUpgradeVersion; - - /** - * Creates an instance of VMwareCbtTestMigrateInput class. - */ - public VMwareCbtTestMigrateInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointId property: The recovery point Id. - * - * @return the recoveryPointId value. - */ - public String recoveryPointId() { - return this.recoveryPointId; - } - - /** - * Set the recoveryPointId property: The recovery point Id. - * - * @param recoveryPointId the recoveryPointId value to set. - * @return the VMwareCbtTestMigrateInput object itself. - */ - public VMwareCbtTestMigrateInput withRecoveryPointId(String recoveryPointId) { - this.recoveryPointId = recoveryPointId; - return this; - } - - /** - * Get the networkId property: The test network Id. - * - * @return the networkId value. - */ - public String networkId() { - return this.networkId; - } - - /** - * Set the networkId property: The test network Id. - * - * @param networkId the networkId value to set. - * @return the VMwareCbtTestMigrateInput object itself. - */ - public VMwareCbtTestMigrateInput withNetworkId(String networkId) { - this.networkId = networkId; - return this; - } - - /** - * Get the vmNics property: The list of NIC details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: The list of NIC details. - * - * @param vmNics the vmNics value to set. - * @return the VMwareCbtTestMigrateInput object itself. - */ - public VMwareCbtTestMigrateInput withVmNics(List vmNics) { - this.vmNics = vmNics; - return this; - } - - /** - * Get the osUpgradeVersion property: A value indicating the inplace OS Upgrade version. - * - * @return the osUpgradeVersion value. - */ - public String osUpgradeVersion() { - return this.osUpgradeVersion; - } - - /** - * Set the osUpgradeVersion property: A value indicating the inplace OS Upgrade version. - * - * @param osUpgradeVersion the osUpgradeVersion value to set. - * @return the VMwareCbtTestMigrateInput object itself. - */ - public VMwareCbtTestMigrateInput withOsUpgradeVersion(String osUpgradeVersion) { - this.osUpgradeVersion = osUpgradeVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryPointId in model VMwareCbtTestMigrateInput")); - } - if (networkId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkId in model VMwareCbtTestMigrateInput")); - } - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VMwareCbtTestMigrateInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recoveryPointId", this.recoveryPointId); - jsonWriter.writeStringField("networkId", this.networkId); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("osUpgradeVersion", this.osUpgradeVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtTestMigrateInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtTestMigrateInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VMwareCbtTestMigrateInput. - */ - public static VMwareCbtTestMigrateInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtTestMigrateInput deserializedVMwareCbtTestMigrateInput = new VMwareCbtTestMigrateInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recoveryPointId".equals(fieldName)) { - deserializedVMwareCbtTestMigrateInput.recoveryPointId = reader.getString(); - } else if ("networkId".equals(fieldName)) { - deserializedVMwareCbtTestMigrateInput.networkId = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedVMwareCbtTestMigrateInput.instanceType = reader.getString(); - } else if ("vmNics".equals(fieldName)) { - List vmNics = reader.readArray(reader1 -> VMwareCbtNicInput.fromJson(reader1)); - deserializedVMwareCbtTestMigrateInput.vmNics = vmNics; - } else if ("osUpgradeVersion".equals(fieldName)) { - deserializedVMwareCbtTestMigrateInput.osUpgradeVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtTestMigrateInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtUpdateDiskInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtUpdateDiskInput.java deleted file mode 100644 index 75c15c661600..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtUpdateDiskInput.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMwareCbt disk input for update. - */ -@Fluent -public final class VMwareCbtUpdateDiskInput implements JsonSerializable { - /* - * The disk Id. - */ - private String diskId; - - /* - * The target disk name. - */ - private String targetDiskName; - - /* - * A value indicating whether the disk is the OS disk. - */ - private String isOSDisk; - - /** - * Creates an instance of VMwareCbtUpdateDiskInput class. - */ - public VMwareCbtUpdateDiskInput() { - } - - /** - * Get the diskId property: The disk Id. - * - * @return the diskId value. - */ - public String diskId() { - return this.diskId; - } - - /** - * Set the diskId property: The disk Id. - * - * @param diskId the diskId value to set. - * @return the VMwareCbtUpdateDiskInput object itself. - */ - public VMwareCbtUpdateDiskInput withDiskId(String diskId) { - this.diskId = diskId; - return this; - } - - /** - * Get the targetDiskName property: The target disk name. - * - * @return the targetDiskName value. - */ - public String targetDiskName() { - return this.targetDiskName; - } - - /** - * Set the targetDiskName property: The target disk name. - * - * @param targetDiskName the targetDiskName value to set. - * @return the VMwareCbtUpdateDiskInput object itself. - */ - public VMwareCbtUpdateDiskInput withTargetDiskName(String targetDiskName) { - this.targetDiskName = targetDiskName; - return this; - } - - /** - * Get the isOSDisk property: A value indicating whether the disk is the OS disk. - * - * @return the isOSDisk value. - */ - public String isOSDisk() { - return this.isOSDisk; - } - - /** - * Set the isOSDisk property: A value indicating whether the disk is the OS disk. - * - * @param isOSDisk the isOSDisk value to set. - * @return the VMwareCbtUpdateDiskInput object itself. - */ - public VMwareCbtUpdateDiskInput withIsOSDisk(String isOSDisk) { - this.isOSDisk = isOSDisk; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskId() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property diskId in model VMwareCbtUpdateDiskInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VMwareCbtUpdateDiskInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("diskId", this.diskId); - jsonWriter.writeStringField("targetDiskName", this.targetDiskName); - jsonWriter.writeStringField("isOSDisk", this.isOSDisk); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtUpdateDiskInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtUpdateDiskInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VMwareCbtUpdateDiskInput. - */ - public static VMwareCbtUpdateDiskInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtUpdateDiskInput deserializedVMwareCbtUpdateDiskInput = new VMwareCbtUpdateDiskInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskId".equals(fieldName)) { - deserializedVMwareCbtUpdateDiskInput.diskId = reader.getString(); - } else if ("targetDiskName".equals(fieldName)) { - deserializedVMwareCbtUpdateDiskInput.targetDiskName = reader.getString(); - } else if ("isOSDisk".equals(fieldName)) { - deserializedVMwareCbtUpdateDiskInput.isOSDisk = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtUpdateDiskInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtUpdateMigrationItemInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtUpdateMigrationItemInput.java deleted file mode 100644 index 6b401c375f43..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareCbtUpdateMigrationItemInput.java +++ /dev/null @@ -1,582 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * VMwareCbt specific update migration item input. - */ -@Fluent -public final class VMwareCbtUpdateMigrationItemInput extends UpdateMigrationItemProviderSpecificInput { - /* - * The class type. - */ - private String instanceType = "VMwareCbt"; - - /* - * The target VM name. - */ - private String targetVmName; - - /* - * The target VM size. - */ - private String targetVmSize; - - /* - * The target resource group ARM Id. - */ - private String targetResourceGroupId; - - /* - * The target availability set ARM Id. - */ - private String targetAvailabilitySetId; - - /* - * The target availability zone. - */ - private String targetAvailabilityZone; - - /* - * The target proximity placement group ARM Id. - */ - private String targetProximityPlacementGroupId; - - /* - * The target boot diagnostics storage account ARM Id. - */ - private String targetBootDiagnosticsStorageAccountId; - - /* - * The target network ARM Id. - */ - private String targetNetworkId; - - /* - * The test network ARM Id. - */ - private String testNetworkId; - - /* - * The list of NIC details. - */ - private List vmNics; - - /* - * The list of disk update properties. - */ - private List vmDisks; - - /* - * The license type. - */ - private LicenseType licenseType; - - /* - * The SQL Server license type. - */ - private SqlServerLicenseType sqlServerLicenseType; - - /* - * A value indicating whether auto resync is to be done. - */ - private String performAutoResync; - - /* - * The target VM tags. - */ - private Map targetVmTags; - - /* - * The tags for the target disks. - */ - private Map targetDiskTags; - - /* - * The tags for the target NICs. - */ - private Map targetNicTags; - - /** - * Creates an instance of VMwareCbtUpdateMigrationItemInput class. - */ - public VMwareCbtUpdateMigrationItemInput() { - } - - /** - * Get the instanceType property: The class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the targetVmName property: The target VM name. - * - * @return the targetVmName value. - */ - public String targetVmName() { - return this.targetVmName; - } - - /** - * Set the targetVmName property: The target VM name. - * - * @param targetVmName the targetVmName value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withTargetVmName(String targetVmName) { - this.targetVmName = targetVmName; - return this; - } - - /** - * Get the targetVmSize property: The target VM size. - * - * @return the targetVmSize value. - */ - public String targetVmSize() { - return this.targetVmSize; - } - - /** - * Set the targetVmSize property: The target VM size. - * - * @param targetVmSize the targetVmSize value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withTargetVmSize(String targetVmSize) { - this.targetVmSize = targetVmSize; - return this; - } - - /** - * Get the targetResourceGroupId property: The target resource group ARM Id. - * - * @return the targetResourceGroupId value. - */ - public String targetResourceGroupId() { - return this.targetResourceGroupId; - } - - /** - * Set the targetResourceGroupId property: The target resource group ARM Id. - * - * @param targetResourceGroupId the targetResourceGroupId value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withTargetResourceGroupId(String targetResourceGroupId) { - this.targetResourceGroupId = targetResourceGroupId; - return this; - } - - /** - * Get the targetAvailabilitySetId property: The target availability set ARM Id. - * - * @return the targetAvailabilitySetId value. - */ - public String targetAvailabilitySetId() { - return this.targetAvailabilitySetId; - } - - /** - * Set the targetAvailabilitySetId property: The target availability set ARM Id. - * - * @param targetAvailabilitySetId the targetAvailabilitySetId value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withTargetAvailabilitySetId(String targetAvailabilitySetId) { - this.targetAvailabilitySetId = targetAvailabilitySetId; - return this; - } - - /** - * Get the targetAvailabilityZone property: The target availability zone. - * - * @return the targetAvailabilityZone value. - */ - public String targetAvailabilityZone() { - return this.targetAvailabilityZone; - } - - /** - * Set the targetAvailabilityZone property: The target availability zone. - * - * @param targetAvailabilityZone the targetAvailabilityZone value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withTargetAvailabilityZone(String targetAvailabilityZone) { - this.targetAvailabilityZone = targetAvailabilityZone; - return this; - } - - /** - * Get the targetProximityPlacementGroupId property: The target proximity placement group ARM Id. - * - * @return the targetProximityPlacementGroupId value. - */ - public String targetProximityPlacementGroupId() { - return this.targetProximityPlacementGroupId; - } - - /** - * Set the targetProximityPlacementGroupId property: The target proximity placement group ARM Id. - * - * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput - withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) { - this.targetProximityPlacementGroupId = targetProximityPlacementGroupId; - return this; - } - - /** - * Get the targetBootDiagnosticsStorageAccountId property: The target boot diagnostics storage account ARM Id. - * - * @return the targetBootDiagnosticsStorageAccountId value. - */ - public String targetBootDiagnosticsStorageAccountId() { - return this.targetBootDiagnosticsStorageAccountId; - } - - /** - * Set the targetBootDiagnosticsStorageAccountId property: The target boot diagnostics storage account ARM Id. - * - * @param targetBootDiagnosticsStorageAccountId the targetBootDiagnosticsStorageAccountId value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput - withTargetBootDiagnosticsStorageAccountId(String targetBootDiagnosticsStorageAccountId) { - this.targetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; - return this; - } - - /** - * Get the targetNetworkId property: The target network ARM Id. - * - * @return the targetNetworkId value. - */ - public String targetNetworkId() { - return this.targetNetworkId; - } - - /** - * Set the targetNetworkId property: The target network ARM Id. - * - * @param targetNetworkId the targetNetworkId value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withTargetNetworkId(String targetNetworkId) { - this.targetNetworkId = targetNetworkId; - return this; - } - - /** - * Get the testNetworkId property: The test network ARM Id. - * - * @return the testNetworkId value. - */ - public String testNetworkId() { - return this.testNetworkId; - } - - /** - * Set the testNetworkId property: The test network ARM Id. - * - * @param testNetworkId the testNetworkId value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withTestNetworkId(String testNetworkId) { - this.testNetworkId = testNetworkId; - return this; - } - - /** - * Get the vmNics property: The list of NIC details. - * - * @return the vmNics value. - */ - public List vmNics() { - return this.vmNics; - } - - /** - * Set the vmNics property: The list of NIC details. - * - * @param vmNics the vmNics value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withVmNics(List vmNics) { - this.vmNics = vmNics; - return this; - } - - /** - * Get the vmDisks property: The list of disk update properties. - * - * @return the vmDisks value. - */ - public List vmDisks() { - return this.vmDisks; - } - - /** - * Set the vmDisks property: The list of disk update properties. - * - * @param vmDisks the vmDisks value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withVmDisks(List vmDisks) { - this.vmDisks = vmDisks; - return this; - } - - /** - * Get the licenseType property: The license type. - * - * @return the licenseType value. - */ - public LicenseType licenseType() { - return this.licenseType; - } - - /** - * Set the licenseType property: The license type. - * - * @param licenseType the licenseType value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withLicenseType(LicenseType licenseType) { - this.licenseType = licenseType; - return this; - } - - /** - * Get the sqlServerLicenseType property: The SQL Server license type. - * - * @return the sqlServerLicenseType value. - */ - public SqlServerLicenseType sqlServerLicenseType() { - return this.sqlServerLicenseType; - } - - /** - * Set the sqlServerLicenseType property: The SQL Server license type. - * - * @param sqlServerLicenseType the sqlServerLicenseType value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withSqlServerLicenseType(SqlServerLicenseType sqlServerLicenseType) { - this.sqlServerLicenseType = sqlServerLicenseType; - return this; - } - - /** - * Get the performAutoResync property: A value indicating whether auto resync is to be done. - * - * @return the performAutoResync value. - */ - public String performAutoResync() { - return this.performAutoResync; - } - - /** - * Set the performAutoResync property: A value indicating whether auto resync is to be done. - * - * @param performAutoResync the performAutoResync value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withPerformAutoResync(String performAutoResync) { - this.performAutoResync = performAutoResync; - return this; - } - - /** - * Get the targetVmTags property: The target VM tags. - * - * @return the targetVmTags value. - */ - public Map targetVmTags() { - return this.targetVmTags; - } - - /** - * Set the targetVmTags property: The target VM tags. - * - * @param targetVmTags the targetVmTags value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withTargetVmTags(Map targetVmTags) { - this.targetVmTags = targetVmTags; - return this; - } - - /** - * Get the targetDiskTags property: The tags for the target disks. - * - * @return the targetDiskTags value. - */ - public Map targetDiskTags() { - return this.targetDiskTags; - } - - /** - * Set the targetDiskTags property: The tags for the target disks. - * - * @param targetDiskTags the targetDiskTags value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withTargetDiskTags(Map targetDiskTags) { - this.targetDiskTags = targetDiskTags; - return this; - } - - /** - * Get the targetNicTags property: The tags for the target NICs. - * - * @return the targetNicTags value. - */ - public Map targetNicTags() { - return this.targetNicTags; - } - - /** - * Set the targetNicTags property: The tags for the target NICs. - * - * @param targetNicTags the targetNicTags value to set. - * @return the VMwareCbtUpdateMigrationItemInput object itself. - */ - public VMwareCbtUpdateMigrationItemInput withTargetNicTags(Map targetNicTags) { - this.targetNicTags = targetNicTags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (vmNics() != null) { - vmNics().forEach(e -> e.validate()); - } - if (vmDisks() != null) { - vmDisks().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("targetVmName", this.targetVmName); - jsonWriter.writeStringField("targetVmSize", this.targetVmSize); - jsonWriter.writeStringField("targetResourceGroupId", this.targetResourceGroupId); - jsonWriter.writeStringField("targetAvailabilitySetId", this.targetAvailabilitySetId); - jsonWriter.writeStringField("targetAvailabilityZone", this.targetAvailabilityZone); - jsonWriter.writeStringField("targetProximityPlacementGroupId", this.targetProximityPlacementGroupId); - jsonWriter.writeStringField("targetBootDiagnosticsStorageAccountId", - this.targetBootDiagnosticsStorageAccountId); - jsonWriter.writeStringField("targetNetworkId", this.targetNetworkId); - jsonWriter.writeStringField("testNetworkId", this.testNetworkId); - jsonWriter.writeArrayField("vmNics", this.vmNics, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("vmDisks", this.vmDisks, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); - jsonWriter.writeStringField("sqlServerLicenseType", - this.sqlServerLicenseType == null ? null : this.sqlServerLicenseType.toString()); - jsonWriter.writeStringField("performAutoResync", this.performAutoResync); - jsonWriter.writeMapField("targetVmTags", this.targetVmTags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetDiskTags", this.targetDiskTags, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("targetNicTags", this.targetNicTags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareCbtUpdateMigrationItemInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareCbtUpdateMigrationItemInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareCbtUpdateMigrationItemInput. - */ - public static VMwareCbtUpdateMigrationItemInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareCbtUpdateMigrationItemInput deserializedVMwareCbtUpdateMigrationItemInput - = new VMwareCbtUpdateMigrationItemInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.instanceType = reader.getString(); - } else if ("targetVmName".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.targetVmName = reader.getString(); - } else if ("targetVmSize".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.targetVmSize = reader.getString(); - } else if ("targetResourceGroupId".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.targetResourceGroupId = reader.getString(); - } else if ("targetAvailabilitySetId".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.targetAvailabilitySetId = reader.getString(); - } else if ("targetAvailabilityZone".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.targetAvailabilityZone = reader.getString(); - } else if ("targetProximityPlacementGroupId".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.targetProximityPlacementGroupId = reader.getString(); - } else if ("targetBootDiagnosticsStorageAccountId".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.targetBootDiagnosticsStorageAccountId - = reader.getString(); - } else if ("targetNetworkId".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.targetNetworkId = reader.getString(); - } else if ("testNetworkId".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.testNetworkId = reader.getString(); - } else if ("vmNics".equals(fieldName)) { - List vmNics = reader.readArray(reader1 -> VMwareCbtNicInput.fromJson(reader1)); - deserializedVMwareCbtUpdateMigrationItemInput.vmNics = vmNics; - } else if ("vmDisks".equals(fieldName)) { - List vmDisks - = reader.readArray(reader1 -> VMwareCbtUpdateDiskInput.fromJson(reader1)); - deserializedVMwareCbtUpdateMigrationItemInput.vmDisks = vmDisks; - } else if ("licenseType".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.licenseType - = LicenseType.fromString(reader.getString()); - } else if ("sqlServerLicenseType".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.sqlServerLicenseType - = SqlServerLicenseType.fromString(reader.getString()); - } else if ("performAutoResync".equals(fieldName)) { - deserializedVMwareCbtUpdateMigrationItemInput.performAutoResync = reader.getString(); - } else if ("targetVmTags".equals(fieldName)) { - Map targetVmTags = reader.readMap(reader1 -> reader1.getString()); - deserializedVMwareCbtUpdateMigrationItemInput.targetVmTags = targetVmTags; - } else if ("targetDiskTags".equals(fieldName)) { - Map targetDiskTags = reader.readMap(reader1 -> reader1.getString()); - deserializedVMwareCbtUpdateMigrationItemInput.targetDiskTags = targetDiskTags; - } else if ("targetNicTags".equals(fieldName)) { - Map targetNicTags = reader.readMap(reader1 -> reader1.getString()); - deserializedVMwareCbtUpdateMigrationItemInput.targetNicTags = targetNicTags; - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareCbtUpdateMigrationItemInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareDetails.java deleted file mode 100644 index 3db74b587a8a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareDetails.java +++ /dev/null @@ -1,1044 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * Store the fabric details specific to the VMware fabric. - */ -@Fluent -public final class VMwareDetails extends FabricSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "VMware"; - - /* - * The list of Process Servers associated with the fabric. - */ - private List processServers; - - /* - * The list of Master Target servers associated with the fabric. - */ - private List masterTargetServers; - - /* - * The list of run as accounts created on the server. - */ - private List runAsAccounts; - - /* - * The number of replication pairs configured in this CS. - */ - private String replicationPairCount; - - /* - * The number of process servers. - */ - private String processServerCount; - - /* - * The number of source and target servers configured to talk to this CS. - */ - private String agentCount; - - /* - * The number of protected servers. - */ - private String protectedServers; - - /* - * The percentage of the system load. - */ - private String systemLoad; - - /* - * The system load status. - */ - private String systemLoadStatus; - - /* - * The percentage of the CPU load. - */ - private String cpuLoad; - - /* - * The CPU load status. - */ - private String cpuLoadStatus; - - /* - * The total memory. - */ - private Long totalMemoryInBytes; - - /* - * The available memory. - */ - private Long availableMemoryInBytes; - - /* - * The memory usage status. - */ - private String memoryUsageStatus; - - /* - * The total space. - */ - private Long totalSpaceInBytes; - - /* - * The available space. - */ - private Long availableSpaceInBytes; - - /* - * The space usage status. - */ - private String spaceUsageStatus; - - /* - * The web load. - */ - private String webLoad; - - /* - * The web load status. - */ - private String webLoadStatus; - - /* - * The database server load. - */ - private String databaseServerLoad; - - /* - * The database server load status. - */ - private String databaseServerLoadStatus; - - /* - * The CS service status. - */ - private String csServiceStatus; - - /* - * The IP address. - */ - private String ipAddress; - - /* - * The agent Version. - */ - private String agentVersion; - - /* - * The host name. - */ - private String hostname; - - /* - * The last heartbeat received from CS server. - */ - private OffsetDateTime lastHeartbeat; - - /* - * Version status. - */ - private String versionStatus; - - /* - * CS SSL cert expiry date. - */ - private OffsetDateTime sslCertExpiryDate; - - /* - * CS SSL cert expiry date. - */ - private Integer sslCertExpiryRemainingDays; - - /* - * PS template version. - */ - private String psTemplateVersion; - - /* - * Agent expiry date. - */ - private OffsetDateTime agentExpiryDate; - - /* - * The agent version details. - */ - private VersionDetails agentVersionDetails; - - /* - * The switch provider blocking error information. - */ - private List switchProviderBlockingErrorDetails; - - /** - * Creates an instance of VMwareDetails class. - */ - public VMwareDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the processServers property: The list of Process Servers associated with the fabric. - * - * @return the processServers value. - */ - public List processServers() { - return this.processServers; - } - - /** - * Set the processServers property: 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 masterTargetServers property: The list of Master Target servers associated with the fabric. - * - * @return the masterTargetServers value. - */ - public List masterTargetServers() { - return this.masterTargetServers; - } - - /** - * Set the masterTargetServers property: 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 runAsAccounts property: The list of run as accounts created on the server. - * - * @return the runAsAccounts value. - */ - public List runAsAccounts() { - return this.runAsAccounts; - } - - /** - * Set the runAsAccounts property: 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 replicationPairCount property: The number of replication pairs configured in this CS. - * - * @return the replicationPairCount value. - */ - public String replicationPairCount() { - return this.replicationPairCount; - } - - /** - * Set the replicationPairCount property: 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 processServerCount property: The number of process servers. - * - * @return the processServerCount value. - */ - public String processServerCount() { - return this.processServerCount; - } - - /** - * Set the processServerCount property: 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 agentCount property: 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 agentCount property: 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 protectedServers property: The number of protected servers. - * - * @return the protectedServers value. - */ - public String protectedServers() { - return this.protectedServers; - } - - /** - * Set the protectedServers property: 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 systemLoad property: The percentage of the system load. - * - * @return the systemLoad value. - */ - public String systemLoad() { - return this.systemLoad; - } - - /** - * Set the systemLoad property: 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 systemLoadStatus property: The system load status. - * - * @return the systemLoadStatus value. - */ - public String systemLoadStatus() { - return this.systemLoadStatus; - } - - /** - * Set the systemLoadStatus property: 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 cpuLoad property: The percentage of the CPU load. - * - * @return the cpuLoad value. - */ - public String cpuLoad() { - return this.cpuLoad; - } - - /** - * Set the cpuLoad property: 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 cpuLoadStatus property: The CPU load status. - * - * @return the cpuLoadStatus value. - */ - public String cpuLoadStatus() { - return this.cpuLoadStatus; - } - - /** - * Set the cpuLoadStatus property: 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 totalMemoryInBytes property: The total memory. - * - * @return the totalMemoryInBytes value. - */ - public Long totalMemoryInBytes() { - return this.totalMemoryInBytes; - } - - /** - * Set the totalMemoryInBytes property: 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 availableMemoryInBytes property: The available memory. - * - * @return the availableMemoryInBytes value. - */ - public Long availableMemoryInBytes() { - return this.availableMemoryInBytes; - } - - /** - * Set the availableMemoryInBytes property: 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 memoryUsageStatus property: The memory usage status. - * - * @return the memoryUsageStatus value. - */ - public String memoryUsageStatus() { - return this.memoryUsageStatus; - } - - /** - * Set the memoryUsageStatus property: 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 totalSpaceInBytes property: The total space. - * - * @return the totalSpaceInBytes value. - */ - public Long totalSpaceInBytes() { - return this.totalSpaceInBytes; - } - - /** - * Set the totalSpaceInBytes property: 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 availableSpaceInBytes property: The available space. - * - * @return the availableSpaceInBytes value. - */ - public Long availableSpaceInBytes() { - return this.availableSpaceInBytes; - } - - /** - * Set the availableSpaceInBytes property: 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 spaceUsageStatus property: The space usage status. - * - * @return the spaceUsageStatus value. - */ - public String spaceUsageStatus() { - return this.spaceUsageStatus; - } - - /** - * Set the spaceUsageStatus property: 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 webLoad property: The web load. - * - * @return the webLoad value. - */ - public String webLoad() { - return this.webLoad; - } - - /** - * Set the webLoad property: 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 webLoadStatus property: The web load status. - * - * @return the webLoadStatus value. - */ - public String webLoadStatus() { - return this.webLoadStatus; - } - - /** - * Set the webLoadStatus property: 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 databaseServerLoad property: The database server load. - * - * @return the databaseServerLoad value. - */ - public String databaseServerLoad() { - return this.databaseServerLoad; - } - - /** - * Set the databaseServerLoad property: 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 databaseServerLoadStatus property: The database server load status. - * - * @return the databaseServerLoadStatus value. - */ - public String databaseServerLoadStatus() { - return this.databaseServerLoadStatus; - } - - /** - * Set the databaseServerLoadStatus property: 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 csServiceStatus property: The CS service status. - * - * @return the csServiceStatus value. - */ - public String csServiceStatus() { - return this.csServiceStatus; - } - - /** - * Set the csServiceStatus property: 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 ipAddress property: The IP address. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: 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 agentVersion property: The agent Version. - * - * @return the agentVersion value. - */ - public String agentVersion() { - return this.agentVersion; - } - - /** - * Set the agentVersion property: 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 hostname property: The host name. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Set the hostname property: 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 lastHeartbeat property: The last heartbeat received from CS server. - * - * @return the lastHeartbeat value. - */ - public OffsetDateTime lastHeartbeat() { - return this.lastHeartbeat; - } - - /** - * Set the lastHeartbeat property: The last heartbeat received from CS server. - * - * @param lastHeartbeat the lastHeartbeat value to set. - * @return the VMwareDetails object itself. - */ - public VMwareDetails withLastHeartbeat(OffsetDateTime lastHeartbeat) { - this.lastHeartbeat = lastHeartbeat; - return this; - } - - /** - * Get the versionStatus property: Version status. - * - * @return the versionStatus value. - */ - public String versionStatus() { - return this.versionStatus; - } - - /** - * Set the versionStatus property: 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 the sslCertExpiryDate property: CS SSL cert expiry date. - * - * @return the sslCertExpiryDate value. - */ - public OffsetDateTime sslCertExpiryDate() { - return this.sslCertExpiryDate; - } - - /** - * Set the sslCertExpiryDate property: CS SSL cert expiry date. - * - * @param sslCertExpiryDate the sslCertExpiryDate value to set. - * @return the VMwareDetails object itself. - */ - public VMwareDetails withSslCertExpiryDate(OffsetDateTime sslCertExpiryDate) { - this.sslCertExpiryDate = sslCertExpiryDate; - return this; - } - - /** - * Get the sslCertExpiryRemainingDays property: CS SSL cert expiry date. - * - * @return the sslCertExpiryRemainingDays value. - */ - public Integer sslCertExpiryRemainingDays() { - return this.sslCertExpiryRemainingDays; - } - - /** - * Set the sslCertExpiryRemainingDays property: 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 the psTemplateVersion property: PS template version. - * - * @return the psTemplateVersion value. - */ - public String psTemplateVersion() { - return this.psTemplateVersion; - } - - /** - * Set the psTemplateVersion property: 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; - } - - /** - * Get the agentExpiryDate property: Agent expiry date. - * - * @return the agentExpiryDate value. - */ - public OffsetDateTime agentExpiryDate() { - return this.agentExpiryDate; - } - - /** - * Set the agentExpiryDate property: Agent expiry date. - * - * @param agentExpiryDate the agentExpiryDate value to set. - * @return the VMwareDetails object itself. - */ - public VMwareDetails withAgentExpiryDate(OffsetDateTime agentExpiryDate) { - this.agentExpiryDate = agentExpiryDate; - return this; - } - - /** - * Get the agentVersionDetails property: The agent version details. - * - * @return the agentVersionDetails value. - */ - public VersionDetails agentVersionDetails() { - return this.agentVersionDetails; - } - - /** - * Set the agentVersionDetails property: The agent version details. - * - * @param agentVersionDetails the agentVersionDetails value to set. - * @return the VMwareDetails object itself. - */ - public VMwareDetails withAgentVersionDetails(VersionDetails agentVersionDetails) { - this.agentVersionDetails = agentVersionDetails; - return this; - } - - /** - * Get the switchProviderBlockingErrorDetails property: The switch provider blocking error information. - * - * @return the switchProviderBlockingErrorDetails value. - */ - public List switchProviderBlockingErrorDetails() { - return this.switchProviderBlockingErrorDetails; - } - - /** - * Set the switchProviderBlockingErrorDetails property: The switch provider blocking error information. - * - * @param switchProviderBlockingErrorDetails the switchProviderBlockingErrorDetails value to set. - * @return the VMwareDetails object itself. - */ - public VMwareDetails withSwitchProviderBlockingErrorDetails( - List switchProviderBlockingErrorDetails) { - this.switchProviderBlockingErrorDetails = switchProviderBlockingErrorDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (processServers() != null) { - processServers().forEach(e -> e.validate()); - } - if (masterTargetServers() != null) { - masterTargetServers().forEach(e -> e.validate()); - } - if (runAsAccounts() != null) { - runAsAccounts().forEach(e -> e.validate()); - } - if (agentVersionDetails() != null) { - agentVersionDetails().validate(); - } - if (switchProviderBlockingErrorDetails() != null) { - switchProviderBlockingErrorDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeArrayField("processServers", this.processServers, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("masterTargetServers", this.masterTargetServers, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("runAsAccounts", this.runAsAccounts, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("replicationPairCount", this.replicationPairCount); - jsonWriter.writeStringField("processServerCount", this.processServerCount); - jsonWriter.writeStringField("agentCount", this.agentCount); - jsonWriter.writeStringField("protectedServers", this.protectedServers); - jsonWriter.writeStringField("systemLoad", this.systemLoad); - jsonWriter.writeStringField("systemLoadStatus", this.systemLoadStatus); - jsonWriter.writeStringField("cpuLoad", this.cpuLoad); - jsonWriter.writeStringField("cpuLoadStatus", this.cpuLoadStatus); - jsonWriter.writeNumberField("totalMemoryInBytes", this.totalMemoryInBytes); - jsonWriter.writeNumberField("availableMemoryInBytes", this.availableMemoryInBytes); - jsonWriter.writeStringField("memoryUsageStatus", this.memoryUsageStatus); - jsonWriter.writeNumberField("totalSpaceInBytes", this.totalSpaceInBytes); - jsonWriter.writeNumberField("availableSpaceInBytes", this.availableSpaceInBytes); - jsonWriter.writeStringField("spaceUsageStatus", this.spaceUsageStatus); - jsonWriter.writeStringField("webLoad", this.webLoad); - jsonWriter.writeStringField("webLoadStatus", this.webLoadStatus); - jsonWriter.writeStringField("databaseServerLoad", this.databaseServerLoad); - jsonWriter.writeStringField("databaseServerLoadStatus", this.databaseServerLoadStatus); - jsonWriter.writeStringField("csServiceStatus", this.csServiceStatus); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("agentVersion", this.agentVersion); - jsonWriter.writeStringField("hostName", this.hostname); - jsonWriter.writeStringField("lastHeartbeat", - this.lastHeartbeat == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastHeartbeat)); - jsonWriter.writeStringField("versionStatus", this.versionStatus); - jsonWriter.writeStringField("sslCertExpiryDate", - this.sslCertExpiryDate == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.sslCertExpiryDate)); - jsonWriter.writeNumberField("sslCertExpiryRemainingDays", this.sslCertExpiryRemainingDays); - jsonWriter.writeStringField("psTemplateVersion", this.psTemplateVersion); - jsonWriter.writeStringField("agentExpiryDate", - this.agentExpiryDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.agentExpiryDate)); - jsonWriter.writeJsonField("agentVersionDetails", this.agentVersionDetails); - jsonWriter.writeArrayField("switchProviderBlockingErrorDetails", this.switchProviderBlockingErrorDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareDetails. - */ - public static VMwareDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareDetails deserializedVMwareDetails = new VMwareDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVMwareDetails.instanceType = reader.getString(); - } else if ("processServers".equals(fieldName)) { - List processServers = reader.readArray(reader1 -> ProcessServer.fromJson(reader1)); - deserializedVMwareDetails.processServers = processServers; - } else if ("masterTargetServers".equals(fieldName)) { - List masterTargetServers - = reader.readArray(reader1 -> MasterTargetServer.fromJson(reader1)); - deserializedVMwareDetails.masterTargetServers = masterTargetServers; - } else if ("runAsAccounts".equals(fieldName)) { - List runAsAccounts = reader.readArray(reader1 -> RunAsAccount.fromJson(reader1)); - deserializedVMwareDetails.runAsAccounts = runAsAccounts; - } else if ("replicationPairCount".equals(fieldName)) { - deserializedVMwareDetails.replicationPairCount = reader.getString(); - } else if ("processServerCount".equals(fieldName)) { - deserializedVMwareDetails.processServerCount = reader.getString(); - } else if ("agentCount".equals(fieldName)) { - deserializedVMwareDetails.agentCount = reader.getString(); - } else if ("protectedServers".equals(fieldName)) { - deserializedVMwareDetails.protectedServers = reader.getString(); - } else if ("systemLoad".equals(fieldName)) { - deserializedVMwareDetails.systemLoad = reader.getString(); - } else if ("systemLoadStatus".equals(fieldName)) { - deserializedVMwareDetails.systemLoadStatus = reader.getString(); - } else if ("cpuLoad".equals(fieldName)) { - deserializedVMwareDetails.cpuLoad = reader.getString(); - } else if ("cpuLoadStatus".equals(fieldName)) { - deserializedVMwareDetails.cpuLoadStatus = reader.getString(); - } else if ("totalMemoryInBytes".equals(fieldName)) { - deserializedVMwareDetails.totalMemoryInBytes = reader.getNullable(JsonReader::getLong); - } else if ("availableMemoryInBytes".equals(fieldName)) { - deserializedVMwareDetails.availableMemoryInBytes = reader.getNullable(JsonReader::getLong); - } else if ("memoryUsageStatus".equals(fieldName)) { - deserializedVMwareDetails.memoryUsageStatus = reader.getString(); - } else if ("totalSpaceInBytes".equals(fieldName)) { - deserializedVMwareDetails.totalSpaceInBytes = reader.getNullable(JsonReader::getLong); - } else if ("availableSpaceInBytes".equals(fieldName)) { - deserializedVMwareDetails.availableSpaceInBytes = reader.getNullable(JsonReader::getLong); - } else if ("spaceUsageStatus".equals(fieldName)) { - deserializedVMwareDetails.spaceUsageStatus = reader.getString(); - } else if ("webLoad".equals(fieldName)) { - deserializedVMwareDetails.webLoad = reader.getString(); - } else if ("webLoadStatus".equals(fieldName)) { - deserializedVMwareDetails.webLoadStatus = reader.getString(); - } else if ("databaseServerLoad".equals(fieldName)) { - deserializedVMwareDetails.databaseServerLoad = reader.getString(); - } else if ("databaseServerLoadStatus".equals(fieldName)) { - deserializedVMwareDetails.databaseServerLoadStatus = reader.getString(); - } else if ("csServiceStatus".equals(fieldName)) { - deserializedVMwareDetails.csServiceStatus = reader.getString(); - } else if ("ipAddress".equals(fieldName)) { - deserializedVMwareDetails.ipAddress = reader.getString(); - } else if ("agentVersion".equals(fieldName)) { - deserializedVMwareDetails.agentVersion = reader.getString(); - } else if ("hostName".equals(fieldName)) { - deserializedVMwareDetails.hostname = reader.getString(); - } else if ("lastHeartbeat".equals(fieldName)) { - deserializedVMwareDetails.lastHeartbeat = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("versionStatus".equals(fieldName)) { - deserializedVMwareDetails.versionStatus = reader.getString(); - } else if ("sslCertExpiryDate".equals(fieldName)) { - deserializedVMwareDetails.sslCertExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("sslCertExpiryRemainingDays".equals(fieldName)) { - deserializedVMwareDetails.sslCertExpiryRemainingDays = reader.getNullable(JsonReader::getInt); - } else if ("psTemplateVersion".equals(fieldName)) { - deserializedVMwareDetails.psTemplateVersion = reader.getString(); - } else if ("agentExpiryDate".equals(fieldName)) { - deserializedVMwareDetails.agentExpiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("agentVersionDetails".equals(fieldName)) { - deserializedVMwareDetails.agentVersionDetails = VersionDetails.fromJson(reader); - } else if ("switchProviderBlockingErrorDetails".equals(fieldName)) { - List switchProviderBlockingErrorDetails - = reader.readArray(reader1 -> InMageFabricSwitchProviderBlockingErrorDetails.fromJson(reader1)); - deserializedVMwareDetails.switchProviderBlockingErrorDetails = switchProviderBlockingErrorDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareV2FabricCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareV2FabricCreationInput.java deleted file mode 100644 index d70ee499d4bc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareV2FabricCreationInput.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMwareV2 fabric provider specific settings. - */ -@Fluent -public final class VMwareV2FabricCreationInput extends FabricSpecificCreationInput { - /* - * Gets the class type. - */ - private String instanceType = "VMwareV2"; - - /* - * The ARM Id of the VMware site. - */ - private String vmwareSiteId; - - /* - * The ARM Id of the physical site. - */ - private String physicalSiteId; - - /* - * The ARM Id of the migration solution. - */ - private String migrationSolutionId; - - /** - * Creates an instance of VMwareV2FabricCreationInput class. - */ - public VMwareV2FabricCreationInput() { - } - - /** - * Get the instanceType property: Gets the class type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the vmwareSiteId property: The ARM Id of the VMware site. - * - * @return the vmwareSiteId value. - */ - public String vmwareSiteId() { - return this.vmwareSiteId; - } - - /** - * Set the vmwareSiteId property: The ARM Id of the VMware site. - * - * @param vmwareSiteId the vmwareSiteId value to set. - * @return the VMwareV2FabricCreationInput object itself. - */ - public VMwareV2FabricCreationInput withVmwareSiteId(String vmwareSiteId) { - this.vmwareSiteId = vmwareSiteId; - return this; - } - - /** - * Get the physicalSiteId property: The ARM Id of the physical site. - * - * @return the physicalSiteId value. - */ - public String physicalSiteId() { - return this.physicalSiteId; - } - - /** - * Set the physicalSiteId property: The ARM Id of the physical site. - * - * @param physicalSiteId the physicalSiteId value to set. - * @return the VMwareV2FabricCreationInput object itself. - */ - public VMwareV2FabricCreationInput withPhysicalSiteId(String physicalSiteId) { - this.physicalSiteId = physicalSiteId; - return this; - } - - /** - * Get the migrationSolutionId property: The ARM Id of the migration solution. - * - * @return the migrationSolutionId value. - */ - public String migrationSolutionId() { - return this.migrationSolutionId; - } - - /** - * Set the migrationSolutionId property: The ARM Id of the migration solution. - * - * @param migrationSolutionId the migrationSolutionId value to set. - * @return the VMwareV2FabricCreationInput object itself. - */ - public VMwareV2FabricCreationInput withMigrationSolutionId(String migrationSolutionId) { - this.migrationSolutionId = migrationSolutionId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (migrationSolutionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property migrationSolutionId in model VMwareV2FabricCreationInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VMwareV2FabricCreationInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("migrationSolutionId", this.migrationSolutionId); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("vmwareSiteId", this.vmwareSiteId); - jsonWriter.writeStringField("physicalSiteId", this.physicalSiteId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareV2FabricCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareV2FabricCreationInput if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VMwareV2FabricCreationInput. - */ - public static VMwareV2FabricCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareV2FabricCreationInput deserializedVMwareV2FabricCreationInput = new VMwareV2FabricCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("migrationSolutionId".equals(fieldName)) { - deserializedVMwareV2FabricCreationInput.migrationSolutionId = reader.getString(); - } else if ("instanceType".equals(fieldName)) { - deserializedVMwareV2FabricCreationInput.instanceType = reader.getString(); - } else if ("vmwareSiteId".equals(fieldName)) { - deserializedVMwareV2FabricCreationInput.vmwareSiteId = reader.getString(); - } else if ("physicalSiteId".equals(fieldName)) { - deserializedVMwareV2FabricCreationInput.physicalSiteId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareV2FabricCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareV2FabricSpecificDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareV2FabricSpecificDetails.java deleted file mode 100644 index 08cc667a289f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareV2FabricSpecificDetails.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * VMwareV2 fabric specific details. - */ -@Immutable -public final class VMwareV2FabricSpecificDetails extends FabricSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "VMwareV2"; - - /* - * The ARM Id of the VMware site. - */ - private String vmwareSiteId; - - /* - * The ARM Id of the physical site. - */ - private String physicalSiteId; - - /* - * The Migration solution ARM Id. - */ - private String migrationSolutionId; - - /* - * The service endpoint. - */ - private String serviceEndpoint; - - /* - * The service resource Id. - */ - private String serviceResourceId; - - /* - * The service container Id. - */ - private String serviceContainerId; - - /* - * The list of process servers. - */ - private List processServers; - - /** - * Creates an instance of VMwareV2FabricSpecificDetails class. - */ - public VMwareV2FabricSpecificDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the vmwareSiteId property: The ARM Id of the VMware site. - * - * @return the vmwareSiteId value. - */ - public String vmwareSiteId() { - return this.vmwareSiteId; - } - - /** - * Get the physicalSiteId property: The ARM Id of the physical site. - * - * @return the physicalSiteId value. - */ - public String physicalSiteId() { - return this.physicalSiteId; - } - - /** - * Get the migrationSolutionId property: The Migration solution ARM Id. - * - * @return the migrationSolutionId value. - */ - public String migrationSolutionId() { - return this.migrationSolutionId; - } - - /** - * Get the serviceEndpoint property: The service endpoint. - * - * @return the serviceEndpoint value. - */ - public String serviceEndpoint() { - return this.serviceEndpoint; - } - - /** - * Get the serviceResourceId property: The service resource Id. - * - * @return the serviceResourceId value. - */ - public String serviceResourceId() { - return this.serviceResourceId; - } - - /** - * Get the serviceContainerId property: The service container Id. - * - * @return the serviceContainerId value. - */ - public String serviceContainerId() { - return this.serviceContainerId; - } - - /** - * Get the processServers property: The list of process servers. - * - * @return the processServers value. - */ - public List processServers() { - return this.processServers; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (processServers() != null) { - processServers().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareV2FabricSpecificDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareV2FabricSpecificDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareV2FabricSpecificDetails. - */ - public static VMwareV2FabricSpecificDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareV2FabricSpecificDetails deserializedVMwareV2FabricSpecificDetails - = new VMwareV2FabricSpecificDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVMwareV2FabricSpecificDetails.instanceType = reader.getString(); - } else if ("vmwareSiteId".equals(fieldName)) { - deserializedVMwareV2FabricSpecificDetails.vmwareSiteId = reader.getString(); - } else if ("physicalSiteId".equals(fieldName)) { - deserializedVMwareV2FabricSpecificDetails.physicalSiteId = reader.getString(); - } else if ("migrationSolutionId".equals(fieldName)) { - deserializedVMwareV2FabricSpecificDetails.migrationSolutionId = reader.getString(); - } else if ("serviceEndpoint".equals(fieldName)) { - deserializedVMwareV2FabricSpecificDetails.serviceEndpoint = reader.getString(); - } else if ("serviceResourceId".equals(fieldName)) { - deserializedVMwareV2FabricSpecificDetails.serviceResourceId = reader.getString(); - } else if ("serviceContainerId".equals(fieldName)) { - deserializedVMwareV2FabricSpecificDetails.serviceContainerId = reader.getString(); - } else if ("processServers".equals(fieldName)) { - List processServers - = reader.readArray(reader1 -> ProcessServerDetails.fromJson(reader1)); - deserializedVMwareV2FabricSpecificDetails.processServers = processServers; - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareV2FabricSpecificDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareVirtualMachineDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareVirtualMachineDetails.java deleted file mode 100644 index ab1e44d4ddf7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VMwareVirtualMachineDetails.java +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * VMware provider specific settings. - */ -@Fluent -public final class VMwareVirtualMachineDetails extends ConfigurationSettings { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "VMwareVirtualMachine"; - - /* - * The ID generated by the InMage agent after it gets installed on guest. This is the ID to be used during InMage - * CreateProtection. - */ - private String agentGeneratedId; - - /* - * The value indicating if InMage scout agent is installed on guest. - */ - private String agentInstalled; - - /* - * The OsType installed on VM. - */ - private String osType; - - /* - * The agent version. - */ - private String agentVersion; - - /* - * The IP address. - */ - private String ipAddress; - - /* - * The value indicating whether VM is powered on. - */ - private String poweredOn; - - /* - * The VCenter infrastructure Id. - */ - private String vCenterInfrastructureId; - - /* - * A value indicating the discovery type of the machine. Value can be vCenter or physical. - */ - private String discoveryType; - - /* - * The disk details. - */ - private List diskDetails; - - /* - * The validation errors. - */ - private List validationErrors; - - /** - * Creates an instance of VMwareVirtualMachineDetails class. - */ - public VMwareVirtualMachineDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the agentGeneratedId property: 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 agentGeneratedId property: 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 agentInstalled property: The value indicating if InMage scout agent is installed on guest. - * - * @return the agentInstalled value. - */ - public String agentInstalled() { - return this.agentInstalled; - } - - /** - * Set the agentInstalled property: 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 property: The OsType installed on VM. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: 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 agentVersion property: The agent version. - * - * @return the agentVersion value. - */ - public String agentVersion() { - return this.agentVersion; - } - - /** - * Set the agentVersion property: 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 ipAddress property: The IP address. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: 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 poweredOn property: The value indicating whether VM is powered on. - * - * @return the poweredOn value. - */ - public String poweredOn() { - return this.poweredOn; - } - - /** - * Set the poweredOn property: 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 vCenterInfrastructureId property: The VCenter infrastructure Id. - * - * @return the vCenterInfrastructureId value. - */ - public String vCenterInfrastructureId() { - return this.vCenterInfrastructureId; - } - - /** - * Set the vCenterInfrastructureId property: 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 the discoveryType property: 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 the discoveryType property: A value indicating 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 diskDetails property: The disk details. - * - * @return the diskDetails value. - */ - public List diskDetails() { - return this.diskDetails; - } - - /** - * Set the diskDetails property: 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 validationErrors property: The validation errors. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Set the validationErrors property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (diskDetails() != null) { - diskDetails().forEach(e -> e.validate()); - } - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("agentGeneratedId", this.agentGeneratedId); - jsonWriter.writeStringField("agentInstalled", this.agentInstalled); - jsonWriter.writeStringField("osType", this.osType); - jsonWriter.writeStringField("agentVersion", this.agentVersion); - jsonWriter.writeStringField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("poweredOn", this.poweredOn); - jsonWriter.writeStringField("vCenterInfrastructureId", this.vCenterInfrastructureId); - jsonWriter.writeStringField("discoveryType", this.discoveryType); - jsonWriter.writeArrayField("diskDetails", this.diskDetails, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("validationErrors", this.validationErrors, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VMwareVirtualMachineDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VMwareVirtualMachineDetails if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VMwareVirtualMachineDetails. - */ - public static VMwareVirtualMachineDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VMwareVirtualMachineDetails deserializedVMwareVirtualMachineDetails = new VMwareVirtualMachineDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVMwareVirtualMachineDetails.instanceType = reader.getString(); - } else if ("agentGeneratedId".equals(fieldName)) { - deserializedVMwareVirtualMachineDetails.agentGeneratedId = reader.getString(); - } else if ("agentInstalled".equals(fieldName)) { - deserializedVMwareVirtualMachineDetails.agentInstalled = reader.getString(); - } else if ("osType".equals(fieldName)) { - deserializedVMwareVirtualMachineDetails.osType = reader.getString(); - } else if ("agentVersion".equals(fieldName)) { - deserializedVMwareVirtualMachineDetails.agentVersion = reader.getString(); - } else if ("ipAddress".equals(fieldName)) { - deserializedVMwareVirtualMachineDetails.ipAddress = reader.getString(); - } else if ("poweredOn".equals(fieldName)) { - deserializedVMwareVirtualMachineDetails.poweredOn = reader.getString(); - } else if ("vCenterInfrastructureId".equals(fieldName)) { - deserializedVMwareVirtualMachineDetails.vCenterInfrastructureId = reader.getString(); - } else if ("discoveryType".equals(fieldName)) { - deserializedVMwareVirtualMachineDetails.discoveryType = reader.getString(); - } else if ("diskDetails".equals(fieldName)) { - List diskDetails - = reader.readArray(reader1 -> InMageDiskDetails.fromJson(reader1)); - deserializedVMwareVirtualMachineDetails.diskDetails = diskDetails; - } else if ("validationErrors".equals(fieldName)) { - List validationErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedVMwareVirtualMachineDetails.validationErrors = validationErrors; - } else { - reader.skipChildren(); - } - } - - return deserializedVMwareVirtualMachineDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultHealthDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultHealthDetails.java deleted file mode 100644 index e4d768bd9872..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultHealthDetails.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultHealthDetailsInner; - -/** - * An immutable client-side representation of VaultHealthDetails. - */ -public interface VaultHealthDetails { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The vault health related data. - * - * @return the properties value. - */ - VaultHealthProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultHealthDetailsInner - * object. - * - * @return the inner object. - */ - VaultHealthDetailsInner innerModel(); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultHealthProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultHealthProperties.java deleted file mode 100644 index 72a497fe5196..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultHealthProperties.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * class to define the health summary of the Vault. - */ -@Fluent -public final class VaultHealthProperties implements JsonSerializable { - /* - * The list of errors on the vault. - */ - private List vaultErrors; - - /* - * The list of the health detail of the protected items in the vault. - */ - private ResourceHealthSummary protectedItemsHealth; - - /* - * The list of the health detail of the fabrics in the vault. - */ - private ResourceHealthSummary fabricsHealth; - - /* - * The list of the health detail of the containers in the vault. - */ - private ResourceHealthSummary containersHealth; - - /** - * Creates an instance of VaultHealthProperties class. - */ - public VaultHealthProperties() { - } - - /** - * Get the vaultErrors property: The list of errors on the vault. - * - * @return the vaultErrors value. - */ - public List vaultErrors() { - return this.vaultErrors; - } - - /** - * Set the vaultErrors property: 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 protectedItemsHealth property: 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 protectedItemsHealth property: 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 fabricsHealth property: The list of the health detail of the fabrics in the vault. - * - * @return the fabricsHealth value. - */ - public ResourceHealthSummary fabricsHealth() { - return this.fabricsHealth; - } - - /** - * Set the fabricsHealth property: 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; - } - - /** - * Get the containersHealth property: The list of the health detail of the containers in the vault. - * - * @return the containersHealth value. - */ - public ResourceHealthSummary containersHealth() { - return this.containersHealth; - } - - /** - * Set the containersHealth property: The list of the health detail of the containers in the vault. - * - * @param containersHealth the containersHealth value to set. - * @return the VaultHealthProperties object itself. - */ - public VaultHealthProperties withContainersHealth(ResourceHealthSummary containersHealth) { - this.containersHealth = containersHealth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (vaultErrors() != null) { - vaultErrors().forEach(e -> e.validate()); - } - if (protectedItemsHealth() != null) { - protectedItemsHealth().validate(); - } - if (fabricsHealth() != null) { - fabricsHealth().validate(); - } - if (containersHealth() != null) { - containersHealth().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("vaultErrors", this.vaultErrors, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("protectedItemsHealth", this.protectedItemsHealth); - jsonWriter.writeJsonField("fabricsHealth", this.fabricsHealth); - jsonWriter.writeJsonField("containersHealth", this.containersHealth); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VaultHealthProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VaultHealthProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the VaultHealthProperties. - */ - public static VaultHealthProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VaultHealthProperties deserializedVaultHealthProperties = new VaultHealthProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("vaultErrors".equals(fieldName)) { - List vaultErrors = reader.readArray(reader1 -> HealthError.fromJson(reader1)); - deserializedVaultHealthProperties.vaultErrors = vaultErrors; - } else if ("protectedItemsHealth".equals(fieldName)) { - deserializedVaultHealthProperties.protectedItemsHealth = ResourceHealthSummary.fromJson(reader); - } else if ("fabricsHealth".equals(fieldName)) { - deserializedVaultHealthProperties.fabricsHealth = ResourceHealthSummary.fromJson(reader); - } else if ("containersHealth".equals(fieldName)) { - deserializedVaultHealthProperties.containersHealth = ResourceHealthSummary.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVaultHealthProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSetting.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSetting.java deleted file mode 100644 index 853510a5a53e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSetting.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultSettingInner; - -/** - * An immutable client-side representation of VaultSetting. - */ -public interface VaultSetting { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The vault setting properties. - * - * @return the properties value. - */ - VaultSettingProperties properties(); - - /** - * Gets the location property: Resource Location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultSettingInner object. - * - * @return the inner object. - */ - VaultSettingInner innerModel(); - - /** - * The entirety of the VaultSetting definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The VaultSetting definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the VaultSetting definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the VaultSetting definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceName, resourceGroupName. - * - * @param resourceName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @return the next definition stage. - */ - WithProperties withExistingVault(String resourceName, String resourceGroupName); - } - - /** - * The stage of the VaultSetting definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Vault setting creation input properties.. - * - * @param properties Vault setting creation input properties. - * @return the next definition stage. - */ - WithCreate withProperties(VaultSettingCreationInputProperties properties); - } - - /** - * The stage of the VaultSetting definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - VaultSetting create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - VaultSetting create(Context context); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - VaultSetting refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - VaultSetting refresh(Context context); -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSettingCollection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSettingCollection.java deleted file mode 100644 index e4eb94bc2b27..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSettingCollection.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultSettingInner; -import java.io.IOException; -import java.util.List; - -/** - * Vault setting collection. - */ -@Fluent -public final class VaultSettingCollection implements JsonSerializable { - /* - * The list of vault setting. - */ - private List value; - - /* - * The value of next link. - */ - private String nextLink; - - /** - * Creates an instance of VaultSettingCollection class. - */ - public VaultSettingCollection() { - } - - /** - * Get the value property: The list of vault setting. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of vault setting. - * - * @param value the value value to set. - * @return the VaultSettingCollection object itself. - */ - public VaultSettingCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The value of next link. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The value of next link. - * - * @param nextLink the nextLink value to set. - * @return the VaultSettingCollection object itself. - */ - public VaultSettingCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VaultSettingCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VaultSettingCollection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the VaultSettingCollection. - */ - public static VaultSettingCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VaultSettingCollection deserializedVaultSettingCollection = new VaultSettingCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> VaultSettingInner.fromJson(reader1)); - deserializedVaultSettingCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedVaultSettingCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVaultSettingCollection; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSettingCreationInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSettingCreationInput.java deleted file mode 100644 index 872e1ea17b01..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSettingCreationInput.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input to create vault setting. - */ -@Fluent -public final class VaultSettingCreationInput implements JsonSerializable { - /* - * Vault setting creation input properties. - */ - private VaultSettingCreationInputProperties properties; - - /** - * Creates an instance of VaultSettingCreationInput class. - */ - public VaultSettingCreationInput() { - } - - /** - * Get the properties property: Vault setting creation input properties. - * - * @return the properties value. - */ - public VaultSettingCreationInputProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Vault setting creation input properties. - * - * @param properties the properties value to set. - * @return the VaultSettingCreationInput object itself. - */ - public VaultSettingCreationInput withProperties(VaultSettingCreationInputProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model VaultSettingCreationInput")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VaultSettingCreationInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VaultSettingCreationInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VaultSettingCreationInput if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VaultSettingCreationInput. - */ - public static VaultSettingCreationInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VaultSettingCreationInput deserializedVaultSettingCreationInput = new VaultSettingCreationInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedVaultSettingCreationInput.properties - = VaultSettingCreationInputProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVaultSettingCreationInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSettingCreationInputProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSettingCreationInputProperties.java deleted file mode 100644 index 23c6c2a41bbf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSettingCreationInputProperties.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Input to create vault setting. - */ -@Fluent -public final class VaultSettingCreationInputProperties - implements JsonSerializable { - /* - * The migration solution Id. - */ - private String migrationSolutionId; - - /* - * VMware to Azure provider type. - */ - private String vmwareToAzureProviderType; - - /** - * Creates an instance of VaultSettingCreationInputProperties class. - */ - public VaultSettingCreationInputProperties() { - } - - /** - * Get the migrationSolutionId property: The migration solution Id. - * - * @return the migrationSolutionId value. - */ - public String migrationSolutionId() { - return this.migrationSolutionId; - } - - /** - * Set the migrationSolutionId property: The migration solution Id. - * - * @param migrationSolutionId the migrationSolutionId value to set. - * @return the VaultSettingCreationInputProperties object itself. - */ - public VaultSettingCreationInputProperties withMigrationSolutionId(String migrationSolutionId) { - this.migrationSolutionId = migrationSolutionId; - return this; - } - - /** - * Get the vmwareToAzureProviderType property: VMware to Azure provider type. - * - * @return the vmwareToAzureProviderType value. - */ - public String vmwareToAzureProviderType() { - return this.vmwareToAzureProviderType; - } - - /** - * Set the vmwareToAzureProviderType property: VMware to Azure provider type. - * - * @param vmwareToAzureProviderType the vmwareToAzureProviderType value to set. - * @return the VaultSettingCreationInputProperties object itself. - */ - public VaultSettingCreationInputProperties withVmwareToAzureProviderType(String vmwareToAzureProviderType) { - this.vmwareToAzureProviderType = vmwareToAzureProviderType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("migrationSolutionId", this.migrationSolutionId); - jsonWriter.writeStringField("vmwareToAzureProviderType", this.vmwareToAzureProviderType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VaultSettingCreationInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VaultSettingCreationInputProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VaultSettingCreationInputProperties. - */ - public static VaultSettingCreationInputProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VaultSettingCreationInputProperties deserializedVaultSettingCreationInputProperties - = new VaultSettingCreationInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("migrationSolutionId".equals(fieldName)) { - deserializedVaultSettingCreationInputProperties.migrationSolutionId = reader.getString(); - } else if ("vmwareToAzureProviderType".equals(fieldName)) { - deserializedVaultSettingCreationInputProperties.vmwareToAzureProviderType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVaultSettingCreationInputProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSettingProperties.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSettingProperties.java deleted file mode 100644 index 829ec472a35f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VaultSettingProperties.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Vault setting properties. - */ -@Fluent -public final class VaultSettingProperties implements JsonSerializable { - /* - * The migration solution ARM Id. - */ - private String migrationSolutionId; - - /* - * VMware to Azure provider type. - */ - private String vmwareToAzureProviderType; - - /** - * Creates an instance of VaultSettingProperties class. - */ - public VaultSettingProperties() { - } - - /** - * Get the migrationSolutionId property: The migration solution ARM Id. - * - * @return the migrationSolutionId value. - */ - public String migrationSolutionId() { - return this.migrationSolutionId; - } - - /** - * Set the migrationSolutionId property: The migration solution ARM Id. - * - * @param migrationSolutionId the migrationSolutionId value to set. - * @return the VaultSettingProperties object itself. - */ - public VaultSettingProperties withMigrationSolutionId(String migrationSolutionId) { - this.migrationSolutionId = migrationSolutionId; - return this; - } - - /** - * Get the vmwareToAzureProviderType property: VMware to Azure provider type. - * - * @return the vmwareToAzureProviderType value. - */ - public String vmwareToAzureProviderType() { - return this.vmwareToAzureProviderType; - } - - /** - * Set the vmwareToAzureProviderType property: VMware to Azure provider type. - * - * @param vmwareToAzureProviderType the vmwareToAzureProviderType value to set. - * @return the VaultSettingProperties object itself. - */ - public VaultSettingProperties withVmwareToAzureProviderType(String vmwareToAzureProviderType) { - this.vmwareToAzureProviderType = vmwareToAzureProviderType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("migrationSolutionId", this.migrationSolutionId); - jsonWriter.writeStringField("vmwareToAzureProviderType", this.vmwareToAzureProviderType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VaultSettingProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VaultSettingProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the VaultSettingProperties. - */ - public static VaultSettingProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VaultSettingProperties deserializedVaultSettingProperties = new VaultSettingProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("migrationSolutionId".equals(fieldName)) { - deserializedVaultSettingProperties.migrationSolutionId = reader.getString(); - } else if ("vmwareToAzureProviderType".equals(fieldName)) { - deserializedVaultSettingProperties.vmwareToAzureProviderType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVaultSettingProperties; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VersionDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VersionDetails.java deleted file mode 100644 index 0911acf2e873..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VersionDetails.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Version related details. - */ -@Fluent -public final class VersionDetails implements JsonSerializable { - /* - * The agent version. - */ - private String version; - - /* - * Version expiry date. - */ - private OffsetDateTime expiryDate; - - /* - * A value indicating whether security update required. - */ - private AgentVersionStatus status; - - /** - * Creates an instance of VersionDetails class. - */ - public VersionDetails() { - } - - /** - * Get the version property: The agent version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The agent version. - * - * @param version the version value to set. - * @return the VersionDetails object itself. - */ - public VersionDetails withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the expiryDate property: Version expiry date. - * - * @return the expiryDate value. - */ - public OffsetDateTime expiryDate() { - return this.expiryDate; - } - - /** - * Set the expiryDate property: Version expiry date. - * - * @param expiryDate the expiryDate value to set. - * @return the VersionDetails object itself. - */ - public VersionDetails withExpiryDate(OffsetDateTime expiryDate) { - this.expiryDate = expiryDate; - return this; - } - - /** - * Get the status property: A value indicating whether security update required. - * - * @return the status value. - */ - public AgentVersionStatus status() { - return this.status; - } - - /** - * Set the status property: A value indicating whether security update required. - * - * @param status the status value to set. - * @return the VersionDetails object itself. - */ - public VersionDetails withStatus(AgentVersionStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("version", this.version); - jsonWriter.writeStringField("expiryDate", - this.expiryDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiryDate)); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VersionDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VersionDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VersionDetails. - */ - public static VersionDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VersionDetails deserializedVersionDetails = new VersionDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("version".equals(fieldName)) { - deserializedVersionDetails.version = reader.getString(); - } else if ("expiryDate".equals(fieldName)) { - deserializedVersionDetails.expiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("status".equals(fieldName)) { - deserializedVersionDetails.status = AgentVersionStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedVersionDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VirtualMachineTaskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VirtualMachineTaskDetails.java deleted file mode 100644 index 56ce71537e12..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VirtualMachineTaskDetails.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * This class represents the virtual machine task details. - */ -@Fluent -public final class VirtualMachineTaskDetails extends JobTaskDetails { - /* - * The type of task details. - */ - private String instanceType = "VirtualMachineTaskDetails"; - - /* - * The skipped reason. - */ - private String skippedReason; - - /* - * The skipped reason string. - */ - private String skippedReasonString; - - /** - * Creates an instance of VirtualMachineTaskDetails class. - */ - public VirtualMachineTaskDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the skippedReason property: The skipped reason. - * - * @return the skippedReason value. - */ - public String skippedReason() { - return this.skippedReason; - } - - /** - * Set the skippedReason property: 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 skippedReasonString property: The skipped reason string. - * - * @return the skippedReasonString value. - */ - public String skippedReasonString() { - return this.skippedReasonString; - } - - /** - * Set the skippedReasonString property: 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; - } - - /** - * {@inheritDoc} - */ - @Override - public VirtualMachineTaskDetails withJobTask(JobEntity jobTask) { - super.withJobTask(jobTask); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (jobTask() != null) { - jobTask().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("jobTask", jobTask()); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("skippedReason", this.skippedReason); - jsonWriter.writeStringField("skippedReasonString", this.skippedReasonString); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineTaskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineTaskDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachineTaskDetails. - */ - public static VirtualMachineTaskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineTaskDetails deserializedVirtualMachineTaskDetails = new VirtualMachineTaskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobTask".equals(fieldName)) { - deserializedVirtualMachineTaskDetails.withJobTask(JobEntity.fromJson(reader)); - } else if ("instanceType".equals(fieldName)) { - deserializedVirtualMachineTaskDetails.instanceType = reader.getString(); - } else if ("skippedReason".equals(fieldName)) { - deserializedVirtualMachineTaskDetails.skippedReason = reader.getString(); - } else if ("skippedReasonString".equals(fieldName)) { - deserializedVirtualMachineTaskDetails.skippedReasonString = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineTaskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmEncryptionType.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmEncryptionType.java deleted file mode 100644 index 49399c95a0ad..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmEncryptionType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The encryption type of the VM. - */ -public final class VmEncryptionType extends ExpandableStringEnum { - /** - * Static value NotEncrypted for VmEncryptionType. - */ - public static final VmEncryptionType NOT_ENCRYPTED = fromString("NotEncrypted"); - - /** - * Static value OnePassEncrypted for VmEncryptionType. - */ - public static final VmEncryptionType ONE_PASS_ENCRYPTED = fromString("OnePassEncrypted"); - - /** - * Static value TwoPassEncrypted for VmEncryptionType. - */ - public static final VmEncryptionType TWO_PASS_ENCRYPTED = fromString("TwoPassEncrypted"); - - /** - * Creates a new instance of VmEncryptionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public VmEncryptionType() { - } - - /** - * Creates or finds a VmEncryptionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding VmEncryptionType. - */ - public static VmEncryptionType fromString(String name) { - return fromString(name, VmEncryptionType.class); - } - - /** - * Gets known VmEncryptionType values. - * - * @return known VmEncryptionType values. - */ - public static Collection values() { - return values(VmEncryptionType.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmNicUpdatesTaskDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmNicUpdatesTaskDetails.java deleted file mode 100644 index c36b8efb562a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmNicUpdatesTaskDetails.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * This class represents the vm NicUpdates task details. - */ -@Fluent -public final class VmNicUpdatesTaskDetails extends TaskTypeDetails { - /* - * The type of task details. - */ - private String instanceType = "VmNicUpdatesTaskDetails"; - - /* - * Virtual machine Id. - */ - private String vmId; - - /* - * Nic Id. - */ - private String nicId; - - /* - * Name of the Nic. - */ - private String name; - - /** - * Creates an instance of VmNicUpdatesTaskDetails class. - */ - public VmNicUpdatesTaskDetails() { - } - - /** - * Get the instanceType property: The type of task details. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the vmId property: Virtual machine Id. - * - * @return the vmId value. - */ - public String vmId() { - return this.vmId; - } - - /** - * Set the vmId property: 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 the nicId property: Nic Id. - * - * @return the nicId value. - */ - public String nicId() { - return this.nicId; - } - - /** - * Set the nicId property: 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 the name property: Name of the Nic. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("vmId", this.vmId); - jsonWriter.writeStringField("nicId", this.nicId); - jsonWriter.writeStringField("name", this.name); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmNicUpdatesTaskDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmNicUpdatesTaskDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the VmNicUpdatesTaskDetails. - */ - public static VmNicUpdatesTaskDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmNicUpdatesTaskDetails deserializedVmNicUpdatesTaskDetails = new VmNicUpdatesTaskDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVmNicUpdatesTaskDetails.instanceType = reader.getString(); - } else if ("vmId".equals(fieldName)) { - deserializedVmNicUpdatesTaskDetails.vmId = reader.getString(); - } else if ("nicId".equals(fieldName)) { - deserializedVmNicUpdatesTaskDetails.nicId = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedVmNicUpdatesTaskDetails.name = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVmNicUpdatesTaskDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmReplicationProgressHealth.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmReplicationProgressHealth.java deleted file mode 100644 index a7109e8d6122..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmReplicationProgressHealth.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The initial replication progress health. - */ -public final class VmReplicationProgressHealth extends ExpandableStringEnum { - /** - * Static value None for VmReplicationProgressHealth. - */ - public static final VmReplicationProgressHealth NONE = fromString("None"); - - /** - * Static value InProgress for VmReplicationProgressHealth. - */ - public static final VmReplicationProgressHealth IN_PROGRESS = fromString("InProgress"); - - /** - * Static value SlowProgress for VmReplicationProgressHealth. - */ - public static final VmReplicationProgressHealth SLOW_PROGRESS = fromString("SlowProgress"); - - /** - * Static value NoProgress for VmReplicationProgressHealth. - */ - public static final VmReplicationProgressHealth NO_PROGRESS = fromString("NoProgress"); - - /** - * Creates a new instance of VmReplicationProgressHealth value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public VmReplicationProgressHealth() { - } - - /** - * Creates or finds a VmReplicationProgressHealth from its string representation. - * - * @param name a name to look for. - * @return the corresponding VmReplicationProgressHealth. - */ - public static VmReplicationProgressHealth fromString(String name) { - return fromString(name, VmReplicationProgressHealth.class); - } - - /** - * Gets known VmReplicationProgressHealth values. - * - * @return known VmReplicationProgressHealth values. - */ - public static Collection values() { - return values(VmReplicationProgressHealth.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmDetails.java deleted file mode 100644 index 9706737d768f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmDetails.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMM fabric specific details. - */ -@Immutable -public final class VmmDetails extends FabricSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "VMM"; - - /** - * Creates an instance of VmmDetails class. - */ - public VmmDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmmDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmmDetails if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the VmmDetails. - */ - public static VmmDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmmDetails deserializedVmmDetails = new VmmDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVmmDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVmmDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToAzureCreateNetworkMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToAzureCreateNetworkMappingInput.java deleted file mode 100644 index 7f3292a478f3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToAzureCreateNetworkMappingInput.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Create network mappings input properties/behavior specific to Vmm to Azure Network mapping. - */ -@Immutable -public final class VmmToAzureCreateNetworkMappingInput extends FabricSpecificCreateNetworkMappingInput { - /* - * The instance type. - */ - private String instanceType = "VmmToAzure"; - - /** - * Creates an instance of VmmToAzureCreateNetworkMappingInput class. - */ - public VmmToAzureCreateNetworkMappingInput() { - } - - /** - * Get the instanceType property: The instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmmToAzureCreateNetworkMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmmToAzureCreateNetworkMappingInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VmmToAzureCreateNetworkMappingInput. - */ - public static VmmToAzureCreateNetworkMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmmToAzureCreateNetworkMappingInput deserializedVmmToAzureCreateNetworkMappingInput - = new VmmToAzureCreateNetworkMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVmmToAzureCreateNetworkMappingInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVmmToAzureCreateNetworkMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToAzureNetworkMappingSettings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToAzureNetworkMappingSettings.java deleted file mode 100644 index cedf71ff8f94..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToAzureNetworkMappingSettings.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * E2A Network Mapping fabric specific settings. - */ -@Immutable -public final class VmmToAzureNetworkMappingSettings extends NetworkMappingFabricSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "VmmToAzure"; - - /** - * Creates an instance of VmmToAzureNetworkMappingSettings class. - */ - public VmmToAzureNetworkMappingSettings() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmmToAzureNetworkMappingSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmmToAzureNetworkMappingSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VmmToAzureNetworkMappingSettings. - */ - public static VmmToAzureNetworkMappingSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmmToAzureNetworkMappingSettings deserializedVmmToAzureNetworkMappingSettings - = new VmmToAzureNetworkMappingSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVmmToAzureNetworkMappingSettings.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVmmToAzureNetworkMappingSettings; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToAzureUpdateNetworkMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToAzureUpdateNetworkMappingInput.java deleted file mode 100644 index 4d81ef665bf6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToAzureUpdateNetworkMappingInput.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update network mappings input properties/behavior specific to vmm to azure. - */ -@Immutable -public final class VmmToAzureUpdateNetworkMappingInput extends FabricSpecificUpdateNetworkMappingInput { - /* - * The instance type. - */ - private String instanceType = "VmmToAzure"; - - /** - * Creates an instance of VmmToAzureUpdateNetworkMappingInput class. - */ - public VmmToAzureUpdateNetworkMappingInput() { - } - - /** - * Get the instanceType property: The instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmmToAzureUpdateNetworkMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmmToAzureUpdateNetworkMappingInput if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VmmToAzureUpdateNetworkMappingInput. - */ - public static VmmToAzureUpdateNetworkMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmmToAzureUpdateNetworkMappingInput deserializedVmmToAzureUpdateNetworkMappingInput - = new VmmToAzureUpdateNetworkMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVmmToAzureUpdateNetworkMappingInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVmmToAzureUpdateNetworkMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToVmmCreateNetworkMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToVmmCreateNetworkMappingInput.java deleted file mode 100644 index 0038a62ac6e0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToVmmCreateNetworkMappingInput.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Create network mappings input properties/behavior specific to vmm to vmm Network mapping. - */ -@Immutable -public final class VmmToVmmCreateNetworkMappingInput extends FabricSpecificCreateNetworkMappingInput { - /* - * The instance type. - */ - private String instanceType = "VmmToVmm"; - - /** - * Creates an instance of VmmToVmmCreateNetworkMappingInput class. - */ - public VmmToVmmCreateNetworkMappingInput() { - } - - /** - * Get the instanceType property: The instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmmToVmmCreateNetworkMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmmToVmmCreateNetworkMappingInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VmmToVmmCreateNetworkMappingInput. - */ - public static VmmToVmmCreateNetworkMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmmToVmmCreateNetworkMappingInput deserializedVmmToVmmCreateNetworkMappingInput - = new VmmToVmmCreateNetworkMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVmmToVmmCreateNetworkMappingInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVmmToVmmCreateNetworkMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToVmmNetworkMappingSettings.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToVmmNetworkMappingSettings.java deleted file mode 100644 index e97608ad9c6b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToVmmNetworkMappingSettings.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * E2E Network Mapping fabric specific settings. - */ -@Immutable -public final class VmmToVmmNetworkMappingSettings extends NetworkMappingFabricSpecificSettings { - /* - * Gets the Instance type. - */ - private String instanceType = "VmmToVmm"; - - /** - * Creates an instance of VmmToVmmNetworkMappingSettings class. - */ - public VmmToVmmNetworkMappingSettings() { - } - - /** - * Get the instanceType property: Gets the Instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmmToVmmNetworkMappingSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmmToVmmNetworkMappingSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VmmToVmmNetworkMappingSettings. - */ - public static VmmToVmmNetworkMappingSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmmToVmmNetworkMappingSettings deserializedVmmToVmmNetworkMappingSettings - = new VmmToVmmNetworkMappingSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVmmToVmmNetworkMappingSettings.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVmmToVmmNetworkMappingSettings; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToVmmUpdateNetworkMappingInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToVmmUpdateNetworkMappingInput.java deleted file mode 100644 index e69d7ea89fcb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmToVmmUpdateNetworkMappingInput.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Update network mappings input properties/behavior specific to vmm to vmm. - */ -@Immutable -public final class VmmToVmmUpdateNetworkMappingInput extends FabricSpecificUpdateNetworkMappingInput { - /* - * The instance type. - */ - private String instanceType = "VmmToVmm"; - - /** - * Creates an instance of VmmToVmmUpdateNetworkMappingInput class. - */ - public VmmToVmmUpdateNetworkMappingInput() { - } - - /** - * Get the instanceType property: The instance type. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmmToVmmUpdateNetworkMappingInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmmToVmmUpdateNetworkMappingInput if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VmmToVmmUpdateNetworkMappingInput. - */ - public static VmmToVmmUpdateNetworkMappingInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmmToVmmUpdateNetworkMappingInput deserializedVmmToVmmUpdateNetworkMappingInput - = new VmmToVmmUpdateNetworkMappingInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVmmToVmmUpdateNetworkMappingInput.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVmmToVmmUpdateNetworkMappingInput; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmVirtualMachineDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmVirtualMachineDetails.java deleted file mode 100644 index bc2565fb149a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmmVirtualMachineDetails.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * VMM fabric provider specific VM settings. - */ -@Fluent -public final class VmmVirtualMachineDetails extends HyperVVirtualMachineDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "VmmVirtualMachine"; - - /** - * Creates an instance of VmmVirtualMachineDetails class. - */ - public VmmVirtualMachineDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * {@inheritDoc} - */ - @Override - public VmmVirtualMachineDetails withSourceItemId(String sourceItemId) { - super.withSourceItemId(sourceItemId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VmmVirtualMachineDetails withGeneration(String generation) { - super.withGeneration(generation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VmmVirtualMachineDetails withOsDetails(OSDetails osDetails) { - super.withOsDetails(osDetails); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VmmVirtualMachineDetails withDiskDetails(List diskDetails) { - super.withDiskDetails(diskDetails); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VmmVirtualMachineDetails withHasPhysicalDisk(PresenceStatus hasPhysicalDisk) { - super.withHasPhysicalDisk(hasPhysicalDisk); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VmmVirtualMachineDetails withHasFibreChannelAdapter(PresenceStatus hasFibreChannelAdapter) { - super.withHasFibreChannelAdapter(hasFibreChannelAdapter); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VmmVirtualMachineDetails withHasSharedVhd(PresenceStatus hasSharedVhd) { - super.withHasSharedVhd(hasSharedVhd); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VmmVirtualMachineDetails withHyperVHostId(String hyperVHostId) { - super.withHyperVHostId(hyperVHostId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (osDetails() != null) { - osDetails().validate(); - } - if (diskDetails() != null) { - diskDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sourceItemId", sourceItemId()); - jsonWriter.writeStringField("generation", generation()); - jsonWriter.writeJsonField("osDetails", osDetails()); - jsonWriter.writeArrayField("diskDetails", diskDetails(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("hasPhysicalDisk", hasPhysicalDisk() == null ? null : hasPhysicalDisk().toString()); - jsonWriter.writeStringField("hasFibreChannelAdapter", - hasFibreChannelAdapter() == null ? null : hasFibreChannelAdapter().toString()); - jsonWriter.writeStringField("hasSharedVhd", hasSharedVhd() == null ? null : hasSharedVhd().toString()); - jsonWriter.writeStringField("hyperVHostId", hyperVHostId()); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmmVirtualMachineDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmmVirtualMachineDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VmmVirtualMachineDetails. - */ - public static VmmVirtualMachineDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmmVirtualMachineDetails deserializedVmmVirtualMachineDetails = new VmmVirtualMachineDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sourceItemId".equals(fieldName)) { - deserializedVmmVirtualMachineDetails.withSourceItemId(reader.getString()); - } else if ("generation".equals(fieldName)) { - deserializedVmmVirtualMachineDetails.withGeneration(reader.getString()); - } else if ("osDetails".equals(fieldName)) { - deserializedVmmVirtualMachineDetails.withOsDetails(OSDetails.fromJson(reader)); - } else if ("diskDetails".equals(fieldName)) { - List diskDetails = reader.readArray(reader1 -> DiskDetails.fromJson(reader1)); - deserializedVmmVirtualMachineDetails.withDiskDetails(diskDetails); - } else if ("hasPhysicalDisk".equals(fieldName)) { - deserializedVmmVirtualMachineDetails - .withHasPhysicalDisk(PresenceStatus.fromString(reader.getString())); - } else if ("hasFibreChannelAdapter".equals(fieldName)) { - deserializedVmmVirtualMachineDetails - .withHasFibreChannelAdapter(PresenceStatus.fromString(reader.getString())); - } else if ("hasSharedVhd".equals(fieldName)) { - deserializedVmmVirtualMachineDetails - .withHasSharedVhd(PresenceStatus.fromString(reader.getString())); - } else if ("hyperVHostId".equals(fieldName)) { - deserializedVmmVirtualMachineDetails.withHyperVHostId(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedVmmVirtualMachineDetails.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVmmVirtualMachineDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmwareCbtPolicyDetails.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmwareCbtPolicyDetails.java deleted file mode 100644 index 5ee0cb5a77ee..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/VmwareCbtPolicyDetails.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * VMware Cbt specific policy details. - */ -@Fluent -public final class VmwareCbtPolicyDetails extends PolicyProviderSpecificDetails { - /* - * Gets the class type. Overridden in derived classes. - */ - private String instanceType = "VMwareCbt"; - - /* - * The duration in minutes until which the recovery points need to be stored. - */ - private Integer recoveryPointHistoryInMinutes; - - /* - * The app consistent snapshot frequency in minutes. - */ - private Integer appConsistentFrequencyInMinutes; - - /* - * The crash consistent snapshot frequency in minutes. - */ - private Integer crashConsistentFrequencyInMinutes; - - /** - * Creates an instance of VmwareCbtPolicyDetails class. - */ - public VmwareCbtPolicyDetails() { - } - - /** - * Get the instanceType property: Gets the class type. Overridden in derived classes. - * - * @return the instanceType value. - */ - @Override - public String instanceType() { - return this.instanceType; - } - - /** - * Get the recoveryPointHistoryInMinutes property: The duration in minutes until which the recovery points need to - * be stored. - * - * @return the recoveryPointHistoryInMinutes value. - */ - public Integer recoveryPointHistoryInMinutes() { - return this.recoveryPointHistoryInMinutes; - } - - /** - * Set the recoveryPointHistoryInMinutes property: The duration in minutes until which the recovery points need to - * be stored. - * - * @param recoveryPointHistoryInMinutes the recoveryPointHistoryInMinutes value to set. - * @return the VmwareCbtPolicyDetails object itself. - */ - public VmwareCbtPolicyDetails withRecoveryPointHistoryInMinutes(Integer recoveryPointHistoryInMinutes) { - this.recoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; - return this; - } - - /** - * Get the appConsistentFrequencyInMinutes property: The app consistent snapshot frequency in minutes. - * - * @return the appConsistentFrequencyInMinutes value. - */ - public Integer appConsistentFrequencyInMinutes() { - return this.appConsistentFrequencyInMinutes; - } - - /** - * Set the appConsistentFrequencyInMinutes property: 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 crashConsistentFrequencyInMinutes property: The crash consistent snapshot frequency in minutes. - * - * @return the crashConsistentFrequencyInMinutes value. - */ - public Integer crashConsistentFrequencyInMinutes() { - return this.crashConsistentFrequencyInMinutes; - } - - /** - * Set the crashConsistentFrequencyInMinutes property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeNumberField("recoveryPointHistoryInMinutes", this.recoveryPointHistoryInMinutes); - jsonWriter.writeNumberField("appConsistentFrequencyInMinutes", this.appConsistentFrequencyInMinutes); - jsonWriter.writeNumberField("crashConsistentFrequencyInMinutes", this.crashConsistentFrequencyInMinutes); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VmwareCbtPolicyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VmwareCbtPolicyDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the VmwareCbtPolicyDetails. - */ - public static VmwareCbtPolicyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VmwareCbtPolicyDetails deserializedVmwareCbtPolicyDetails = new VmwareCbtPolicyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedVmwareCbtPolicyDetails.instanceType = reader.getString(); - } else if ("recoveryPointHistoryInMinutes".equals(fieldName)) { - deserializedVmwareCbtPolicyDetails.recoveryPointHistoryInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("appConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedVmwareCbtPolicyDetails.appConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else if ("crashConsistentFrequencyInMinutes".equals(fieldName)) { - deserializedVmwareCbtPolicyDetails.crashConsistentFrequencyInMinutes - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedVmwareCbtPolicyDetails; - }); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/package-info.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/package-info.java deleted file mode 100644 index 6c91b6600113..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the data models for SiteRecoveryManagementClient. - * null. - */ -package com.azure.resourcemanager.recoveryservicessiterecovery.models; diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/package-info.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/package-info.java deleted file mode 100644 index 768ac828d7f1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the classes for SiteRecoveryManagementClient. - * null. - */ -package com.azure.resourcemanager.recoveryservicessiterecovery; diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/module-info.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/module-info.java deleted file mode 100644 index 4f9e15e1488f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/module-info.java +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.recoveryservicessiterecovery { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.recoveryservicessiterecovery; - exports com.azure.resourcemanager.recoveryservicessiterecovery.fluent; - exports com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models; - exports com.azure.resourcemanager.recoveryservicessiterecovery.models; - - opens com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models to com.azure.core; - opens com.azure.resourcemanager.recoveryservicessiterecovery.models to com.azure.core; -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-recoveryservicessiterecovery/proxy-config.json b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-recoveryservicessiterecovery/proxy-config.json deleted file mode 100644 index fa96547a5b6c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-recoveryservicessiterecovery/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.MigrationRecoveryPointsClientImpl$MigrationRecoveryPointsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.RecoveryPointsClientImpl$RecoveryPointsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationAlertSettingsClientImpl$ReplicationAlertSettingsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationAppliancesClientImpl$ReplicationAppliancesService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationEligibilityResultsOperationsClientImpl$ReplicationEligibilityResultsOperationsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationEventsClientImpl$ReplicationEventsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationFabricsClientImpl$ReplicationFabricsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationJobsClientImpl$ReplicationJobsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationLogicalNetworksClientImpl$ReplicationLogicalNetworksService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationMigrationItemsClientImpl$ReplicationMigrationItemsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationNetworkMappingsClientImpl$ReplicationNetworkMappingsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationNetworksClientImpl$ReplicationNetworksService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationPoliciesClientImpl$ReplicationPoliciesService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationProtectableItemsClientImpl$ReplicationProtectableItemsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationProtectedItemsClientImpl$ReplicationProtectedItemsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationProtectionContainerMappingsClientImpl$ReplicationProtectionContainerMappingsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationProtectionContainersClientImpl$ReplicationProtectionContainersService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationProtectionIntentsClientImpl$ReplicationProtectionIntentsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationRecoveryPlansClientImpl$ReplicationRecoveryPlansService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationRecoveryServicesProvidersClientImpl$ReplicationRecoveryServicesProvidersService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationVaultHealthsClientImpl$ReplicationVaultHealthsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationVaultSettingsClientImpl$ReplicationVaultSettingsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.ReplicationvCentersClientImpl$ReplicationvCentersService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.StorageClassificationMappingsClientImpl$StorageClassificationMappingsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.StorageClassificationsClientImpl$StorageClassificationsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.SupportedOperatingSystemsOperationsClientImpl$SupportedOperatingSystemsOperationsService"],["com.azure.resourcemanager.recoveryservicessiterecovery.implementation.TargetComputeSizesClientImpl$TargetComputeSizesService"]] \ No newline at end of file diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-recoveryservicessiterecovery/reflect-config.json b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-recoveryservicessiterecovery/reflect-config.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-recoveryservicessiterecovery/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointsGetSamples.java deleted file mode 100644 index e76e18f92055..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for MigrationRecoveryPoints Get. - */ -public final class MigrationRecoveryPointsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /MigrationRecoveryPoints_Get.json - */ - /** - * Sample code: Gets a recovery point for a migration item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsARecoveryPointForAMigrationItem( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.migrationRecoveryPoints() - .getWithResponse("migrationvault", "resourcegroup1", "vmwarefabric1", "vmwareContainer1", "virtualmachine1", - "b22134ea-620c-474b-9fa5-3c1cb47708e3", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointsListByReplicationMigrati.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointsListByReplicationMigrati.java deleted file mode 100644 index 22793b4422d7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointsListByReplicationMigrati.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for MigrationRecoveryPoints ListByReplicationMigrationItems. - */ -public final class MigrationRecoveryPointsListByReplicationMigrati { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /MigrationRecoveryPoints_ListByReplicationMigrationItems.json - */ - /** - * Sample code: Gets the recovery points for a migration item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheRecoveryPointsForAMigrationItem( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.migrationRecoveryPoints() - .listByReplicationMigrationItems("migrationvault", "resourcegroup1", "vmwarefabric1", "vmwareContainer1", - "virtualmachine1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OperationsListByResourceGroupSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OperationsListByResourceGroupSamples.java deleted file mode 100644 index a0ff0dce3894..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OperationsListByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for Operations ListByResourceGroup. - */ -public final class OperationsListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /Operations_List.json - */ - /** - * Sample code: Returns the list of available operations. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void returnsTheListOfAvailableOperations( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.operations().listByResourceGroup("resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointsGetSamples.java deleted file mode 100644 index 804920bfa8b4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for RecoveryPoints Get. - */ -public final class RecoveryPointsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /RecoveryPoints_Get.json - */ - /** - * Sample code: Gets a recovery point. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - getsARecoveryPoint(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.recoveryPoints() - .getWithResponse("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", "b22134ea-620c-474b-9fa5-3c1cb47708e3", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointsListByReplicationProtectedItemsSa.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointsListByReplicationProtectedItemsSa.java deleted file mode 100644 index 43cadbee0fda..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointsListByReplicationProtectedItemsSa.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for RecoveryPoints ListByReplicationProtectedItems. - */ -public final class RecoveryPointsListByReplicationProtectedItemsSa { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /RecoveryPoints_ListByReplicationProtectedItems.json - */ - /** - * Sample code: Gets the list of recovery points for a replication protected item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfRecoveryPointsForAReplicationProtectedItem( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.recoveryPoints() - .listByReplicationProtectedItems("vault1", "resourceGroupPS1", "cloud1", - "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", "f8491e4f-817a-40dd-a90c-af773978c75b", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsCreateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsCreateSamples.java deleted file mode 100644 index 868b7f394ff1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsCreateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigureAlertRequestProperties; -import java.util.Arrays; - -/** - * Samples for ReplicationAlertSettings Create. - */ -public final class ReplicationAlertSettingsCreateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationAlertSettings_Create.json - */ - /** - * Sample code: Configures email notifications for this vault. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void configuresEmailNotificationsForThisVault( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationAlertSettings() - .define("defaultAlertSetting") - .withExistingVault("vault1", "resourceGroupPS1") - .withProperties(new ConfigureAlertRequestProperties().withSendToOwners("false") - .withCustomEmailAddresses(Arrays.asList("ronehr@microsoft.com")) - .withLocale("")) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsGetSamples.java deleted file mode 100644 index f8975d74f0a0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationAlertSettings Get. - */ -public final class ReplicationAlertSettingsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationAlertSettings_Get.json - */ - /** - * Sample code: Gets an email notification(alert) configuration. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsAnEmailNotificationAlertConfiguration( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationAlertSettings() - .getWithResponse("vault1", "resourceGroupPS1", "defaultAlertSetting", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsListSamples.java deleted file mode 100644 index b13c086dafa6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationAlertSettings List. - */ -public final class ReplicationAlertSettingsListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationAlertSettings_List.json - */ - /** - * Sample code: Gets the list of configured email notification(alert) configurations. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfConfiguredEmailNotificationAlertConfigurations( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationAlertSettings().list("vault1", "resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAppliancesListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAppliancesListSamples.java deleted file mode 100644 index d8753504eac2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAppliancesListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationAppliances List. - */ -public final class ReplicationAppliancesListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationAppliances_List.json - */ - /** - * Sample code: Gets the list of appliances. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - getsTheListOfAppliances(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationAppliances().list("vault1", "resourceGroupPS1", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEligibilityResultsOperationGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEligibilityResultsOperationGetSamples.java deleted file mode 100644 index ea39d092d3b4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEligibilityResultsOperationGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationEligibilityResultsOperation Get. - */ -public final class ReplicationEligibilityResultsOperationGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationEligibilityResults_Get.json - */ - /** - * Sample code: Gets the validation errors in case the VM is unsuitable for protection. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheValidationErrorsInCaseTheVMIsUnsuitableForProtection( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationEligibilityResultsOperations() - .getWithResponse("testRg1", "testVm1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEligibilityResultsOperationListSampl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEligibilityResultsOperationListSampl.java deleted file mode 100644 index 1dd6f5392c5d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEligibilityResultsOperationListSampl.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationEligibilityResultsOperation List. - */ -public final class ReplicationEligibilityResultsOperationListSampl { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationEligibilityResults_List.json - */ - /** - * Sample code: Gets the validation errors in case the VM is unsuitable for protection. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheValidationErrorsInCaseTheVMIsUnsuitableForProtection( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationEligibilityResultsOperations() - .listWithResponse("testRg1", "testVm2", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEventsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEventsGetSamples.java deleted file mode 100644 index 6e361b90d563..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEventsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationEvents Get. - */ -public final class ReplicationEventsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationEvents_Get.json - */ - /** - * Sample code: Get the details of an Azure Site recovery event. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getTheDetailsOfAnAzureSiteRecoveryEvent( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationEvents() - .getWithResponse("vault1", "resourceGroupPS1", "654b71d0-b2ce-4e6e-a861-98528d4bd375", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEventsListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEventsListSamples.java deleted file mode 100644 index 49ac26e7b3c3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEventsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationEvents List. - */ -public final class ReplicationEventsListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationEvents_List.json - */ - /** - * Sample code: Gets the list of Azure Site Recovery events. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfAzureSiteRecoveryEvents( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationEvents().list("vault1", "resourceGroupPS1", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsCheckConsistencySamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsCheckConsistencySamples.java deleted file mode 100644 index 62c61a9ece38..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsCheckConsistencySamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationFabrics CheckConsistency. - */ -public final class ReplicationFabricsCheckConsistencySamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationFabrics_CheckConsistency.json - */ - /** - * Sample code: Checks the consistency of the ASR fabric. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void checksTheConsistencyOfTheASRFabric( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationFabrics() - .checkConsistency("vault1", "resourceGroupPS1", "cloud1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsCreateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsCreateSamples.java deleted file mode 100644 index 679038c02cb8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsCreateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricCreationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricSpecificCreationInput; - -/** - * Samples for ReplicationFabrics Create. - */ -public final class ReplicationFabricsCreateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationFabrics_Create.json - */ - /** - * Sample code: Creates an Azure Site Recovery fabric. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void createsAnAzureSiteRecoveryFabric( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationFabrics() - .define("cloud1") - .withExistingVault("vault1", "resourceGroupPS1") - .withProperties(new FabricCreationInputProperties().withCustomDetails(new FabricSpecificCreationInput())) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsDeleteSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsDeleteSamples.java deleted file mode 100644 index 4e71fc32a812..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationFabrics Delete. - */ -public final class ReplicationFabricsDeleteSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationFabrics_Delete.json - */ - /** - * Sample code: Deletes the site. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - deletesTheSite(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationFabrics().delete("vault1", "resourceGroupPS1", "cloud1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsGetSamples.java deleted file mode 100644 index 92812f559f42..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationFabrics Get. - */ -public final class ReplicationFabricsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationFabrics_Get.json - */ - /** - * Sample code: Gets the details of an ASR fabric. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheDetailsOfAnASRFabric( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationFabrics() - .getWithResponse("vault1", "resourceGroupPS1", "cloud1", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsListSamples.java deleted file mode 100644 index c49f3ce9865f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationFabrics List. - */ -public final class ReplicationFabricsListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationFabrics_List.json - */ - /** - * Sample code: Gets the list of ASR fabrics. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - getsTheListOfASRFabrics(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationFabrics().list("vault1", "resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsMigrateToAadSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsMigrateToAadSamples.java deleted file mode 100644 index 8a056f28b424..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsMigrateToAadSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationFabrics MigrateToAad. - */ -public final class ReplicationFabricsMigrateToAadSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationFabrics_MigrateToAad.json - */ - /** - * Sample code: Migrates the site to AAD. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - migratesTheSiteToAAD(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationFabrics() - .migrateToAad("vault1", "resourceGroupPS1", "cloud1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsPurgeSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsPurgeSamples.java deleted file mode 100644 index d28516f52531..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsPurgeSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationFabrics Purge. - */ -public final class ReplicationFabricsPurgeSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationFabrics_Purge.json - */ - /** - * Sample code: Purges the site. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - purgesTheSite(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationFabrics().purge("vault1", "resourceGroupPS1", "cloud1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsReassociateGatewaySamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsReassociateGatewaySamples.java deleted file mode 100644 index 911c7710dfeb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsReassociateGatewaySamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverProcessServerRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverProcessServerRequestProperties; -import java.util.Arrays; - -/** - * Samples for ReplicationFabrics ReassociateGateway. - */ -public final class ReplicationFabricsReassociateGatewaySamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationFabrics_ReassociateGateway.json - */ - /** - * Sample code: Perform failover of the process server. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void performFailoverOfTheProcessServer( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationFabrics() - .reassociateGateway("MadhaviVault", "MadhaviVRG", "GRACE-V2A-1", - new FailoverProcessServerRequest().withProperties(new FailoverProcessServerRequestProperties() - .withContainerName("cloud_1f3c15af-2256-4568-9e06-e1ef4f728f75") - .withSourceProcessServerId("AFA0EC54-1894-4E44-9CAB02DB8854B117") - .withTargetProcessServerId("5D3ED340-85AE-C646-B338641E015DA405") - .withVmsToMigrate(Arrays.asList("Vm1", "Vm2")) - .withUpdateType("ServerLevel")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsRemoveInfraSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsRemoveInfraSamples.java deleted file mode 100644 index 0b2c20140f3e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsRemoveInfraSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationFabrics RemoveInfra. - */ -public final class ReplicationFabricsRemoveInfraSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationInfrastructure_Delete.json - */ - /** - * Sample code: Removes the appliance's infrastructure under the fabric. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void removesTheApplianceSInfrastructureUnderTheFabric( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationFabrics() - .removeInfra("resourceGroupPS1", "vault1", "cloud1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsRenewCertificateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsRenewCertificateSamples.java deleted file mode 100644 index a7e8323679af..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationFabricsRenewCertificateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RenewCertificateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RenewCertificateInputProperties; - -/** - * Samples for ReplicationFabrics RenewCertificate. - */ -public final class ReplicationFabricsRenewCertificateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationFabrics_RenewCertificate.json - */ - /** - * Sample code: Renews certificate for the fabric. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void renewsCertificateForTheFabric( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationFabrics() - .renewCertificate("vault1", "resourceGroupPS1", "cloud1", - new RenewCertificateInput() - .withProperties(new RenewCertificateInputProperties().withRenewCertificateType("Cloud")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsCancelSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsCancelSamples.java deleted file mode 100644 index aa1dcc39df5f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsCancelSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationJobs Cancel. - */ -public final class ReplicationJobsCancelSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationJobs_Cancel.json - */ - /** - * Sample code: Cancels the specified job. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - cancelsTheSpecifiedJob(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationJobs() - .cancel("vault1", "resourceGroupPS1", "2653c648-fc72-4316-86f3-fdf8eaa0066b", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsExportSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsExportSamples.java deleted file mode 100644 index 99a4aa2b27aa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsExportSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobQueryParameter; - -/** - * Samples for ReplicationJobs Export. - */ -public final class ReplicationJobsExportSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationJobs_Export.json - */ - /** - * Sample code: Exports the details of the Azure Site Recovery jobs of the vault. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void exportsTheDetailsOfTheAzureSiteRecoveryJobsOfTheVault( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationJobs() - .export("vault1", "resourceGroupPS1", - new JobQueryParameter().withStartTime("2017-04-27T14:26:51.9161395Z") - .withEndTime("2017-05-04T14:26:51.9161395Z") - .withAffectedObjectTypes("") - .withJobStatus(""), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsGetSamples.java deleted file mode 100644 index fd6691241c19..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationJobs Get. - */ -public final class ReplicationJobsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationJobs_Get.json - */ - /** - * Sample code: Gets the job details. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - getsTheJobDetails(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationJobs() - .getWithResponse("vault1", "resourceGroupPS1", "58776d0b-3141-48b2-a377-9ad863eb160d", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsListSamples.java deleted file mode 100644 index 4d909eb97455..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationJobs List. - */ -public final class ReplicationJobsListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationJobs_List.json - */ - /** - * Sample code: Gets the list of jobs. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - getsTheListOfJobs(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationJobs().list("vault1", "resourceGroupPS1", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsRestartSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsRestartSamples.java deleted file mode 100644 index e4fb451e490c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsRestartSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationJobs Restart. - */ -public final class ReplicationJobsRestartSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationJobs_Restart.json - */ - /** - * Sample code: Restarts the specified job. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - restartsTheSpecifiedJob(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationJobs() - .restart("vault1", "resourceGroupPS1", "0664564c-353e-401a-ab0c-722257c10e25", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsResumeSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsResumeSamples.java deleted file mode 100644 index bdd3b38b263d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationJobsResumeSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeJobParams; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeJobParamsProperties; - -/** - * Samples for ReplicationJobs Resume. - */ -public final class ReplicationJobsResumeSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationJobs_Resume.json - */ - /** - * Sample code: Resumes the specified job. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - resumesTheSpecifiedJob(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationJobs() - .resume("vault1", "resourceGroupPS1", "58776d0b-3141-48b2-a377-9ad863eb160d", - new ResumeJobParams().withProperties(new ResumeJobParamsProperties().withComments(" ")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationLogicalNetworksGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationLogicalNetworksGetSamples.java deleted file mode 100644 index 68c77836f5e0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationLogicalNetworksGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationLogicalNetworks Get. - */ -public final class ReplicationLogicalNetworksGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationLogicalNetworks_Get.json - */ - /** - * Sample code: Gets a logical network with specified server id and logical network name. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsALogicalNetworkWithSpecifiedServerIdAndLogicalNetworkName( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationLogicalNetworks() - .getWithResponse("vault1", "resourceGroupPS1", "cloud1", "87ab394f-165f-4aa9-bd84-b018500b4509", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationLogicalNetworksListByReplicationFabr.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationLogicalNetworksListByReplicationFabr.java deleted file mode 100644 index de40a3d24bfd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationLogicalNetworksListByReplicationFabr.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationLogicalNetworks ListByReplicationFabrics. - */ -public final class ReplicationLogicalNetworksListByReplicationFabr { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationLogicalNetworks_ListByReplicationFabrics.json - */ - /** - * Sample code: Gets the list of logical networks under a fabric. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfLogicalNetworksUnderAFabric( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationLogicalNetworks() - .listByReplicationFabrics("vault1", "resourceGroupPS1", "cloud1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsCreateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsCreateSamples.java deleted file mode 100644 index 7ea6a1e4a3fa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsCreateSamples.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableMigrationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtDiskInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtEnableMigrationInput; -import java.util.Arrays; - -/** - * Samples for ReplicationMigrationItems Create. - */ -public final class ReplicationMigrationItemsCreateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationMigrationItems_Create.json - */ - /** - * Sample code: Enables migration. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - enablesMigration(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationMigrationItems() - .define("virtualmachine1") - .withExistingReplicationProtectionContainer("migrationvault", "resourcegroup1", "vmwarefabric1", - "vmwareContainer1") - .withProperties(new EnableMigrationInputProperties().withPolicyId( - "/Subscriptions/cb53d0c3-bd59-4721-89bc-06916a9147ef/resourceGroups/resourcegroup1/providers/Microsoft.RecoveryServices/vaults/migrationvault/replicationPolicies/vmwarepolicy1") - .withProviderSpecificDetails(new VMwareCbtEnableMigrationInput().withVmwareMachineId( - "/Subscriptions/cb53d0c3-bd59-4721-89bc-06916a9147ef/resourceGroups/resourcegroup1/providers/Microsoft.OffAzure/VMwareSites/vmwaresite1/machines/virtualmachine1") - .withDisksToInclude(Arrays.asList(new VMwareCbtDiskInput().withDiskId("disk1") - .withIsOSDisk("true") - .withLogStorageAccountId( - "/Subscriptions/cb53d0c3-bd59-4721-89bc-06916a9147ef/resourceGroups/resourcegroup1/providers/Microsoft.Storage/storageAccounts/logStorageAccount1") - .withLogStorageAccountSasSecretName("fakeTokenPlaceholder"))) - .withDataMoverRunAsAccountId( - "/Subscriptions/cb53d0c3-bd59-4721-89bc-06916a9147ef/resourceGroups/resourcegroup1/providers/Microsoft.OffAzure/VMwareSites/vmwaresite1/runasaccounts/dataMoverRunAsAccount1") - .withSnapshotRunAsAccountId( - "/Subscriptions/cb53d0c3-bd59-4721-89bc-06916a9147ef/resourceGroups/resourcegroup1/providers/Microsoft.OffAzure/VMwareSites/vmwaresite1/runasaccounts/snapshotRunAsAccount1") - .withTargetResourceGroupId( - "/Subscriptions/cb53d0c3-bd59-4721-89bc-06916a9147ef/resourceGroups/resourcegroup1") - .withTargetNetworkId( - "/Subscriptions/cb53d0c3-bd59-4721-89bc-06916a9147ef/resourceGroups/resourcegroup1/providers/Microsoft.Network/virtualNetworks/virtualNetwork1"))) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsDeleteSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsDeleteSamples.java deleted file mode 100644 index 27ffd348fbcb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationMigrationItems Delete. - */ -public final class ReplicationMigrationItemsDeleteSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationMigrationItems_Delete.json - */ - /** - * Sample code: Delete the migration item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - deleteTheMigrationItem(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationMigrationItems() - .delete("migrationvault", "resourcegroup1", "vmwarefabric1", "vmwareContainer1", "virtualmachine1", null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsGetSamples.java deleted file mode 100644 index 15af4f890955..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationMigrationItems Get. - */ -public final class ReplicationMigrationItemsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationMigrationItems_Get.json - */ - /** - * Sample code: Gets the details of a migration item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheDetailsOfAMigrationItem( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationMigrationItems() - .getWithResponse("migrationvault", "resourcegroup1", "vmwarefabric1", "vmwareContainer1", "virtualmachine1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsListByReplicationProte.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsListByReplicationProte.java deleted file mode 100644 index a5846502d51b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsListByReplicationProte.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationMigrationItems ListByReplicationProtectionContainers. - */ -public final class ReplicationMigrationItemsListByReplicationProte { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationMigrationItems_ListByReplicationProtectionContainers.json - */ - /** - * Sample code: Gets the list of migration items in the protection container. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfMigrationItemsInTheProtectionContainer( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationMigrationItems() - .listByReplicationProtectionContainers("migrationvault", "resourcegroup1", "vmwarefabric1", - "vmwareContainer1", null, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsListSamples.java deleted file mode 100644 index d89a104c6cbf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsListSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationMigrationItems List. - */ -public final class ReplicationMigrationItemsListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationMigrationItems_List.json - */ - /** - * Sample code: Gets the list of migration items in the vault. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfMigrationItemsInTheVault( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationMigrationItems() - .list("migrationvault", "resourcegroup1", null, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsMigrateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsMigrateSamples.java deleted file mode 100644 index 93b5a09ed40c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsMigrateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrateInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtMigrateInput; - -/** - * Samples for ReplicationMigrationItems Migrate. - */ -public final class ReplicationMigrationItemsMigrateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationMigrationItems_Migrate.json - */ - /** - * Sample code: Migrate item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void migrateItem(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationMigrationItems() - .migrate("migrationvault", "resourcegroup1", "vmwarefabric1", "vmwareContainer1", "virtualmachine1", - new MigrateInput().withProperties(new MigrateInputProperties() - .withProviderSpecificDetails(new VMwareCbtMigrateInput().withPerformShutdown("true"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsPauseReplicationSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsPauseReplicationSamples.java deleted file mode 100644 index c8ac7e863011..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsPauseReplicationSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PauseReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PauseReplicationInputProperties; - -/** - * Samples for ReplicationMigrationItems PauseReplication. - */ -public final class ReplicationMigrationItemsPauseReplicationSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationMigrationItems_PauseReplication.json - */ - /** - * Sample code: Pause replication. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - pauseReplication(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationMigrationItems() - .pauseReplication("migrationvault", "resourcegroup1", "vmwarefabric1", "vmwareContainer1", - "virtualmachine1", - new PauseReplicationInput() - .withProperties(new PauseReplicationInputProperties().withInstanceType("VMwareCbt")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsResumeReplicationSampl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsResumeReplicationSampl.java deleted file mode 100644 index 687f55fb241b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsResumeReplicationSampl.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeReplicationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtResumeReplicationInput; - -/** - * Samples for ReplicationMigrationItems ResumeReplication. - */ -public final class ReplicationMigrationItemsResumeReplicationSampl { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationMigrationItems_ResumeReplication.json - */ - /** - * Sample code: Resume replication. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - resumeReplication(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationMigrationItems() - .resumeReplication("migrationvault", "resourcegroup1", "vmwarefabric1", "vmwareContainer1", - "virtualmachine1", - new ResumeReplicationInput() - .withProperties(new ResumeReplicationInputProperties().withProviderSpecificDetails( - new VMwareCbtResumeReplicationInput().withDeleteMigrationResources("false"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsResyncSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsResyncSamples.java deleted file mode 100644 index 195cbf518b72..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsResyncSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResyncInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResyncInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtResyncInput; - -/** - * Samples for ReplicationMigrationItems Resync. - */ -public final class ReplicationMigrationItemsResyncSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationMigrationItems_Resync.json - */ - /** - * Sample code: Resynchronizes replication. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - resynchronizesReplication(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationMigrationItems() - .resync("migrationvault", "resourcegroup1", "vmwarefabric1", "vmwareContainer1", "virtualmachine1", - new ResyncInput().withProperties(new ResyncInputProperties() - .withProviderSpecificDetails(new VMwareCbtResyncInput().withSkipCbtReset("true"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsTestMigrateCleanupSamp.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsTestMigrateCleanupSamp.java deleted file mode 100644 index 995141cdc95d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsTestMigrateCleanupSamp.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateCleanupInputProperties; - -/** - * Samples for ReplicationMigrationItems TestMigrateCleanup. - */ -public final class ReplicationMigrationItemsTestMigrateCleanupSamp { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationMigrationItems_TestMigrateCleanup.json - */ - /** - * Sample code: Test migrate cleanup. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - testMigrateCleanup(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationMigrationItems() - .testMigrateCleanup("migrationvault", "resourcegroup1", "vmwarefabric1", "vmwareContainer1", - "virtualmachine1", - new TestMigrateCleanupInput() - .withProperties(new TestMigrateCleanupInputProperties().withComments("Test Failover Cleanup")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsTestMigrateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsTestMigrateSamples.java deleted file mode 100644 index f1a2ddee836e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsTestMigrateSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtTestMigrateInput; - -/** - * Samples for ReplicationMigrationItems TestMigrate. - */ -public final class ReplicationMigrationItemsTestMigrateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationMigrationItems_TestMigrate.json - */ - /** - * Sample code: Test migrate item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - testMigrateItem(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationMigrationItems() - .testMigrate("migrationvault", "resourcegroup1", "vmwarefabric1", "vmwareContainer1", "virtualmachine1", - new TestMigrateInput().withProperties(new TestMigrateInputProperties() - .withProviderSpecificDetails(new VMwareCbtTestMigrateInput().withRecoveryPointId( - "/Subscriptions/cb53d0c3-bd59-4721-89bc-06916a9147ef/resourceGroups/resourcegroup1/providers/Microsoft.RecoveryServices/vaults/migrationvault/replicationFabrics/vmwarefabric1/replicationProtectionContainers/vmwareContainer1/replicationMigrationItems/virtualmachine1/migrationRecoveryPoints/9e737191-317e-43d0-8c83-e32ac3b34686") - .withNetworkId( - "/Subscriptions/cb53d0c3-bd59-4721-89bc-06916a9147ef/resourceGroups/resourcegroup1/providers/Microsoft.Network/virtualNetworks/virtualNetwork1"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsUpdateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsUpdateSamples.java deleted file mode 100644 index a68c591eaf5e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationMigrationItemsUpdateSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMigrationItemInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtUpdateMigrationItemInput; - -/** - * Samples for ReplicationMigrationItems Update. - */ -public final class ReplicationMigrationItemsUpdateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationMigrationItems_Update.json - */ - /** - * Sample code: Updates migration item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - updatesMigrationItem(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - MigrationItem resource = manager.replicationMigrationItems() - .getWithResponse("migrationvault", "resourcegroup1", "vmwarefabric1", "vmwareContainer1", "virtualmachine1", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new UpdateMigrationItemInputProperties() - .withProviderSpecificDetails(new VMwareCbtUpdateMigrationItemInput())) - .apply(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsCreateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsCreateSamples.java deleted file mode 100644 index 49e81be53c65..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsCreateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateNetworkMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmmToAzureCreateNetworkMappingInput; - -/** - * Samples for ReplicationNetworkMappings Create. - */ -public final class ReplicationNetworkMappingsCreateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationNetworkMappings_Create.json - */ - /** - * Sample code: Creates network mapping. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - createsNetworkMapping(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationNetworkMappings() - .define("corpe2amap") - .withExistingReplicationNetwork("srce2avaultbvtaC27", "srcBvte2a14C27", - "b0cef6e9a4437b81803d0b55ada4f700ab66caae59c35d62723a1589c0cd13ac", - "e2267b5c-2650-49bd-ab3f-d66aae694c06") - .withProperties(new CreateNetworkMappingInputProperties().withRecoveryFabricName("Microsoft Azure") - .withRecoveryNetworkId( - "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai") - .withFabricSpecificDetails(new VmmToAzureCreateNetworkMappingInput())) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsDeleteSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsDeleteSamples.java deleted file mode 100644 index 8f440b5f5d86..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsDeleteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationNetworkMappings Delete. - */ -public final class ReplicationNetworkMappingsDeleteSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationNetworkMappings_Delete.json - */ - /** - * Sample code: Delete network mapping. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - deleteNetworkMapping(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationNetworkMappings() - .delete("srce2avaultbvtaC27", "srcBvte2a14C27", - "b0cef6e9a4437b81803d0b55ada4f700ab66caae59c35d62723a1589c0cd13ac", - "e2267b5c-2650-49bd-ab3f-d66aae694c06", "corpe2amap", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsGetSamples.java deleted file mode 100644 index f3fc9662a159..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationNetworkMappings Get. - */ -public final class ReplicationNetworkMappingsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationNetworkMappings_Get.json - */ - /** - * Sample code: Gets network mapping by name. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - getsNetworkMappingByName(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationNetworkMappings() - .getWithResponse("srce2avaultbvtaC27", "srcBvte2a14C27", - "b0cef6e9a4437b81803d0b55ada4f700ab66caae59c35d62723a1589c0cd13ac", - "e2267b5c-2650-49bd-ab3f-d66aae694c06", "corpe2amap", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsListByReplicationNetw.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsListByReplicationNetw.java deleted file mode 100644 index ceb88bf6083c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsListByReplicationNetw.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationNetworkMappings ListByReplicationNetworks. - */ -public final class ReplicationNetworkMappingsListByReplicationNetw { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationNetworkMappings_ListByReplicationNetworks.json - */ - /** - * Sample code: Gets all the network mappings under a network. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsAllTheNetworkMappingsUnderANetwork( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationNetworkMappings() - .listByReplicationNetworks("srce2avaultbvtaC27", "srcBvte2a14C27", - "b0cef6e9a4437b81803d0b55ada4f700ab66caae59c35d62723a1589c0cd13ac", - "e2267b5c-2650-49bd-ab3f-d66aae694c06", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsListSamples.java deleted file mode 100644 index cd1a4eb6808e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsListSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationNetworkMappings List. - */ -public final class ReplicationNetworkMappingsListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationNetworkMappings_List.json - */ - /** - * Sample code: Gets all the network mappings under a vault. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsAllTheNetworkMappingsUnderAVault( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationNetworkMappings() - .list("srce2avaultbvtaC27", "srcBvte2a14C27", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsUpdateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsUpdateSamples.java deleted file mode 100644 index fea44410b8a1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsUpdateSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMapping; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateNetworkMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmmToAzureUpdateNetworkMappingInput; - -/** - * Samples for ReplicationNetworkMappings Update. - */ -public final class ReplicationNetworkMappingsUpdateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationNetworkMappings_Update.json - */ - /** - * Sample code: Updates network mapping. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - updatesNetworkMapping(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - NetworkMapping resource = manager.replicationNetworkMappings() - .getWithResponse("srce2avaultbvtaC27", "srcBvte2a14C27", - "b0cef6e9a4437b81803d0b55ada4f700ab66caae59c35d62723a1589c0cd13ac", - "e2267b5c-2650-49bd-ab3f-d66aae694c06", "corpe2amap", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new UpdateNetworkMappingInputProperties().withRecoveryFabricName("Microsoft Azure") - .withRecoveryNetworkId( - "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai2") - .withFabricSpecificDetails(new VmmToAzureUpdateNetworkMappingInput())) - .apply(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksGetSamples.java deleted file mode 100644 index e8e09540350a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationNetworks Get. - */ -public final class ReplicationNetworksGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationNetworks_Get.json - */ - /** - * Sample code: Gets a network with specified server id and network name. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsANetworkWithSpecifiedServerIdAndNetworkName( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationNetworks() - .getWithResponse("srce2avaultbvtaC27", "srcBvte2a14C27", - "b0cef6e9a4437b81803d0b55ada4f700ab66caae59c35d62723a1589c0cd13ac", - "93ce99d7-1219-4914-aa61-73fe5023988e", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksListByReplicationFabricsSamp.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksListByReplicationFabricsSamp.java deleted file mode 100644 index 25cade648531..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksListByReplicationFabricsSamp.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationNetworks ListByReplicationFabrics. - */ -public final class ReplicationNetworksListByReplicationFabricsSamp { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationNetworks_ListByReplicationFabrics.json - */ - /** - * Sample code: Gets the list of networks under a fabric. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfNetworksUnderAFabric( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationNetworks() - .listByReplicationFabrics("srce2avaultbvtaC27", "srcBvte2a14C27", - "b0cef6e9a4437b81803d0b55ada4f700ab66caae59c35d62723a1589c0cd13ac", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksListSamples.java deleted file mode 100644 index e8c7b3eb84e3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationNetworks List. - */ -public final class ReplicationNetworksListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationNetworks_List.json - */ - /** - * Sample code: Gets the list of networks. View-only API. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfNetworksViewOnlyAPI( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationNetworks().list("srce2avaultbvtaC27", "srcBvte2a14C27", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesCreateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesCreateSamples.java deleted file mode 100644 index 3a82098af248..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesCreateSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreatePolicyInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzurePolicyInput; - -/** - * Samples for ReplicationPolicies Create. - */ -public final class ReplicationPoliciesCreateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationPolicies_Create.json - */ - /** - * Sample code: Creates the policy. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - createsThePolicy(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationPolicies() - .define("protectionprofile1") - .withExistingVault("vault1", "resourceGroupPS1") - .withProperties( - new CreatePolicyInputProperties().withProviderSpecificInput(new HyperVReplicaAzurePolicyInput())) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesDeleteSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesDeleteSamples.java deleted file mode 100644 index 0e4d25e97cf4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesDeleteSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationPolicies Delete. - */ -public final class ReplicationPoliciesDeleteSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationPolicies_Delete.json - */ - /** - * Sample code: Delete the policy. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - deleteThePolicy(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationPolicies() - .delete("vault1", "resourceGroupPS1", "protectionprofile1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesGetSamples.java deleted file mode 100644 index de538d09a660..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationPolicies Get. - */ -public final class ReplicationPoliciesGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationPolicies_Get.json - */ - /** - * Sample code: Gets the requested policy. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - getsTheRequestedPolicy(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationPolicies() - .getWithResponse("vault1", "resourceGroupPS1", "protectionprofile1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesListSamples.java deleted file mode 100644 index 99f44d177cfc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationPolicies List. - */ -public final class ReplicationPoliciesListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationPolicies_List.json - */ - /** - * Sample code: Gets the list of replication policies. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfReplicationPolicies( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationPolicies().list("vault1", "resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesUpdateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesUpdateSamples.java deleted file mode 100644 index 61224e9cb4e6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesUpdateSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzurePolicyInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Policy; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdatePolicyInputProperties; - -/** - * Samples for ReplicationPolicies Update. - */ -public final class ReplicationPoliciesUpdateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationPolicies_Update.json - */ - /** - * Sample code: Updates the policy. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - updatesThePolicy(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - Policy resource = manager.replicationPolicies() - .getWithResponse("vault1", "resourceGroupPS1", "protectionprofile1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties( - new UpdatePolicyInputProperties().withReplicationProviderSettings(new HyperVReplicaAzurePolicyInput())) - .apply(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectableItemsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectableItemsGetSamples.java deleted file mode 100644 index f2f2c6b999dc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectableItemsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectableItems Get. - */ -public final class ReplicationProtectableItemsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectableItems_Get.json - */ - /** - * Sample code: Gets the details of a protectable item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheDetailsOfAProtectableItem( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectableItems() - .getWithResponse("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "c0c14913-3d7a-48ea-9531-cc99e0e686e6", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectableItemsListByReplicationPro.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectableItemsListByReplicationPro.java deleted file mode 100644 index 64d2d0852f74..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectableItemsListByReplicationPro.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectableItems ListByReplicationProtectionContainers. - */ -public final class ReplicationProtectableItemsListByReplicationPro { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectableItems_ListByReplicationProtectionContainers.json - */ - /** - * Sample code: Gets the list of protectable items. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfProtectableItems( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectableItems() - .listByReplicationProtectionContainers("vault1", "resourceGroupPS1", "cloud1", - "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", null, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsAddDisksSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsAddDisksSamples.java deleted file mode 100644 index 22967c6ac248..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsAddDisksSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AAddDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AVmDiskInputDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddDisksInputProperties; -import java.util.Arrays; - -/** - * Samples for ReplicationProtectedItems AddDisks. - */ -public final class ReplicationProtectedItemsAddDisksSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_AddDisks.json - */ - /** - * Sample code: Add disk(s) for protection. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - addDiskSForProtection(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .addDisks("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", - new AddDisksInput().withProperties(new AddDisksInputProperties().withProviderSpecificDetails( - new A2AAddDisksInput().withVmDisks(Arrays.asList(new A2AVmDiskInputDetails() - .withDiskUri("https://vmstorage.blob.core.windows.net/vhds/datadisk1.vhd") - .withRecoveryAzureStorageAccountId( - "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourcegroups/recoveryResource/providers/Microsoft.Storage/storageAccounts/recoverystorage") - .withPrimaryStagingAzureStorageAccountId( - "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourcegroups/primaryResource/providers/Microsoft.Storage/storageAccounts/vmcachestorage"))))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsApplyRecoveryPointSamp.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsApplyRecoveryPointSamp.java deleted file mode 100644 index 8cb078efc0ad..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsApplyRecoveryPointSamp.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplyRecoveryPointInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplyRecoveryPointInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureApplyRecoveryPointInput; - -/** - * Samples for ReplicationProtectedItems ApplyRecoveryPoint. - */ -public final class ReplicationProtectedItemsApplyRecoveryPointSamp { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_ApplyRecoveryPoint.json - */ - /** - * Sample code: Change or apply recovery point. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - changeOrApplyRecoveryPoint(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .applyRecoveryPoint("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", - new ApplyRecoveryPointInput().withProperties(new ApplyRecoveryPointInputProperties() - .withRecoveryPointId( - "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/cloud1/replicationProtectionContainers/cloud_6d224fc6-f326-5d35-96de-fbf51efb3179/replicationProtectedItems/f8491e4f-817a-40dd-a90c-af773978c75b/recoveryPoints/e4d05fe9-5dfd-47be-b50b-aad306b2802d") - .withProviderSpecificDetails(new HyperVReplicaAzureApplyRecoveryPointInput())), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsCreateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsCreateSamples.java deleted file mode 100644 index 758912897fb4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsCreateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableProtectionInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureEnableProtectionInput; - -/** - * Samples for ReplicationProtectedItems Create. - */ -public final class ReplicationProtectedItemsCreateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_Create.json - */ - /** - * Sample code: Enables protection. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - enablesProtection(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .define("f8491e4f-817a-40dd-a90c-af773978c75b") - .withExistingReplicationProtectionContainer("vault1", "resourceGroupPS1", "cloud1", - "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179") - .withProperties(new EnableProtectionInputProperties().withPolicyId( - "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationPolicies/protectionprofile1") - .withProtectableItemId( - "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/cloud1/replicationProtectionContainers/cloud_6d224fc6-f326-5d35-96de-fbf51efb3179/replicationProtectableItems/f8491e4f-817a-40dd-a90c-af773978c75b") - .withProviderSpecificDetails(new HyperVReplicaAzureEnableProtectionInput())) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsDeleteSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsDeleteSamples.java deleted file mode 100644 index f9b8bceb4a97..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsDeleteSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionProviderSpecificInput; - -/** - * Samples for ReplicationProtectedItems Delete. - */ -public final class ReplicationProtectedItemsDeleteSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_Delete.json - */ - /** - * Sample code: Disables protection. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - disablesProtection(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .delete("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "c0c14913-3d7a-48ea-9531-cc99e0e686e6", - new DisableProtectionInput().withProperties(new DisableProtectionInputProperties() - .withReplicationProviderInput(new DisableProtectionProviderSpecificInput())), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsFailoverCancelSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsFailoverCancelSamples.java deleted file mode 100644 index 73441ab2cfd3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsFailoverCancelSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectedItems FailoverCancel. - */ -public final class ReplicationProtectedItemsFailoverCancelSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_FailoverCancel.json - */ - /** - * Sample code: Execute cancel failover. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - executeCancelFailover(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .failoverCancel("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsFailoverCommitSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsFailoverCommitSamples.java deleted file mode 100644 index 34b2cfe3f4fc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsFailoverCommitSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectedItems FailoverCommit. - */ -public final class ReplicationProtectedItemsFailoverCommitSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_FailoverCommit.json - */ - /** - * Sample code: Execute commit failover. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - executeCommitFailover(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .failoverCommit("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsGetSamples.java deleted file mode 100644 index 7aecf038344c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectedItems Get. - */ -public final class ReplicationProtectedItemsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_Get.json - */ - /** - * Sample code: Gets the details of a Replication protected item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheDetailsOfAReplicationProtectedItem( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .getWithResponse("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsListByReplicationProte.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsListByReplicationProte.java deleted file mode 100644 index acc4c93541e1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsListByReplicationProte.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectedItems ListByReplicationProtectionContainers. - */ -public final class ReplicationProtectedItemsListByReplicationProte { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_ListByReplicationProtectionContainers.json - */ - /** - * Sample code: Gets the list of Replication protected items. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfReplicationProtectedItems( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .listByReplicationProtectionContainers("vault1", "resourceGroupPS1", "cloud1", - "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsListSamples.java deleted file mode 100644 index 87791139913b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsListSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectedItems List. - */ -public final class ReplicationProtectedItemsListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_List.json - */ - /** - * Sample code: Gets the list of replication protected items. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfReplicationProtectedItems( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .list("vault1", "resourceGroupPS1", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsPlannedFailoverSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsPlannedFailoverSamples.java deleted file mode 100644 index 9e3ca362e70e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsPlannedFailoverSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzurePlannedFailoverProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PlannedFailoverInputProperties; - -/** - * Samples for ReplicationProtectedItems PlannedFailover. - */ -public final class ReplicationProtectedItemsPlannedFailoverSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_PlannedFailover.json - */ - /** - * Sample code: Execute planned failover. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - executePlannedFailover(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .plannedFailover("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", - new PlannedFailoverInput() - .withProperties(new PlannedFailoverInputProperties().withFailoverDirection("PrimaryToRecovery") - .withProviderSpecificDetails(new HyperVReplicaAzurePlannedFailoverProviderInput())), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsPurgeSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsPurgeSamples.java deleted file mode 100644 index 1bba6380a874..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsPurgeSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectedItems Purge. - */ -public final class ReplicationProtectedItemsPurgeSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_Purge.json - */ - /** - * Sample code: Purges protection. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - purgesProtection(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .purge("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "c0c14913-3d7a-48ea-9531-cc99e0e686e6", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsRemoveDisksSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsRemoveDisksSamples.java deleted file mode 100644 index 2d6337406af2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsRemoveDisksSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ARemoveDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveDisksInputProperties; -import java.util.Arrays; - -/** - * Samples for ReplicationProtectedItems RemoveDisks. - */ -public final class ReplicationProtectedItemsRemoveDisksSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_RemoveDisks.json - */ - /** - * Sample code: Removes disk(s). - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - removesDiskS(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .removeDisks("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", - new RemoveDisksInput().withProperties( - new RemoveDisksInputProperties().withProviderSpecificDetails(new A2ARemoveDisksInput() - .withVmDisksUris(Arrays.asList("https://vmstorage.blob.core.windows.net/vhds/datadisk1.vhd")))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsRepairReplicationSampl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsRepairReplicationSampl.java deleted file mode 100644 index ad4c3820920f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsRepairReplicationSampl.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectedItems RepairReplication. - */ -public final class ReplicationProtectedItemsRepairReplicationSampl { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_RepairReplication.json - */ - /** - * Sample code: Resynchronize or repair replication. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void resynchronizeOrRepairReplication( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .repairReplication("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsReprotectSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsReprotectSamples.java deleted file mode 100644 index 9b54c8d5c58d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsReprotectSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureReprotectInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReverseReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReverseReplicationInputProperties; - -/** - * Samples for ReplicationProtectedItems Reprotect. - */ -public final class ReplicationProtectedItemsReprotectSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_Reprotect.json - */ - /** - * Sample code: Execute Reverse Replication\Reprotect. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void executeReverseReplicationReprotect( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .reprotect("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", - new ReverseReplicationInput() - .withProperties(new ReverseReplicationInputProperties().withFailoverDirection("PrimaryToRecovery") - .withProviderSpecificDetails(new HyperVReplicaAzureReprotectInput())), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsResolveHealthErrorsSam.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsResolveHealthErrorsSam.java deleted file mode 100644 index 744a72177be9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsResolveHealthErrorsSam.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthError; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthInputProperties; -import java.util.Arrays; - -/** - * Samples for ReplicationProtectedItems ResolveHealthErrors. - */ -public final class ReplicationProtectedItemsResolveHealthErrorsSam { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_ResolveHealthErrors.json - */ - /** - * Sample code: Resolve health errors. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - resolveHealthErrors(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .resolveHealthErrors("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", - new ResolveHealthInput().withProperties(new ResolveHealthInputProperties() - .withHealthErrors(Arrays.asList(new ResolveHealthError().withHealthErrorId("3:8020")))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsSwitchProviderSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsSwitchProviderSamples.java deleted file mode 100644 index abdb9aa7065b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsSwitchProviderSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2SwitchProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProviderInputProperties; - -/** - * Samples for ReplicationProtectedItems SwitchProvider. - */ -public final class ReplicationProtectedItemsSwitchProviderSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_SwitchProvider.json - */ - /** - * Sample code: Execute switch provider. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - executeSwitchProvider(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .switchProvider("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", - new SwitchProviderInput().withProperties(new SwitchProviderInputProperties() - .withTargetInstanceType("InMageRcm") - .withProviderSpecificDetails(new InMageAzureV2SwitchProviderInput().withTargetVaultId( - "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault2") - .withTargetFabricId( - "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/cloud2") - .withTargetApplianceId("5efaa202-e958-435e-8171-706bf735fcc4"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsTestFailoverCleanupSam.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsTestFailoverCleanupSam.java deleted file mode 100644 index c0b00ee32532..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsTestFailoverCleanupSam.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverCleanupInputProperties; - -/** - * Samples for ReplicationProtectedItems TestFailoverCleanup. - */ -public final class ReplicationProtectedItemsTestFailoverCleanupSam { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_TestFailoverCleanup.json - */ - /** - * Sample code: Execute test failover cleanup. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - executeTestFailoverCleanup(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .testFailoverCleanup("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", - new TestFailoverCleanupInput() - .withProperties(new TestFailoverCleanupInputProperties().withComments("Test Failover Cleanup")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsTestFailoverSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsTestFailoverSamples.java deleted file mode 100644 index 466da74b7f6c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsTestFailoverSamples.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureTestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverInputProperties; - -/** - * Samples for ReplicationProtectedItems TestFailover. - */ -public final class ReplicationProtectedItemsTestFailoverSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_TestFailover.json - */ - /** - * Sample code: Execute test failover. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - executeTestFailover(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .testFailover("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", - new TestFailoverInput().withProperties(new TestFailoverInputProperties() - .withFailoverDirection("PrimaryToRecovery") - .withNetworkType("VmNetworkAsInput") - .withNetworkId( - "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai") - .withProviderSpecificDetails(new HyperVReplicaAzureTestFailoverInput())), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsUnplannedFailoverSampl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsUnplannedFailoverSampl.java deleted file mode 100644 index a22944266524..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsUnplannedFailoverSampl.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureUnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UnplannedFailoverInputProperties; - -/** - * Samples for ReplicationProtectedItems UnplannedFailover. - */ -public final class ReplicationProtectedItemsUnplannedFailoverSampl { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_UnplannedFailover.json - */ - /** - * Sample code: Execute unplanned failover. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - executeUnplannedFailover(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .unplannedFailover("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", - new UnplannedFailoverInput() - .withProperties(new UnplannedFailoverInputProperties().withFailoverDirection("PrimaryToRecovery") - .withSourceSiteOperations("NotRequired") - .withProviderSpecificDetails(new HyperVReplicaAzureUnplannedFailoverInput())), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsUpdateApplianceSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsUpdateApplianceSamples.java deleted file mode 100644 index 4f3ac61aba7b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsUpdateApplianceSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmUpdateApplianceForReplicationProtectedItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateApplianceForReplicationProtectedItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateApplianceForReplicationProtectedItemInputProperties; - -/** - * Samples for ReplicationProtectedItems UpdateAppliance. - */ -public final class ReplicationProtectedItemsUpdateApplianceSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_UpdateAppliance.json - */ - /** - * Sample code: Updates appliance for replication protected Item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void updatesApplianceForReplicationProtectedItem( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .updateAppliance("Ayan-0106-SA-Vault", "Ayan-0106-SA-RG", "Ayan-0106-SA-Vaultreplicationfabric", - "Ayan-0106-SA-Vaultreplicationcontainer", "idclab-vcen67_50158124-8857-3e08-0893-2ddf8ebb8c1f", - new UpdateApplianceForReplicationProtectedItemInput().withProperties( - new UpdateApplianceForReplicationProtectedItemInputProperties().withTargetApplianceId("") - .withProviderSpecificDetails( - new InMageRcmUpdateApplianceForReplicationProtectedItemInput().withRunAsAccountId(""))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsUpdateMobilityServiceS.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsUpdateMobilityServiceS.java deleted file mode 100644 index ea75af651d46..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsUpdateMobilityServiceS.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMobilityServiceRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMobilityServiceRequestProperties; - -/** - * Samples for ReplicationProtectedItems UpdateMobilityService. - */ -public final class ReplicationProtectedItemsUpdateMobilityServiceS { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_UpdateMobilityService.json - */ - /** - * Sample code: Update the mobility service on a protected item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void updateTheMobilityServiceOnAProtectedItem( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectedItems() - .updateMobilityService("WCUSVault", "wcusValidations", "WIN-JKKJ31QI8U2", - "cloud_c6780228-83bd-4f3e-a70e-cb46b7da33a0", "79dd20ab-2b40-11e7-9791-0050568f387e", - new UpdateMobilityServiceRequest() - .withProperties(new UpdateMobilityServiceRequestProperties().withRunAsAccountId("2")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsUpdateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsUpdateSamples.java deleted file mode 100644 index 9148218fd15c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectedItemsUpdateSamples.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureUpdateReplicationProtectedItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IpConfigInputDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LicenseType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMNicInputDetails; -import java.util.Arrays; - -/** - * Samples for ReplicationProtectedItems Update. - */ -public final class ReplicationProtectedItemsUpdateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectedItems_Update.json - */ - /** - * Sample code: Updates the replication protected Item settings. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void updatesTheReplicationProtectedItemSettings( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - ReplicationProtectedItem resource = manager.replicationProtectedItems() - .getWithResponse("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "f8491e4f-817a-40dd-a90c-af773978c75b", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new UpdateReplicationProtectedItemInputProperties().withRecoveryAzureVMName("vm1") - .withRecoveryAzureVMSize("Basic_A0") - .withSelectedRecoveryAzureNetworkId( - "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai") - .withVmNics(Arrays.asList(new VMNicInputDetails().withNicId( - "TWljcm9zb2Z0OkY4NDkxRTRGLTgxN0EtNDBERC1BOTBDLUFGNzczOTc4Qzc1Qlw3NjAwMzMxRS03NDk4LTQ0QTQtQjdDNy0xQjY1NkJDREQ1MkQ=") - .withIpConfigs(Arrays.asList(new IpConfigInputDetails().withIpConfigName("ipconfig1") - .withIsPrimary(true) - .withRecoverySubnetName("subnet1") - .withRecoveryStaticIpAddress("10.0.2.46"))) - .withSelectionType("SelectedByUser"))) - .withLicenseType(LicenseType.WINDOWS_SERVER) - .withProviderSpecificDetails(new HyperVReplicaAzureUpdateReplicationProtectedItemInput())) - .apply(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsCreateSam.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsCreateSam.java deleted file mode 100644 index adf513d45b46..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsCreateSam.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderSpecificContainerMappingInput; - -/** - * Samples for ReplicationProtectionContainerMappings Create. - */ -public final class ReplicationProtectionContainerMappingsCreateSam { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainerMappings_Create.json - */ - /** - * Sample code: Create protection container mapping. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void createProtectionContainerMapping( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainerMappings() - .define("cloud1protectionprofile1") - .withExistingReplicationProtectionContainer("vault1", "resourceGroupPS1", "cloud1", - "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179") - .withProperties(new CreateProtectionContainerMappingInputProperties() - .withTargetProtectionContainerId("Microsoft Azure") - .withPolicyId( - "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationPolicies/protectionprofile1") - .withProviderSpecificInput(new ReplicationProviderSpecificContainerMappingInput())) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsDeleteSam.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsDeleteSam.java deleted file mode 100644 index 6b1b6e6edde8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsDeleteSam.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveProtectionContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveProtectionContainerMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderContainerUnmappingInput; - -/** - * Samples for ReplicationProtectionContainerMappings Delete. - */ -public final class ReplicationProtectionContainerMappingsDeleteSam { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainerMappings_Delete.json - */ - /** - * Sample code: Remove protection container mapping. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void removeProtectionContainerMapping( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainerMappings() - .delete("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "cloud1protectionprofile1", - new RemoveProtectionContainerMappingInput() - .withProperties(new RemoveProtectionContainerMappingInputProperties() - .withProviderSpecificInput(new ReplicationProviderContainerUnmappingInput())), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsGetSamples.java deleted file mode 100644 index 80dfc8052a16..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectionContainerMappings Get. - */ -public final class ReplicationProtectionContainerMappingsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainerMappings_Get.json - */ - /** - * Sample code: Gets a protection container mapping. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsAProtectionContainerMapping( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainerMappings() - .getWithResponse("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "cloud1protectionprofile1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsListByRep.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsListByRep.java deleted file mode 100644 index ba66f912a6f1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsListByRep.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectionContainerMappings ListByReplicationProtectionContainers. - */ -public final class ReplicationProtectionContainerMappingsListByRep { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainerMappings_ListByReplicationProtectionContainers.json - */ - /** - * Sample code: Gets the list of protection container mappings for a protection container. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfProtectionContainerMappingsForAProtectionContainer( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainerMappings() - .listByReplicationProtectionContainers("vault1", "resourceGroupPS1", "cloud1", - "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsListSampl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsListSampl.java deleted file mode 100644 index 2aac0a37875f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsListSampl.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectionContainerMappings List. - */ -public final class ReplicationProtectionContainerMappingsListSampl { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainerMappings_List.json - */ - /** - * Sample code: Gets the list of all protection container mappings in a vault. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfAllProtectionContainerMappingsInAVault( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainerMappings() - .list("vault1", "resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsPurgeSamp.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsPurgeSamp.java deleted file mode 100644 index a368494ce4c5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsPurgeSamp.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectionContainerMappings Purge. - */ -public final class ReplicationProtectionContainerMappingsPurgeSamp { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainerMappings_Purge.json - */ - /** - * Sample code: Purge protection container mapping. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void purgeProtectionContainerMapping( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainerMappings() - .purge("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "cloud1protectionprofile1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsUpdateSam.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsUpdateSam.java deleted file mode 100644 index 03030878c4ce..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainerMappingsUpdateSam.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AUpdateContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AgentAutoUpdateStatus; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerMapping; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateProtectionContainerMappingInputProperties; - -/** - * Samples for ReplicationProtectionContainerMappings Update. - */ -public final class ReplicationProtectionContainerMappingsUpdateSam { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainerMappings_Update.json - */ - /** - * Sample code: Update protection container mapping. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void updateProtectionContainerMapping( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - ProtectionContainerMapping resource = manager.replicationProtectionContainerMappings() - .getWithResponse("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - "cloud1protectionprofile1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new UpdateProtectionContainerMappingInputProperties().withProviderSpecificInput( - new A2AUpdateContainerMappingInput().withAgentAutoUpdateStatus(AgentAutoUpdateStatus.ENABLED) - .withAutomationAccountArmId( - "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/automationrg1/providers/Microsoft.Automation/automationAccounts/automationaccount1"))) - .apply(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersCreateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersCreateSamples.java deleted file mode 100644 index e8ab11bc4214..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersCreateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderSpecificContainerCreationInput; -import java.util.Arrays; - -/** - * Samples for ReplicationProtectionContainers Create. - */ -public final class ReplicationProtectionContainersCreateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainers_Create.json - */ - /** - * Sample code: Create a protection container. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - createAProtectionContainer(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainers() - .define("cloud_6d224fc6-f326-5d35-96de-fbf51efb3179") - .withExistingReplicationFabric("vault1", "resourceGroupPS1", "cloud1") - .withProperties(new CreateProtectionContainerInputProperties() - .withProviderSpecificInput(Arrays.asList(new ReplicationProviderSpecificContainerCreationInput()))) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersDeleteSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersDeleteSamples.java deleted file mode 100644 index 3b3000a2437b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectionContainers Delete. - */ -public final class ReplicationProtectionContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainers_Delete.json - */ - /** - * Sample code: Removes a protection container. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void removesAProtectionContainer( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainers() - .delete("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersDiscoverProtecta.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersDiscoverProtecta.java deleted file mode 100644 index 0fb3c413b8fd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersDiscoverProtecta.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiscoverProtectableItemRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiscoverProtectableItemRequestProperties; - -/** - * Samples for ReplicationProtectionContainers DiscoverProtectableItem. - */ -public final class ReplicationProtectionContainersDiscoverProtecta { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainers_DiscoverProtectableItem.json - */ - /** - * Sample code: Adds a protectable item to the replication protection container. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void addsAProtectableItemToTheReplicationProtectionContainer( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainers() - .discoverProtectableItem("MadhaviVault", "MadhaviVRG", "V2A-W2K12-660", - "cloud_7328549c-5c37-4459-a3c2-e35f9ef6893c", - new DiscoverProtectableItemRequest() - .withProperties(new DiscoverProtectableItemRequestProperties().withFriendlyName("Test") - .withIpAddress("10.150.2.3") - .withOsType("Windows")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersGetSamples.java deleted file mode 100644 index 31168d01cf0c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectionContainers Get. - */ -public final class ReplicationProtectionContainersGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainers_Get.json - */ - /** - * Sample code: Gets the protection container details. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheProtectionContainerDetails( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainers() - .getWithResponse("vault1", "resourceGroupPS1", "cloud1", "cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersListByReplicatio.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersListByReplicatio.java deleted file mode 100644 index cae2d652c5eb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersListByReplicatio.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectionContainers ListByReplicationFabrics. - */ -public final class ReplicationProtectionContainersListByReplicatio { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainers_ListByReplicationFabrics.json - */ - /** - * Sample code: Gets the list of protection container for a fabric. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfProtectionContainerForAFabric( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainers() - .listByReplicationFabrics("vault1", "resourceGroupPS1", "cloud1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersListSamples.java deleted file mode 100644 index d2f4347584e9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectionContainers List. - */ -public final class ReplicationProtectionContainersListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainers_List.json - */ - /** - * Sample code: Gets the list of all protection containers in a vault. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfAllProtectionContainersInAVault( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainers().list("vault1", "resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersSwitchProtection.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersSwitchProtection.java deleted file mode 100644 index 25573ef13d71..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersSwitchProtection.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ASwitchProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionInputProperties; - -/** - * Samples for ReplicationProtectionContainers SwitchProtection. - */ -public final class ReplicationProtectionContainersSwitchProtection { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionContainers_SwitchProtection.json - */ - /** - * Sample code: Switches protection from one container to another or one replication provider to another. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void switchesProtectionFromOneContainerToAnotherOrOneReplicationProviderToAnother( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionContainers() - .switchProtection("priyanponeboxvault", "priyanprg", "CentralUSCanSite", "CentralUSCancloud", - new SwitchProtectionInput().withProperties( - new SwitchProtectionInputProperties().withReplicationProtectedItemName("a2aSwapOsVm") - .withProviderSpecificDetails(new A2ASwitchProtectionInput())), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsCreateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsCreateSamples.java deleted file mode 100644 index a97f37c044a7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsCreateSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ACreateProtectionIntentInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ARecoveryAvailabilityType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentProperties; - -/** - * Samples for ReplicationProtectionIntents Create. - */ -public final class ReplicationProtectionIntentsCreateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionIntents_Create.json - */ - /** - * Sample code: Create protection intent Resource. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void createProtectionIntentResource( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionIntents() - .define("vm1") - .withExistingVault("vault1", "resourceGroupPS1") - .withProperties(new CreateProtectionIntentProperties() - .withProviderSpecificDetails(new A2ACreateProtectionIntentInput().withFabricObjectId( - "/subscriptions/509099b2-9d2c-4636-b43e-bd5cafb6be69/resourceGroups/removeOne/providers/Microsoft.Compute/virtualMachines/vmPpgAv5") - .withPrimaryLocation("eastUs2") - .withRecoveryLocation("westus2") - .withRecoverySubscriptionId("ed5bcdf6-d61e-47bd-8ea9-f2bd379a2640") - .withRecoveryAvailabilityType(A2ARecoveryAvailabilityType.SINGLE) - .withRecoveryResourceGroupId( - "/subscriptions/509099b2-9d2c-4636-b43e-bd5cafb6be69/resourceGroups/removeOne-asr"))) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsGetSamples.java deleted file mode 100644 index 1d2e314875a1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectionIntents Get. - */ -public final class ReplicationProtectionIntentsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionIntents_Get.json - */ - /** - * Sample code: Gets the details of a Replication protection intent item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheDetailsOfAReplicationProtectionIntentItem( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionIntents() - .getWithResponse("vault1", "resourceGroupPS1", "vm1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsListSamples.java deleted file mode 100644 index e171dc48d62e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsListSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationProtectionIntents List. - */ -public final class ReplicationProtectionIntentsListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationProtectionIntents_List.json - */ - /** - * Sample code: Gets the list of replication protection intent objects. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfReplicationProtectionIntentObjects( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationProtectionIntents() - .list("2007vttp", "resourceGroupPS1", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansCreateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansCreateSamples.java deleted file mode 100644 index 5af3b506878b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansCreateSamples.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateRecoveryPlanInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverDeploymentModel; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroup; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProtectedItem; -import java.util.Arrays; - -/** - * Samples for ReplicationRecoveryPlans Create. - */ -public final class ReplicationRecoveryPlansCreateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryPlans_Create.json - */ - /** - * Sample code: Creates a recovery plan with the given details. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void createsARecoveryPlanWithTheGivenDetails( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryPlans() - .define("RPtest1") - .withExistingVault("vault1", "resourceGroupPS1") - .withProperties(new CreateRecoveryPlanInputProperties().withPrimaryFabricId( - "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/cloud1") - .withRecoveryFabricId("Microsoft Azure") - .withFailoverDeploymentModel(FailoverDeploymentModel.RESOURCE_MANAGER) - .withGroups(Arrays.asList(new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems(Arrays.asList(new RecoveryPlanProtectedItem().withId( - "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/cloud1/replicationProtectionContainers/cloud_6d224fc6-f326-5d35-96de-fbf51efb3179/replicationProtectedItems/f8491e4f-817a-40dd-a90c-af773978c75b") - .withVirtualMachineId("f8491e4f-817a-40dd-a90c-af773978c75b"))) - .withStartGroupActions(Arrays.asList()) - .withEndGroupActions(Arrays.asList())))) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansDeleteSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansDeleteSamples.java deleted file mode 100644 index ad0527ba261a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansDeleteSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationRecoveryPlans Delete. - */ -public final class ReplicationRecoveryPlansDeleteSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryPlans_Delete.json - */ - /** - * Sample code: Deletes the specified recovery plan. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void deletesTheSpecifiedRecoveryPlan( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryPlans() - .delete("vault1", "resourceGroupPS1", "RPtest1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansFailoverCancelSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansFailoverCancelSamples.java deleted file mode 100644 index 4c92f86324f3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansFailoverCancelSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationRecoveryPlans FailoverCancel. - */ -public final class ReplicationRecoveryPlansFailoverCancelSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryPlans_FailoverCancel.json - */ - /** - * Sample code: Execute cancel failover of the recovery plan. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void executeCancelFailoverOfTheRecoveryPlan( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryPlans() - .failoverCancel("vault1", "resourceGroupPS1", "RPtest1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansFailoverCommitSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansFailoverCommitSamples.java deleted file mode 100644 index 8925579a6881..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansFailoverCommitSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationRecoveryPlans FailoverCommit. - */ -public final class ReplicationRecoveryPlansFailoverCommitSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryPlans_FailoverCommit.json - */ - /** - * Sample code: Execute commit failover of the recovery plan. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void executeCommitFailoverOfTheRecoveryPlan( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryPlans() - .failoverCommit("vault1", "resourceGroupPS1", "RPtest1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansGetSamples.java deleted file mode 100644 index 8f6be7a88bcc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationRecoveryPlans Get. - */ -public final class ReplicationRecoveryPlansGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryPlans_Get.json - */ - /** - * Sample code: Gets the requested recovery plan. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheRequestedRecoveryPlan( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryPlans() - .getWithResponse("vault1", "resourceGroupPS1", "RPtest1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansListSamples.java deleted file mode 100644 index b58cd267ae35..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationRecoveryPlans List. - */ -public final class ReplicationRecoveryPlansListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryPlans_List.json - */ - /** - * Sample code: Gets the list of recovery plans. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - getsTheListOfRecoveryPlans(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryPlans().list("vault1", "resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansPlannedFailoverSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansPlannedFailoverSamples.java deleted file mode 100644 index 84227a6529be..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansPlannedFailoverSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanHyperVReplicaAzureFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInputProperties; -import java.util.Arrays; - -/** - * Samples for ReplicationRecoveryPlans PlannedFailover. - */ -public final class ReplicationRecoveryPlansPlannedFailoverSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryPlans_PlannedFailover.json - */ - /** - * Sample code: Execute planned failover of the recovery plan. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void executePlannedFailoverOfTheRecoveryPlan( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryPlans() - .plannedFailover("vault1", "resourceGroupPS1", "RPtest1", - new RecoveryPlanPlannedFailoverInput().withProperties(new RecoveryPlanPlannedFailoverInputProperties() - .withFailoverDirection(PossibleOperationsDirections.PRIMARY_TO_RECOVERY) - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanHyperVReplicaAzureFailoverInput()))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansReprotectSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansReprotectSamples.java deleted file mode 100644 index aa719b3046d6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansReprotectSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationRecoveryPlans Reprotect. - */ -public final class ReplicationRecoveryPlansReprotectSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryPlans_Reprotect.json - */ - /** - * Sample code: Execute reprotect of the recovery plan. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void executeReprotectOfTheRecoveryPlan( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryPlans() - .reprotect("vault1", "resourceGroupPS1", "RPtest1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansTestFailoverCleanupSamp.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansTestFailoverCleanupSamp.java deleted file mode 100644 index 089d0f8d63b6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansTestFailoverCleanupSamp.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInputProperties; - -/** - * Samples for ReplicationRecoveryPlans TestFailoverCleanup. - */ -public final class ReplicationRecoveryPlansTestFailoverCleanupSamp { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryPlans_TestFailoverCleanup.json - */ - /** - * Sample code: Execute test failover cleanup of the recovery plan. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void executeTestFailoverCleanupOfTheRecoveryPlan( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryPlans() - .testFailoverCleanup("vault1", "resourceGroupPS1", "RPtest1", - new RecoveryPlanTestFailoverCleanupInput().withProperties( - new RecoveryPlanTestFailoverCleanupInputProperties().withComments("Test Failover Cleanup")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansTestFailoverSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansTestFailoverSamples.java deleted file mode 100644 index 8585b76e59bd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansTestFailoverSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanHyperVReplicaAzureFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInputProperties; -import java.util.Arrays; - -/** - * Samples for ReplicationRecoveryPlans TestFailover. - */ -public final class ReplicationRecoveryPlansTestFailoverSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryPlans_TestFailover.json - */ - /** - * Sample code: Execute test failover of the recovery plan. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void executeTestFailoverOfTheRecoveryPlan( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryPlans() - .testFailover("vault1", "resourceGroupPS1", "RPtest1", - new RecoveryPlanTestFailoverInput().withProperties(new RecoveryPlanTestFailoverInputProperties() - .withFailoverDirection(PossibleOperationsDirections.PRIMARY_TO_RECOVERY) - .withNetworkType("VmNetworkAsInput") - .withNetworkId( - "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai") - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanHyperVReplicaAzureFailoverInput()))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansUnplannedFailoverSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansUnplannedFailoverSamples.java deleted file mode 100644 index af2a03d1a7db..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansUnplannedFailoverSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanHyperVReplicaAzureFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SourceSiteOperations; -import java.util.Arrays; - -/** - * Samples for ReplicationRecoveryPlans UnplannedFailover. - */ -public final class ReplicationRecoveryPlansUnplannedFailoverSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryPlans_UnplannedFailover.json - */ - /** - * Sample code: Execute unplanned failover of the recovery plan. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void executeUnplannedFailoverOfTheRecoveryPlan( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryPlans() - .unplannedFailover("vault1", "resourceGroupPS1", "RPtest1", - new RecoveryPlanUnplannedFailoverInput() - .withProperties(new RecoveryPlanUnplannedFailoverInputProperties() - .withFailoverDirection(PossibleOperationsDirections.PRIMARY_TO_RECOVERY) - .withSourceSiteOperations(SourceSiteOperations.REQUIRED) - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanHyperVReplicaAzureFailoverInput()))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansUpdateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansUpdateSamples.java deleted file mode 100644 index 9f1213725ca3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansUpdateSamples.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroup; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateRecoveryPlanInputProperties; -import java.util.Arrays; - -/** - * Samples for ReplicationRecoveryPlans Update. - */ -public final class ReplicationRecoveryPlansUpdateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryPlans_Update.json - */ - /** - * Sample code: Updates the given recovery plan. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void updatesTheGivenRecoveryPlan( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - RecoveryPlan resource = manager.replicationRecoveryPlans() - .getWithResponse("vault1", "resourceGroupPS1", "RPtest1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new UpdateRecoveryPlanInputProperties().withGroups(Arrays.asList( - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.SHUTDOWN) - .withReplicationProtectedItems(Arrays.asList()) - .withStartGroupActions(Arrays.asList()) - .withEndGroupActions(Arrays.asList()), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems(Arrays.asList()) - .withStartGroupActions(Arrays.asList()) - .withEndGroupActions(Arrays.asList()), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems(Arrays.asList(new RecoveryPlanProtectedItem().withId( - "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/cloud1/replicationProtectionContainers/cloud_6d224fc6-f326-5d35-96de-fbf51efb3179/replicationProtectedItems/f8491e4f-817a-40dd-a90c-af773978c75b") - .withVirtualMachineId("f8491e4f-817a-40dd-a90c-af773978c75b"))) - .withStartGroupActions(Arrays.asList()) - .withEndGroupActions(Arrays.asList()), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems(Arrays.asList(new RecoveryPlanProtectedItem().withId( - "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/cloud1/replicationProtectionContainers/cloud_6d224fc6-f326-5d35-96de-fbf51efb3179/replicationProtectedItems/c0c14913-3d7a-48ea-9531-cc99e0e686e6") - .withVirtualMachineId("c0c14913-3d7a-48ea-9531-cc99e0e686e6"))) - .withStartGroupActions(Arrays.asList()) - .withEndGroupActions(Arrays.asList())))) - .apply(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersCreateSampl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersCreateSampl.java deleted file mode 100644 index a4769034efd9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersCreateSampl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddRecoveryServicesProviderInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IdentityProviderInput; - -/** - * Samples for ReplicationRecoveryServicesProviders Create. - */ -public final class ReplicationRecoveryServicesProvidersCreateSampl { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryServicesProviders_Create.json - */ - /** - * Sample code: Adds a recovery services provider. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void addsARecoveryServicesProvider( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryServicesProviders() - .define("vmwareprovider1") - .withExistingReplicationFabric("migrationvault", "resourcegroup1", "vmwarefabric1") - .withProperties(new AddRecoveryServicesProviderInputProperties().withMachineName("vmwareprovider1") - .withAuthenticationIdentityInput( - new IdentityProviderInput().withTenantId("72f988bf-86f1-41af-91ab-2d7cd011db47") - .withApplicationId("f66fce08-c0c6-47a1-beeb-0ede5ea94f90") - .withObjectId("141360b8-5686-4240-a027-5e24e6affeba") - .withAudience("https://microsoft.onmicrosoft.com/cf19e349-644c-4c6a-bcae-9c8f35357874") - .withAadAuthority("https://login.microsoftonline.com")) - .withResourceAccessIdentityInput( - new IdentityProviderInput().withTenantId("72f988bf-86f1-41af-91ab-2d7cd011db47") - .withApplicationId("f66fce08-c0c6-47a1-beeb-0ede5ea94f90") - .withObjectId("141360b8-5686-4240-a027-5e24e6affeba") - .withAudience("https://microsoft.onmicrosoft.com/cf19e349-644c-4c6a-bcae-9c8f35357874") - .withAadAuthority("https://login.microsoftonline.com"))) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersDeleteSampl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersDeleteSampl.java deleted file mode 100644 index c5038aa7e9e4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersDeleteSampl.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationRecoveryServicesProviders Delete. - */ -public final class ReplicationRecoveryServicesProvidersDeleteSampl { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryServicesProviders_Delete.json - */ - /** - * Sample code: 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). - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - deletesProviderFromFabricNoteDeletingProviderForAnyFabricOtherThanSingleHostIsUnsupportedToMaintainBackwardCompatibilityForReleasedClientsTheObjectDeleteRspInputIsUsedIfTheObjectIsEmptyWeAssumeThatItIsOldClientAndContinueTheOldBehavior( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryServicesProviders() - .delete("vault1", "resourceGroupPS1", "cloud1", "241641e6-ee7b-4ee4-8141-821fadda43fa", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersGetSamples.java deleted file mode 100644 index 12b2ce55fe7d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationRecoveryServicesProviders Get. - */ -public final class ReplicationRecoveryServicesProvidersGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryServicesProviders_Get.json - */ - /** - * Sample code: Gets the details of a recovery services provider. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheDetailsOfARecoveryServicesProvider( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryServicesProviders() - .getWithResponse("vault1", "resourceGroupPS1", "cloud1", "241641e6-ee7b-4ee4-8141-821fadda43fa", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersListByRepli.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersListByRepli.java deleted file mode 100644 index 7cad20638d08..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersListByRepli.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationRecoveryServicesProviders ListByReplicationFabrics. - */ -public final class ReplicationRecoveryServicesProvidersListByRepli { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryServicesProviders_ListByReplicationFabrics.json - */ - /** - * Sample code: Gets the list of registered recovery services providers for the fabric. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfRegisteredRecoveryServicesProvidersForTheFabric( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryServicesProviders() - .listByReplicationFabrics("vault1", "resourceGroupPS1", "cloud1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersListSamples.java deleted file mode 100644 index 810de282022f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersListSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationRecoveryServicesProviders List. - */ -public final class ReplicationRecoveryServicesProvidersListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryServicesProviders_List.json - */ - /** - * Sample code: Gets the list of registered recovery services providers in the vault. This is a view only api. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfRegisteredRecoveryServicesProvidersInTheVaultThisIsAViewOnlyApi( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryServicesProviders() - .list("vault1", "resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersPurgeSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersPurgeSamples.java deleted file mode 100644 index 48e9d2b0de89..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersPurgeSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationRecoveryServicesProviders Purge. - */ -public final class ReplicationRecoveryServicesProvidersPurgeSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryServicesProviders_Purge.json - */ - /** - * Sample code: Purges recovery service provider from fabric. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void purgesRecoveryServiceProviderFromFabric( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryServicesProviders() - .purge("vault1", "resourceGroupPS1", "cloud1", "241641e6-ee7b-4ee4-8141-821fadda43fa", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersRefreshProv.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersRefreshProv.java deleted file mode 100644 index 39291d87a2f1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryServicesProvidersRefreshProv.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationRecoveryServicesProviders RefreshProvider. - */ -public final class ReplicationRecoveryServicesProvidersRefreshProv { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationRecoveryServicesProviders_RefreshProvider.json - */ - /** - * Sample code: Refresh details from the recovery services provider. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void refreshDetailsFromTheRecoveryServicesProvider( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationRecoveryServicesProviders() - .refreshProvider("vault1", "resourceGroupPS1", "cloud1", "241641e6-ee7b-4ee4-8141-821fadda43fa", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultHealthGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultHealthGetSamples.java deleted file mode 100644 index d6a47c38a904..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultHealthGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationVaultHealth Get. - */ -public final class ReplicationVaultHealthGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationVaultHealth_Get.json - */ - /** - * Sample code: Gets the health summary for the vault. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheHealthSummaryForTheVault( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationVaultHealths() - .getWithResponse("vault1", "resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultHealthRefreshSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultHealthRefreshSamples.java deleted file mode 100644 index a243cd3bc165..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultHealthRefreshSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationVaultHealth Refresh. - */ -public final class ReplicationVaultHealthRefreshSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationVaultHealth_Refresh.json - */ - /** - * Sample code: Refreshes health summary of the vault. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void refreshesHealthSummaryOfTheVault( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationVaultHealths().refresh("vault1", "resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingCreateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingCreateSamples.java deleted file mode 100644 index e3b17b47efe5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingCreateSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingCreationInputProperties; - -/** - * Samples for ReplicationVaultSetting Create. - */ -public final class ReplicationVaultSettingCreateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationVaultSetting_Create.json - */ - /** - * Sample code: Updates vault setting. A vault setting object is a singleton per vault and it is always present by - * default. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void updatesVaultSettingAVaultSettingObjectIsASingletonPerVaultAndItIsAlwaysPresentByDefault( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationVaultSettings() - .define("default") - .withExistingVault("vault1", "resourceGroupPS1") - .withProperties(new VaultSettingCreationInputProperties().withMigrationSolutionId( - "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.Migrate/MigrateProjects/resourceGroupPS1-MigrateProject/Solutions/Servers-Migration-ServerMigration")) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingGetSamples.java deleted file mode 100644 index 36728bf81b34..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationVaultSetting Get. - */ -public final class ReplicationVaultSettingGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationVaultSetting_Get.json - */ - /** - * Sample code: Gets the vault setting. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - getsTheVaultSetting(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationVaultSettings() - .getWithResponse("vault1", "resourceGroupPS1", "default", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingListSamples.java deleted file mode 100644 index 4bc2d6e8b20f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationVaultSetting List. - */ -public final class ReplicationVaultSettingListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationVaultSetting_List.json - */ - /** - * Sample code: Gets the list of vault setting. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - getsTheListOfVaultSetting(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationVaultSettings().list("vault1", "resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersCreateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersCreateSamples.java deleted file mode 100644 index 96f14dabff45..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersCreateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddVCenterRequestProperties; - -/** - * Samples for ReplicationvCenters Create. - */ -public final class ReplicationvCentersCreateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationvCenters_Create.json - */ - /** - * Sample code: Add vCenter. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void addVCenter(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationvCenters() - .define("esx-78") - .withExistingReplicationFabric("MadhaviVault", "MadhaviVRG", "MadhaviFabric") - .withProperties(new AddVCenterRequestProperties().withFriendlyName("esx-78") - .withIpAddress("inmtest78") - .withProcessServerId("5A720CAB-39CB-F445-BD1662B0B33164B5") - .withPort("443") - .withRunAsAccountId("2")) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersDeleteSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersDeleteSamples.java deleted file mode 100644 index 281dba91cedd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersDeleteSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationvCenters Delete. - */ -public final class ReplicationvCentersDeleteSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationvCenters_Delete.json - */ - /** - * Sample code: Remove vCenter operation. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - removeVCenterOperation(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationvCenters() - .delete("MadhaviVault", "MadhaviVRG", "MadhaviFabric", "esx-78", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersGetSamples.java deleted file mode 100644 index bba423ebec26..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationvCenters Get. - */ -public final class ReplicationvCentersGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationvCenters_Get.json - */ - /** - * Sample code: Gets the details of a vCenter. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - getsTheDetailsOfAVCenter(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationvCenters() - .getWithResponse("MadhaviVault", "MadhaviVRG", "MadhaviFabric", "esx-78", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersListByReplicationFabricsSamp.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersListByReplicationFabricsSamp.java deleted file mode 100644 index ab717191beb2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersListByReplicationFabricsSamp.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationvCenters ListByReplicationFabrics. - */ -public final class ReplicationvCentersListByReplicationFabricsSamp { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationvCenters_ListByReplicationFabrics.json - */ - /** - * Sample code: Gets the list of vCenter registered under a fabric. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfVCenterRegisteredUnderAFabric( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationvCenters() - .listByReplicationFabrics("MadhaviVault", "MadhaviVRG", "MadhaviFabric", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersListSamples.java deleted file mode 100644 index fe3d6caa1afa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for ReplicationvCenters List. - */ -public final class ReplicationvCentersListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationvCenters_List.json - */ - /** - * Sample code: Gets the list of vCenter registered under the vault. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfVCenterRegisteredUnderTheVault( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.replicationvCenters().list("MadhaviVault", "MadhaviVRG", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersUpdateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersUpdateSamples.java deleted file mode 100644 index 9d3752bb392c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationvCentersUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateVCenterRequestProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VCenter; - -/** - * Samples for ReplicationvCenters Update. - */ -public final class ReplicationvCentersUpdateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationvCenters_Update.json - */ - /** - * Sample code: Update vCenter operation. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void - updateVCenterOperation(com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - VCenter resource = manager.replicationvCenters() - .getWithResponse("MadhaviVault", "MadhaviVRG", "MadhaviFabric", "esx-78", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withProperties(new UpdateVCenterRequestProperties().withIpAddress("10.150.109.25")).apply(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsCreateSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsCreateSamples.java deleted file mode 100644 index 2d18c4381d29..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsCreateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageMappingInputProperties; - -/** - * Samples for StorageClassificationMappings Create. - */ -public final class StorageClassificationMappingsCreateSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationStorageClassificationMappings_Create.json - */ - /** - * Sample code: Create storage classification mapping. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void createStorageClassificationMapping( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.storageClassificationMappings() - .define("testStorageMapping") - .withExistingReplicationStorageClassification("vault1", "resourceGroupPS1", - "2a48e3770ac08aa2be8bfbd94fcfb1cbf2dcc487b78fb9d3bd778304441b06a0", - "8891569e-aaef-4a46-a4a0-78c14f2d7b09") - .withProperties(new StorageMappingInputProperties().withTargetStorageClassificationId( - "/Subscriptions/9112a37f-0f3e-46ec-9c00-060c6edca071/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/2a48e3770ac08aa2be8bfbd94fcfb1cbf2dcc487b78fb9d3bd778304441b06a0/replicationStorageClassifications/8891569e-aaef-4a46-a4a0-78c14f2d7b09")) - .create(); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsDeleteSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsDeleteSamples.java deleted file mode 100644 index 809905d6604a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for StorageClassificationMappings Delete. - */ -public final class StorageClassificationMappingsDeleteSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationStorageClassificationMappings_Delete.json - */ - /** - * Sample code: Delete a storage classification mapping. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void deleteAStorageClassificationMapping( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.storageClassificationMappings() - .delete("vault1", "resourceGroupPS1", "2a48e3770ac08aa2be8bfbd94fcfb1cbf2dcc487b78fb9d3bd778304441b06a0", - "8891569e-aaef-4a46-a4a0-78c14f2d7b09", "testStorageMapping", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsGetSamples.java deleted file mode 100644 index 3304190d3e28..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for StorageClassificationMappings Get. - */ -public final class StorageClassificationMappingsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationStorageClassificationMappings_Get.json - */ - /** - * Sample code: Gets the details of a storage classification mapping. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheDetailsOfAStorageClassificationMapping( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.storageClassificationMappings() - .getWithResponse("vault1", "resourceGroupPS1", - "2a48e3770ac08aa2be8bfbd94fcfb1cbf2dcc487b78fb9d3bd778304441b06a0", - "8891569e-aaef-4a46-a4a0-78c14f2d7b09", "testStorageMapping", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsListByReplicationS.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsListByReplicationS.java deleted file mode 100644 index 56fce48280a4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsListByReplicationS.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for StorageClassificationMappings ListByReplicationStorageClassifications. - */ -public final class StorageClassificationMappingsListByReplicationS { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationStorageClassificationMappings_ListByReplicationStorageClassifications.json - */ - /** - * Sample code: Gets the list of storage classification mappings objects under a storage. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfStorageClassificationMappingsObjectsUnderAStorage( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.storageClassificationMappings() - .listByReplicationStorageClassifications("vault1", "resourceGroupPS1", - "2a48e3770ac08aa2be8bfbd94fcfb1cbf2dcc487b78fb9d3bd778304441b06a0", - "8891569e-aaef-4a46-a4a0-78c14f2d7b09", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsListSamples.java deleted file mode 100644 index 92e1c96ea72e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for StorageClassificationMappings List. - */ -public final class StorageClassificationMappingsListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationStorageClassificationMappings_List.json - */ - /** - * Sample code: Gets the list of storage classification mappings objects under a vault. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfStorageClassificationMappingsObjectsUnderAVault( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.storageClassificationMappings().list("vault1", "resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsGetSamples.java deleted file mode 100644 index 5a977df5257d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for StorageClassifications Get. - */ -public final class StorageClassificationsGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationStorageClassifications_Get.json - */ - /** - * Sample code: Gets the details of a storage classification. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheDetailsOfAStorageClassification( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.storageClassifications() - .getWithResponse("vault1", "resourceGroupPS1", - "2a48e3770ac08aa2be8bfbd94fcfb1cbf2dcc487b78fb9d3bd778304441b06a0", - "8891569e-aaef-4a46-a4a0-78c14f2d7b09", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsListByReplicationFabricsS.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsListByReplicationFabricsS.java deleted file mode 100644 index 8d3d40843cf3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsListByReplicationFabricsS.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for StorageClassifications ListByReplicationFabrics. - */ -public final class StorageClassificationsListByReplicationFabricsS { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationStorageClassifications_ListByReplicationFabrics.json - */ - /** - * Sample code: Gets the list of storage classification objects under a fabric. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfStorageClassificationObjectsUnderAFabric( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.storageClassifications() - .listByReplicationFabrics("vault1", "resourceGroupPS1", - "2a48e3770ac08aa2be8bfbd94fcfb1cbf2dcc487b78fb9d3bd778304441b06a0", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsListSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsListSamples.java deleted file mode 100644 index 0e328d97ab1f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for StorageClassifications List. - */ -public final class StorageClassificationsListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /ReplicationStorageClassifications_List.json - */ - /** - * Sample code: Gets the list of storage classification objects under a vault. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfStorageClassificationObjectsUnderAVault( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.storageClassifications().list("vault1", "resourceGroupPS1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOperatingSystemsOperationGetSamples.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOperatingSystemsOperationGetSamples.java deleted file mode 100644 index d1a4d48a91bc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOperatingSystemsOperationGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for SupportedOperatingSystemsOperation Get. - */ -public final class SupportedOperatingSystemsOperationGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /SupportedOperatingSystems_Get.json - */ - /** - * Sample code: Gets the data of supported operating systems by SRS. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheDataOfSupportedOperatingSystemsBySRS( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.supportedOperatingSystemsOperations() - .getWithResponse("vault1", "resourceGroupPS1", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizesListByReplicationProtectedIte.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizesListByReplicationProtectedIte.java deleted file mode 100644 index 347b74c3ce4b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/samples/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizesListByReplicationProtectedIte.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -/** - * Samples for TargetComputeSizes ListByReplicationProtectedItems. - */ -public final class TargetComputeSizesListByReplicationProtectedIte { - /* - * x-ms-original-file: - * specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-08-01/examples - * /TargetComputeSizes_ListByReplicationProtectedItems.json - */ - /** - * Sample code: Gets the list of target compute sizes for the replication protected item. - * - * @param manager Entry point to SiteRecoveryManager. - */ - public static void getsTheListOfTargetComputeSizesForTheReplicationProtectedItem( - com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) { - manager.targetComputeSizes() - .listByReplicationProtectedItems("avraiMgDiskVault", "avraiMgDiskVaultRG", "asr-a2a-default-centraluseuap", - "asr-a2a-default-centraluseuap-container", "468c912d-b1ab-4ea2-97eb-4b5095155db2", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AApplyRecoveryPointInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AApplyRecoveryPointInputTests.java deleted file mode 100644 index 926399baa282..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AApplyRecoveryPointInputTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AApplyRecoveryPointInput; - -public final class A2AApplyRecoveryPointInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AApplyRecoveryPointInput model - = BinaryData.fromString("{\"instanceType\":\"A2A\"}").toObject(A2AApplyRecoveryPointInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AApplyRecoveryPointInput model = new A2AApplyRecoveryPointInput(); - model = BinaryData.fromObject(model).toObject(A2AApplyRecoveryPointInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AContainerCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AContainerCreationInputTests.java deleted file mode 100644 index c91e648389f3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AContainerCreationInputTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AContainerCreationInput; - -public final class A2AContainerCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AContainerCreationInput model - = BinaryData.fromString("{\"instanceType\":\"A2A\"}").toObject(A2AContainerCreationInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AContainerCreationInput model = new A2AContainerCreationInput(); - model = BinaryData.fromObject(model).toObject(A2AContainerCreationInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AContainerMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AContainerMappingInputTests.java deleted file mode 100644 index 7734af9c5d86..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AContainerMappingInputTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AgentAutoUpdateStatus; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AutomationAccountAuthenticationType; -import org.junit.jupiter.api.Assertions; - -public final class A2AContainerMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AContainerMappingInput model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"agentAutoUpdateStatus\":\"Enabled\",\"automationAccountArmId\":\"goaqylkjztj\",\"automationAccountAuthenticationType\":\"SystemAssignedIdentity\"}") - .toObject(A2AContainerMappingInput.class); - Assertions.assertEquals(AgentAutoUpdateStatus.ENABLED, model.agentAutoUpdateStatus()); - Assertions.assertEquals("goaqylkjztj", model.automationAccountArmId()); - Assertions.assertEquals(AutomationAccountAuthenticationType.SYSTEM_ASSIGNED_IDENTITY, - model.automationAccountAuthenticationType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AContainerMappingInput model - = new A2AContainerMappingInput().withAgentAutoUpdateStatus(AgentAutoUpdateStatus.ENABLED) - .withAutomationAccountArmId("goaqylkjztj") - .withAutomationAccountAuthenticationType(AutomationAccountAuthenticationType.SYSTEM_ASSIGNED_IDENTITY); - model = BinaryData.fromObject(model).toObject(A2AContainerMappingInput.class); - Assertions.assertEquals(AgentAutoUpdateStatus.ENABLED, model.agentAutoUpdateStatus()); - Assertions.assertEquals("goaqylkjztj", model.automationAccountArmId()); - Assertions.assertEquals(AutomationAccountAuthenticationType.SYSTEM_ASSIGNED_IDENTITY, - model.automationAccountAuthenticationType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationApplyRecoveryPointInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationApplyRecoveryPointInputTests.java deleted file mode 100644 index 85b7b8eaf0d8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationApplyRecoveryPointInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ACrossClusterMigrationApplyRecoveryPointInput; - -public final class A2ACrossClusterMigrationApplyRecoveryPointInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2ACrossClusterMigrationApplyRecoveryPointInput model - = BinaryData.fromString("{\"instanceType\":\"A2ACrossClusterMigration\"}") - .toObject(A2ACrossClusterMigrationApplyRecoveryPointInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2ACrossClusterMigrationApplyRecoveryPointInput model = new A2ACrossClusterMigrationApplyRecoveryPointInput(); - model = BinaryData.fromObject(model).toObject(A2ACrossClusterMigrationApplyRecoveryPointInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationContainerCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationContainerCreationInputTests.java deleted file mode 100644 index 61eda4fc31b8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationContainerCreationInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ACrossClusterMigrationContainerCreationInput; - -public final class A2ACrossClusterMigrationContainerCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2ACrossClusterMigrationContainerCreationInput model - = BinaryData.fromString("{\"instanceType\":\"A2ACrossClusterMigration\"}") - .toObject(A2ACrossClusterMigrationContainerCreationInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2ACrossClusterMigrationContainerCreationInput model = new A2ACrossClusterMigrationContainerCreationInput(); - model = BinaryData.fromObject(model).toObject(A2ACrossClusterMigrationContainerCreationInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationEnableProtectionInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationEnableProtectionInputTests.java deleted file mode 100644 index ae6e2e9b4323..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationEnableProtectionInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ACrossClusterMigrationEnableProtectionInput; -import org.junit.jupiter.api.Assertions; - -public final class A2ACrossClusterMigrationEnableProtectionInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2ACrossClusterMigrationEnableProtectionInput model = BinaryData.fromString( - "{\"instanceType\":\"A2ACrossClusterMigration\",\"fabricObjectId\":\"lickduoi\",\"recoveryContainerId\":\"amt\"}") - .toObject(A2ACrossClusterMigrationEnableProtectionInput.class); - Assertions.assertEquals("lickduoi", model.fabricObjectId()); - Assertions.assertEquals("amt", model.recoveryContainerId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2ACrossClusterMigrationEnableProtectionInput model - = new A2ACrossClusterMigrationEnableProtectionInput().withFabricObjectId("lickduoi") - .withRecoveryContainerId("amt"); - model = BinaryData.fromObject(model).toObject(A2ACrossClusterMigrationEnableProtectionInput.class); - Assertions.assertEquals("lickduoi", model.fabricObjectId()); - Assertions.assertEquals("amt", model.recoveryContainerId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationPolicyCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationPolicyCreationInputTests.java deleted file mode 100644 index d7f5cb0a0dfa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationPolicyCreationInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ACrossClusterMigrationPolicyCreationInput; - -public final class A2ACrossClusterMigrationPolicyCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2ACrossClusterMigrationPolicyCreationInput model - = BinaryData.fromString("{\"instanceType\":\"A2ACrossClusterMigration\"}") - .toObject(A2ACrossClusterMigrationPolicyCreationInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2ACrossClusterMigrationPolicyCreationInput model = new A2ACrossClusterMigrationPolicyCreationInput(); - model = BinaryData.fromObject(model).toObject(A2ACrossClusterMigrationPolicyCreationInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationReplicationDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationReplicationDetailsTests.java deleted file mode 100644 index 1049ae70b9b7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ACrossClusterMigrationReplicationDetailsTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ACrossClusterMigrationReplicationDetails; -import org.junit.jupiter.api.Assertions; - -public final class A2ACrossClusterMigrationReplicationDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2ACrossClusterMigrationReplicationDetails model = BinaryData.fromString( - "{\"instanceType\":\"A2ACrossClusterMigration\",\"fabricObjectId\":\"sknxrwzawnvsbcf\",\"primaryFabricLocation\":\"agxnvhycvdimw\",\"osType\":\"regzgyufutrwpwer\",\"vmProtectionState\":\"kzkdhmeott\",\"vmProtectionStateDescription\":\"jyosxwwh\",\"lifecycleId\":\"jtfvpndpmiljpn\"}") - .toObject(A2ACrossClusterMigrationReplicationDetails.class); - Assertions.assertEquals("sknxrwzawnvsbcf", model.fabricObjectId()); - Assertions.assertEquals("agxnvhycvdimw", model.primaryFabricLocation()); - Assertions.assertEquals("regzgyufutrwpwer", model.osType()); - Assertions.assertEquals("kzkdhmeott", model.vmProtectionState()); - Assertions.assertEquals("jyosxwwh", model.vmProtectionStateDescription()); - Assertions.assertEquals("jtfvpndpmiljpn", model.lifecycleId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2ACrossClusterMigrationReplicationDetails model - = new A2ACrossClusterMigrationReplicationDetails().withFabricObjectId("sknxrwzawnvsbcf") - .withPrimaryFabricLocation("agxnvhycvdimw") - .withOsType("regzgyufutrwpwer") - .withVmProtectionState("kzkdhmeott") - .withVmProtectionStateDescription("jyosxwwh") - .withLifecycleId("jtfvpndpmiljpn"); - model = BinaryData.fromObject(model).toObject(A2ACrossClusterMigrationReplicationDetails.class); - Assertions.assertEquals("sknxrwzawnvsbcf", model.fabricObjectId()); - Assertions.assertEquals("agxnvhycvdimw", model.primaryFabricLocation()); - Assertions.assertEquals("regzgyufutrwpwer", model.osType()); - Assertions.assertEquals("kzkdhmeott", model.vmProtectionState()); - Assertions.assertEquals("jyosxwwh", model.vmProtectionStateDescription()); - Assertions.assertEquals("jtfvpndpmiljpn", model.lifecycleId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AEventDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AEventDetailsTests.java deleted file mode 100644 index 1f132d740cd0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AEventDetailsTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AEventDetails; -import org.junit.jupiter.api.Assertions; - -public final class A2AEventDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AEventDetails model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"protectedItemName\":\"skndnelqkaadlknw\",\"fabricObjectId\":\"anniyopetxivcnr\",\"fabricName\":\"xnucaephblkwqp\",\"fabricLocation\":\"vbqsdt\",\"remoteFabricName\":\"bctvivuzqym\",\"remoteFabricLocation\":\"owog\"}") - .toObject(A2AEventDetails.class); - Assertions.assertEquals("skndnelqkaadlknw", model.protectedItemName()); - Assertions.assertEquals("anniyopetxivcnr", model.fabricObjectId()); - Assertions.assertEquals("xnucaephblkwqp", model.fabricName()); - Assertions.assertEquals("vbqsdt", model.fabricLocation()); - Assertions.assertEquals("bctvivuzqym", model.remoteFabricName()); - Assertions.assertEquals("owog", model.remoteFabricLocation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AEventDetails model = new A2AEventDetails().withProtectedItemName("skndnelqkaadlknw") - .withFabricObjectId("anniyopetxivcnr") - .withFabricName("xnucaephblkwqp") - .withFabricLocation("vbqsdt") - .withRemoteFabricName("bctvivuzqym") - .withRemoteFabricLocation("owog"); - model = BinaryData.fromObject(model).toObject(A2AEventDetails.class); - Assertions.assertEquals("skndnelqkaadlknw", model.protectedItemName()); - Assertions.assertEquals("anniyopetxivcnr", model.fabricObjectId()); - Assertions.assertEquals("xnucaephblkwqp", model.fabricName()); - Assertions.assertEquals("vbqsdt", model.fabricLocation()); - Assertions.assertEquals("bctvivuzqym", model.remoteFabricName()); - Assertions.assertEquals("owog", model.remoteFabricLocation()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AExtendedLocationDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AExtendedLocationDetailsTests.java deleted file mode 100644 index a0b4161b9e06..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AExtendedLocationDetailsTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AExtendedLocationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExtendedLocation; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExtendedLocationType; -import org.junit.jupiter.api.Assertions; - -public final class A2AExtendedLocationDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AExtendedLocationDetails model = BinaryData.fromString( - "{\"primaryExtendedLocation\":{\"name\":\"it\",\"type\":\"EdgeZone\"},\"recoveryExtendedLocation\":{\"name\":\"zvbrzcdbanfzndsc\",\"type\":\"EdgeZone\"}}") - .toObject(A2AExtendedLocationDetails.class); - Assertions.assertEquals("it", model.primaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.primaryExtendedLocation().type()); - Assertions.assertEquals("zvbrzcdbanfzndsc", model.recoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.recoveryExtendedLocation().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AExtendedLocationDetails model = new A2AExtendedLocationDetails() - .withPrimaryExtendedLocation(new ExtendedLocation().withName("it").withType(ExtendedLocationType.EDGE_ZONE)) - .withRecoveryExtendedLocation( - new ExtendedLocation().withName("zvbrzcdbanfzndsc").withType(ExtendedLocationType.EDGE_ZONE)); - model = BinaryData.fromObject(model).toObject(A2AExtendedLocationDetails.class); - Assertions.assertEquals("it", model.primaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.primaryExtendedLocation().type()); - Assertions.assertEquals("zvbrzcdbanfzndsc", model.recoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.recoveryExtendedLocation().type()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AFabricSpecificLocationDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AFabricSpecificLocationDetailsTests.java deleted file mode 100644 index c9c70a75225a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AFabricSpecificLocationDetailsTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AFabricSpecificLocationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExtendedLocation; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExtendedLocationType; -import org.junit.jupiter.api.Assertions; - -public final class A2AFabricSpecificLocationDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AFabricSpecificLocationDetails model = BinaryData.fromString( - "{\"initialPrimaryZone\":\"eatkdbmwnrdj\",\"initialRecoveryZone\":\"bqbnaomhjrmkuh\",\"initialPrimaryExtendedLocation\":{\"name\":\"xljalfihc\",\"type\":\"EdgeZone\"},\"initialRecoveryExtendedLocation\":{\"name\":\"bc\",\"type\":\"EdgeZone\"},\"initialPrimaryFabricLocation\":\"de\",\"initialRecoveryFabricLocation\":\"qcwgaxfgvaknokz\",\"primaryZone\":\"jzrltixldzy\",\"recoveryZone\":\"ytpqsixymmpujiv\",\"primaryExtendedLocation\":{\"name\":\"lkjuvsmbmslzoyov\",\"type\":\"EdgeZone\"},\"recoveryExtendedLocation\":{\"name\":\"bpqvybefg\",\"type\":\"EdgeZone\"},\"primaryFabricLocation\":\"nokcv\",\"recoveryFabricLocation\":\"ubseskvcuartr\"}") - .toObject(A2AFabricSpecificLocationDetails.class); - Assertions.assertEquals("eatkdbmwnrdj", model.initialPrimaryZone()); - Assertions.assertEquals("bqbnaomhjrmkuh", model.initialRecoveryZone()); - Assertions.assertEquals("xljalfihc", model.initialPrimaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.initialPrimaryExtendedLocation().type()); - Assertions.assertEquals("bc", model.initialRecoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.initialRecoveryExtendedLocation().type()); - Assertions.assertEquals("de", model.initialPrimaryFabricLocation()); - Assertions.assertEquals("qcwgaxfgvaknokz", model.initialRecoveryFabricLocation()); - Assertions.assertEquals("jzrltixldzy", model.primaryZone()); - Assertions.assertEquals("ytpqsixymmpujiv", model.recoveryZone()); - Assertions.assertEquals("lkjuvsmbmslzoyov", model.primaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.primaryExtendedLocation().type()); - Assertions.assertEquals("bpqvybefg", model.recoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.recoveryExtendedLocation().type()); - Assertions.assertEquals("nokcv", model.primaryFabricLocation()); - Assertions.assertEquals("ubseskvcuartr", model.recoveryFabricLocation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AFabricSpecificLocationDetails model - = new A2AFabricSpecificLocationDetails().withInitialPrimaryZone("eatkdbmwnrdj") - .withInitialRecoveryZone("bqbnaomhjrmkuh") - .withInitialPrimaryExtendedLocation( - new ExtendedLocation().withName("xljalfihc").withType(ExtendedLocationType.EDGE_ZONE)) - .withInitialRecoveryExtendedLocation( - new ExtendedLocation().withName("bc").withType(ExtendedLocationType.EDGE_ZONE)) - .withInitialPrimaryFabricLocation("de") - .withInitialRecoveryFabricLocation("qcwgaxfgvaknokz") - .withPrimaryZone("jzrltixldzy") - .withRecoveryZone("ytpqsixymmpujiv") - .withPrimaryExtendedLocation( - new ExtendedLocation().withName("lkjuvsmbmslzoyov").withType(ExtendedLocationType.EDGE_ZONE)) - .withRecoveryExtendedLocation( - new ExtendedLocation().withName("bpqvybefg").withType(ExtendedLocationType.EDGE_ZONE)) - .withPrimaryFabricLocation("nokcv") - .withRecoveryFabricLocation("ubseskvcuartr"); - model = BinaryData.fromObject(model).toObject(A2AFabricSpecificLocationDetails.class); - Assertions.assertEquals("eatkdbmwnrdj", model.initialPrimaryZone()); - Assertions.assertEquals("bqbnaomhjrmkuh", model.initialRecoveryZone()); - Assertions.assertEquals("xljalfihc", model.initialPrimaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.initialPrimaryExtendedLocation().type()); - Assertions.assertEquals("bc", model.initialRecoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.initialRecoveryExtendedLocation().type()); - Assertions.assertEquals("de", model.initialPrimaryFabricLocation()); - Assertions.assertEquals("qcwgaxfgvaknokz", model.initialRecoveryFabricLocation()); - Assertions.assertEquals("jzrltixldzy", model.primaryZone()); - Assertions.assertEquals("ytpqsixymmpujiv", model.recoveryZone()); - Assertions.assertEquals("lkjuvsmbmslzoyov", model.primaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.primaryExtendedLocation().type()); - Assertions.assertEquals("bpqvybefg", model.recoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.recoveryExtendedLocation().type()); - Assertions.assertEquals("nokcv", model.primaryFabricLocation()); - Assertions.assertEquals("ubseskvcuartr", model.recoveryFabricLocation()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2APolicyCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2APolicyCreationInputTests.java deleted file mode 100644 index d54d7f254449..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2APolicyCreationInputTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2APolicyCreationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SetMultiVmSyncStatus; -import org.junit.jupiter.api.Assertions; - -public final class A2APolicyCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2APolicyCreationInput model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"recoveryPointHistory\":723936709,\"crashConsistentFrequencyInMinutes\":1450165650,\"appConsistentFrequencyInMinutes\":1593194036,\"multiVmSyncStatus\":\"Disable\"}") - .toObject(A2APolicyCreationInput.class); - Assertions.assertEquals(723936709, model.recoveryPointHistory()); - Assertions.assertEquals(1450165650, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(1593194036, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(SetMultiVmSyncStatus.DISABLE, model.multiVmSyncStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2APolicyCreationInput model = new A2APolicyCreationInput().withRecoveryPointHistory(723936709) - .withCrashConsistentFrequencyInMinutes(1450165650) - .withAppConsistentFrequencyInMinutes(1593194036) - .withMultiVmSyncStatus(SetMultiVmSyncStatus.DISABLE); - model = BinaryData.fromObject(model).toObject(A2APolicyCreationInput.class); - Assertions.assertEquals(723936709, model.recoveryPointHistory()); - Assertions.assertEquals(1450165650, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(1593194036, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(SetMultiVmSyncStatus.DISABLE, model.multiVmSyncStatus()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2APolicyDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2APolicyDetailsTests.java deleted file mode 100644 index 0eb209510a1b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2APolicyDetailsTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2APolicyDetails; -import org.junit.jupiter.api.Assertions; - -public final class A2APolicyDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2APolicyDetails model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"recoveryPointThresholdInMinutes\":1604436828,\"recoveryPointHistory\":1284284541,\"appConsistentFrequencyInMinutes\":409182858,\"multiVmSyncStatus\":\"qi\",\"crashConsistentFrequencyInMinutes\":1105579119}") - .toObject(A2APolicyDetails.class); - Assertions.assertEquals(1604436828, model.recoveryPointThresholdInMinutes()); - Assertions.assertEquals(1284284541, model.recoveryPointHistory()); - Assertions.assertEquals(409182858, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals("qi", model.multiVmSyncStatus()); - Assertions.assertEquals(1105579119, model.crashConsistentFrequencyInMinutes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2APolicyDetails model = new A2APolicyDetails().withRecoveryPointThresholdInMinutes(1604436828) - .withRecoveryPointHistory(1284284541) - .withAppConsistentFrequencyInMinutes(409182858) - .withMultiVmSyncStatus("qi") - .withCrashConsistentFrequencyInMinutes(1105579119); - model = BinaryData.fromObject(model).toObject(A2APolicyDetails.class); - Assertions.assertEquals(1604436828, model.recoveryPointThresholdInMinutes()); - Assertions.assertEquals(1284284541, model.recoveryPointHistory()); - Assertions.assertEquals(409182858, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals("qi", model.multiVmSyncStatus()); - Assertions.assertEquals(1105579119, model.crashConsistentFrequencyInMinutes()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AProtectionContainerMappingDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AProtectionContainerMappingDetailsTests.java deleted file mode 100644 index 25574192bd10..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AProtectionContainerMappingDetailsTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AProtectionContainerMappingDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AgentAutoUpdateStatus; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AutomationAccountAuthenticationType; -import org.junit.jupiter.api.Assertions; - -public final class A2AProtectionContainerMappingDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AProtectionContainerMappingDetails model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"agentAutoUpdateStatus\":\"Enabled\",\"automationAccountArmId\":\"xawoijpodtblxp\",\"automationAccountAuthenticationType\":\"SystemAssignedIdentity\",\"scheduleName\":\"djodqhy\",\"jobScheduleName\":\"ncn\"}") - .toObject(A2AProtectionContainerMappingDetails.class); - Assertions.assertEquals(AgentAutoUpdateStatus.ENABLED, model.agentAutoUpdateStatus()); - Assertions.assertEquals("xawoijpodtblxp", model.automationAccountArmId()); - Assertions.assertEquals(AutomationAccountAuthenticationType.SYSTEM_ASSIGNED_IDENTITY, - model.automationAccountAuthenticationType()); - Assertions.assertEquals("djodqhy", model.scheduleName()); - Assertions.assertEquals("ncn", model.jobScheduleName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AProtectionContainerMappingDetails model - = new A2AProtectionContainerMappingDetails().withAgentAutoUpdateStatus(AgentAutoUpdateStatus.ENABLED) - .withAutomationAccountArmId("xawoijpodtblxp") - .withAutomationAccountAuthenticationType(AutomationAccountAuthenticationType.SYSTEM_ASSIGNED_IDENTITY) - .withScheduleName("djodqhy") - .withJobScheduleName("ncn"); - model = BinaryData.fromObject(model).toObject(A2AProtectionContainerMappingDetails.class); - Assertions.assertEquals(AgentAutoUpdateStatus.ENABLED, model.agentAutoUpdateStatus()); - Assertions.assertEquals("xawoijpodtblxp", model.automationAccountArmId()); - Assertions.assertEquals(AutomationAccountAuthenticationType.SYSTEM_ASSIGNED_IDENTITY, - model.automationAccountAuthenticationType()); - Assertions.assertEquals("djodqhy", model.scheduleName()); - Assertions.assertEquals("ncn", model.jobScheduleName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AProtectionIntentDiskInputDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AProtectionIntentDiskInputDetailsTests.java deleted file mode 100644 index d31be3ce3c66..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AProtectionIntentDiskInputDetailsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AProtectionIntentDiskInputDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageAccountCustomDetails; -import org.junit.jupiter.api.Assertions; - -public final class A2AProtectionIntentDiskInputDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AProtectionIntentDiskInputDetails model = BinaryData.fromString( - "{\"diskUri\":\"atbwbqam\",\"recoveryAzureStorageAccountCustomInput\":{\"resourceType\":\"StorageAccountCustomDetails\"},\"primaryStagingStorageAccountCustomInput\":{\"resourceType\":\"StorageAccountCustomDetails\"}}") - .toObject(A2AProtectionIntentDiskInputDetails.class); - Assertions.assertEquals("atbwbqam", model.diskUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AProtectionIntentDiskInputDetails model = new A2AProtectionIntentDiskInputDetails().withDiskUri("atbwbqam") - .withRecoveryAzureStorageAccountCustomInput(new StorageAccountCustomDetails()) - .withPrimaryStagingStorageAccountCustomInput(new StorageAccountCustomDetails()); - model = BinaryData.fromObject(model).toObject(A2AProtectionIntentDiskInputDetails.class); - Assertions.assertEquals("atbwbqam", model.diskUri()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ARecoveryPointDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ARecoveryPointDetailsTests.java deleted file mode 100644 index 3d6cb494fb33..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ARecoveryPointDetailsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ARecoveryPointDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPointSyncType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class A2ARecoveryPointDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2ARecoveryPointDetails model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"recoveryPointSyncType\":\"PerVmRecoveryPoint\",\"disks\":[\"llizhce\",\"moqodka\",\"ppyi\"]}") - .toObject(A2ARecoveryPointDetails.class); - Assertions.assertEquals(RecoveryPointSyncType.PER_VM_RECOVERY_POINT, model.recoveryPointSyncType()); - Assertions.assertEquals("llizhce", model.disks().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2ARecoveryPointDetails model - = new A2ARecoveryPointDetails().withRecoveryPointSyncType(RecoveryPointSyncType.PER_VM_RECOVERY_POINT) - .withDisks(Arrays.asList("llizhce", "moqodka", "ppyi")); - model = BinaryData.fromObject(model).toObject(A2ARecoveryPointDetails.class); - Assertions.assertEquals(RecoveryPointSyncType.PER_VM_RECOVERY_POINT, model.recoveryPointSyncType()); - Assertions.assertEquals("llizhce", model.disks().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ARemoveDisksInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ARemoveDisksInputTests.java deleted file mode 100644 index 3a1a126bdaf3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ARemoveDisksInputTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ARemoveDisksInput; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class A2ARemoveDisksInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2ARemoveDisksInput model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"vmDisksUris\":[\"qladywrxwhydtlu\",\"vadswzs\",\"uyem\",\"owuowh\"],\"vmManagedDisksIds\":[\"nwyrmouv\"]}") - .toObject(A2ARemoveDisksInput.class); - Assertions.assertEquals("qladywrxwhydtlu", model.vmDisksUris().get(0)); - Assertions.assertEquals("nwyrmouv", model.vmManagedDisksIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2ARemoveDisksInput model - = new A2ARemoveDisksInput().withVmDisksUris(Arrays.asList("qladywrxwhydtlu", "vadswzs", "uyem", "owuowh")) - .withVmManagedDisksIds(Arrays.asList("nwyrmouv")); - model = BinaryData.fromObject(model).toObject(A2ARemoveDisksInput.class); - Assertions.assertEquals("qladywrxwhydtlu", model.vmDisksUris().get(0)); - Assertions.assertEquals("nwyrmouv", model.vmManagedDisksIds().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AReprotectInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AReprotectInputTests.java deleted file mode 100644 index 32dfdebebe3f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AReprotectInputTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AReprotectInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AVmDiskInputDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class A2AReprotectInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AReprotectInput model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"recoveryContainerId\":\"uhvajmailfemjjza\",\"vmDisks\":[{\"diskUri\":\"jiqul\",\"recoveryAzureStorageAccountId\":\"qx\",\"primaryStagingAzureStorageAccountId\":\"dmvr\"},{\"diskUri\":\"cm\",\"recoveryAzureStorageAccountId\":\"erndbrnyeofltfnn\",\"primaryStagingAzureStorageAccountId\":\"rkadjfynnfmuiiir\"},{\"diskUri\":\"pfoh\",\"recoveryAzureStorageAccountId\":\"kfkxbbcbrwjiut\",\"primaryStagingAzureStorageAccountId\":\"njizb\"}],\"recoveryResourceGroupId\":\"woiymrvz\",\"recoveryCloudServiceId\":\"uyrsrziuctix\",\"recoveryAvailabilitySetId\":\"d\",\"policyId\":\"ifrevk\"}") - .toObject(A2AReprotectInput.class); - Assertions.assertEquals("uhvajmailfemjjza", model.recoveryContainerId()); - Assertions.assertEquals("jiqul", model.vmDisks().get(0).diskUri()); - Assertions.assertEquals("qx", model.vmDisks().get(0).recoveryAzureStorageAccountId()); - Assertions.assertEquals("dmvr", model.vmDisks().get(0).primaryStagingAzureStorageAccountId()); - Assertions.assertEquals("woiymrvz", model.recoveryResourceGroupId()); - Assertions.assertEquals("uyrsrziuctix", model.recoveryCloudServiceId()); - Assertions.assertEquals("d", model.recoveryAvailabilitySetId()); - Assertions.assertEquals("ifrevk", model.policyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AReprotectInput model = new A2AReprotectInput().withRecoveryContainerId("uhvajmailfemjjza") - .withVmDisks(Arrays.asList( - new A2AVmDiskInputDetails().withDiskUri("jiqul") - .withRecoveryAzureStorageAccountId("qx") - .withPrimaryStagingAzureStorageAccountId("dmvr"), - new A2AVmDiskInputDetails().withDiskUri("cm") - .withRecoveryAzureStorageAccountId("erndbrnyeofltfnn") - .withPrimaryStagingAzureStorageAccountId("rkadjfynnfmuiiir"), - new A2AVmDiskInputDetails().withDiskUri("pfoh") - .withRecoveryAzureStorageAccountId("kfkxbbcbrwjiut") - .withPrimaryStagingAzureStorageAccountId("njizb"))) - .withRecoveryResourceGroupId("woiymrvz") - .withRecoveryCloudServiceId("uyrsrziuctix") - .withRecoveryAvailabilitySetId("d") - .withPolicyId("ifrevk"); - model = BinaryData.fromObject(model).toObject(A2AReprotectInput.class); - Assertions.assertEquals("uhvajmailfemjjza", model.recoveryContainerId()); - Assertions.assertEquals("jiqul", model.vmDisks().get(0).diskUri()); - Assertions.assertEquals("qx", model.vmDisks().get(0).recoveryAzureStorageAccountId()); - Assertions.assertEquals("dmvr", model.vmDisks().get(0).primaryStagingAzureStorageAccountId()); - Assertions.assertEquals("woiymrvz", model.recoveryResourceGroupId()); - Assertions.assertEquals("uyrsrziuctix", model.recoveryCloudServiceId()); - Assertions.assertEquals("d", model.recoveryAvailabilitySetId()); - Assertions.assertEquals("ifrevk", model.policyId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ATestFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ATestFailoverInputTests.java deleted file mode 100644 index 4606082a4f19..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2ATestFailoverInputTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ATestFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class A2ATestFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2ATestFailoverInput model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"recoveryPointId\":\"omeikjcl\",\"cloudServiceCreationOption\":\"acnmwpfsuqtaaz\"}") - .toObject(A2ATestFailoverInput.class); - Assertions.assertEquals("omeikjcl", model.recoveryPointId()); - Assertions.assertEquals("acnmwpfsuqtaaz", model.cloudServiceCreationOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2ATestFailoverInput model = new A2ATestFailoverInput().withRecoveryPointId("omeikjcl") - .withCloudServiceCreationOption("acnmwpfsuqtaaz"); - model = BinaryData.fromObject(model).toObject(A2ATestFailoverInput.class); - Assertions.assertEquals("omeikjcl", model.recoveryPointId()); - Assertions.assertEquals("acnmwpfsuqtaaz", model.cloudServiceCreationOption()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AUnplannedFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AUnplannedFailoverInputTests.java deleted file mode 100644 index 2584ed95cea1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AUnplannedFailoverInputTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AUnplannedFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class A2AUnplannedFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AUnplannedFailoverInput model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"recoveryPointId\":\"bxyxoy\",\"cloudServiceCreationOption\":\"uqqiqezxlhd\"}") - .toObject(A2AUnplannedFailoverInput.class); - Assertions.assertEquals("bxyxoy", model.recoveryPointId()); - Assertions.assertEquals("uqqiqezxlhd", model.cloudServiceCreationOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AUnplannedFailoverInput model = new A2AUnplannedFailoverInput().withRecoveryPointId("bxyxoy") - .withCloudServiceCreationOption("uqqiqezxlhd"); - model = BinaryData.fromObject(model).toObject(A2AUnplannedFailoverInput.class); - Assertions.assertEquals("bxyxoy", model.recoveryPointId()); - Assertions.assertEquals("uqqiqezxlhd", model.cloudServiceCreationOption()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AUnprotectedDiskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AUnprotectedDiskDetailsTests.java deleted file mode 100644 index ab31a350a10b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AUnprotectedDiskDetailsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AUnprotectedDiskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AutoProtectionOfDataDisk; -import org.junit.jupiter.api.Assertions; - -public final class A2AUnprotectedDiskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AUnprotectedDiskDetails model - = BinaryData.fromString("{\"diskLunId\":86261319,\"diskAutoProtectionStatus\":\"Disabled\"}") - .toObject(A2AUnprotectedDiskDetails.class); - Assertions.assertEquals(86261319, model.diskLunId()); - Assertions.assertEquals(AutoProtectionOfDataDisk.DISABLED, model.diskAutoProtectionStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AUnprotectedDiskDetails model = new A2AUnprotectedDiskDetails().withDiskLunId(86261319) - .withDiskAutoProtectionStatus(AutoProtectionOfDataDisk.DISABLED); - model = BinaryData.fromObject(model).toObject(A2AUnprotectedDiskDetails.class); - Assertions.assertEquals(86261319, model.diskLunId()); - Assertions.assertEquals(AutoProtectionOfDataDisk.DISABLED, model.diskAutoProtectionStatus()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AUpdateContainerMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AUpdateContainerMappingInputTests.java deleted file mode 100644 index d71d963fce52..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AUpdateContainerMappingInputTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AUpdateContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AgentAutoUpdateStatus; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AutomationAccountAuthenticationType; -import org.junit.jupiter.api.Assertions; - -public final class A2AUpdateContainerMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AUpdateContainerMappingInput model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"agentAutoUpdateStatus\":\"Enabled\",\"automationAccountArmId\":\"cadwvpsozjii\",\"automationAccountAuthenticationType\":\"RunAsAccount\"}") - .toObject(A2AUpdateContainerMappingInput.class); - Assertions.assertEquals(AgentAutoUpdateStatus.ENABLED, model.agentAutoUpdateStatus()); - Assertions.assertEquals("cadwvpsozjii", model.automationAccountArmId()); - Assertions.assertEquals(AutomationAccountAuthenticationType.RUN_AS_ACCOUNT, - model.automationAccountAuthenticationType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AUpdateContainerMappingInput model - = new A2AUpdateContainerMappingInput().withAgentAutoUpdateStatus(AgentAutoUpdateStatus.ENABLED) - .withAutomationAccountArmId("cadwvpsozjii") - .withAutomationAccountAuthenticationType(AutomationAccountAuthenticationType.RUN_AS_ACCOUNT); - model = BinaryData.fromObject(model).toObject(A2AUpdateContainerMappingInput.class); - Assertions.assertEquals(AgentAutoUpdateStatus.ENABLED, model.agentAutoUpdateStatus()); - Assertions.assertEquals("cadwvpsozjii", model.automationAccountArmId()); - Assertions.assertEquals(AutomationAccountAuthenticationType.RUN_AS_ACCOUNT, - model.automationAccountAuthenticationType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AVmDiskInputDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AVmDiskInputDetailsTests.java deleted file mode 100644 index 56a47212ce2a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AVmDiskInputDetailsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AVmDiskInputDetails; -import org.junit.jupiter.api.Assertions; - -public final class A2AVmDiskInputDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AVmDiskInputDetails model = BinaryData.fromString( - "{\"diskUri\":\"qdx\",\"recoveryAzureStorageAccountId\":\"urnpnuhzafccnuh\",\"primaryStagingAzureStorageAccountId\":\"i\"}") - .toObject(A2AVmDiskInputDetails.class); - Assertions.assertEquals("qdx", model.diskUri()); - Assertions.assertEquals("urnpnuhzafccnuh", model.recoveryAzureStorageAccountId()); - Assertions.assertEquals("i", model.primaryStagingAzureStorageAccountId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AVmDiskInputDetails model = new A2AVmDiskInputDetails().withDiskUri("qdx") - .withRecoveryAzureStorageAccountId("urnpnuhzafccnuh") - .withPrimaryStagingAzureStorageAccountId("i"); - model = BinaryData.fromObject(model).toObject(A2AVmDiskInputDetails.class); - Assertions.assertEquals("qdx", model.diskUri()); - Assertions.assertEquals("urnpnuhzafccnuh", model.recoveryAzureStorageAccountId()); - Assertions.assertEquals("i", model.primaryStagingAzureStorageAccountId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AZoneDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AZoneDetailsTests.java deleted file mode 100644 index 423243099183..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/A2AZoneDetailsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AZoneDetails; -import org.junit.jupiter.api.Assertions; - -public final class A2AZoneDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - A2AZoneDetails model - = BinaryData.fromString("{\"source\":\"rl\",\"target\":\"zji\"}").toObject(A2AZoneDetails.class); - Assertions.assertEquals("rl", model.source()); - Assertions.assertEquals("zji", model.target()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - A2AZoneDetails model = new A2AZoneDetails().withSource("rl").withTarget("zji"); - model = BinaryData.fromObject(model).toObject(A2AZoneDetails.class); - Assertions.assertEquals("rl", model.source()); - Assertions.assertEquals("zji", model.target()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddDisksInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddDisksInputPropertiesTests.java deleted file mode 100644 index 4b62203adbd6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddDisksInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddDisksInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddDisksProviderSpecificInput; - -public final class AddDisksInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddDisksInputProperties model = BinaryData - .fromString("{\"providerSpecificDetails\":{\"instanceType\":\"AddDisksProviderSpecificInput\"}}") - .toObject(AddDisksInputProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddDisksInputProperties model - = new AddDisksInputProperties().withProviderSpecificDetails(new AddDisksProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(AddDisksInputProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddDisksInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddDisksInputTests.java deleted file mode 100644 index 33ba8700e5c2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddDisksInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddDisksInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddDisksProviderSpecificInput; - -public final class AddDisksInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddDisksInput model = BinaryData - .fromString( - "{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"AddDisksProviderSpecificInput\"}}}") - .toObject(AddDisksInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddDisksInput model = new AddDisksInput().withProperties( - new AddDisksInputProperties().withProviderSpecificDetails(new AddDisksProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(AddDisksInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddDisksProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddDisksProviderSpecificInputTests.java deleted file mode 100644 index 55f47fadcdbe..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddDisksProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddDisksProviderSpecificInput; - -public final class AddDisksProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddDisksProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"AddDisksProviderSpecificInput\"}") - .toObject(AddDisksProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddDisksProviderSpecificInput model = new AddDisksProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(AddDisksProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddRecoveryServicesProviderInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddRecoveryServicesProviderInputPropertiesTests.java deleted file mode 100644 index a37e951e3b65..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddRecoveryServicesProviderInputPropertiesTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddRecoveryServicesProviderInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IdentityProviderInput; -import org.junit.jupiter.api.Assertions; - -public final class AddRecoveryServicesProviderInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddRecoveryServicesProviderInputProperties model = BinaryData.fromString( - "{\"machineName\":\"ysownbtgkbug\",\"machineId\":\"qctojcmisof\",\"biosId\":\"ypefojyqdhcupl\",\"authenticationIdentityInput\":{\"tenantId\":\"plcwkhi\",\"applicationId\":\"ihlhzdsqtzb\",\"objectId\":\"rgnowcjhfgm\",\"audience\":\"ecactx\",\"aadAuthority\":\"wotey\"},\"resourceAccessIdentityInput\":{\"tenantId\":\"wcluqovekqvgq\",\"applicationId\":\"uwifzmpjwyiv\",\"objectId\":\"ikf\",\"audience\":\"cvhrfsp\",\"aadAuthority\":\"uagrttikteusqc\"},\"dataPlaneAuthenticationIdentityInput\":{\"tenantId\":\"vyklxuby\",\"applicationId\":\"affmmfblcqc\",\"objectId\":\"ubgq\",\"audience\":\"brta\",\"aadAuthority\":\"metttwgd\"}}") - .toObject(AddRecoveryServicesProviderInputProperties.class); - Assertions.assertEquals("ysownbtgkbug", model.machineName()); - Assertions.assertEquals("qctojcmisof", model.machineId()); - Assertions.assertEquals("ypefojyqdhcupl", model.biosId()); - Assertions.assertEquals("plcwkhi", model.authenticationIdentityInput().tenantId()); - Assertions.assertEquals("ihlhzdsqtzb", model.authenticationIdentityInput().applicationId()); - Assertions.assertEquals("rgnowcjhfgm", model.authenticationIdentityInput().objectId()); - Assertions.assertEquals("ecactx", model.authenticationIdentityInput().audience()); - Assertions.assertEquals("wotey", model.authenticationIdentityInput().aadAuthority()); - Assertions.assertEquals("wcluqovekqvgq", model.resourceAccessIdentityInput().tenantId()); - Assertions.assertEquals("uwifzmpjwyiv", model.resourceAccessIdentityInput().applicationId()); - Assertions.assertEquals("ikf", model.resourceAccessIdentityInput().objectId()); - Assertions.assertEquals("cvhrfsp", model.resourceAccessIdentityInput().audience()); - Assertions.assertEquals("uagrttikteusqc", model.resourceAccessIdentityInput().aadAuthority()); - Assertions.assertEquals("vyklxuby", model.dataPlaneAuthenticationIdentityInput().tenantId()); - Assertions.assertEquals("affmmfblcqc", model.dataPlaneAuthenticationIdentityInput().applicationId()); - Assertions.assertEquals("ubgq", model.dataPlaneAuthenticationIdentityInput().objectId()); - Assertions.assertEquals("brta", model.dataPlaneAuthenticationIdentityInput().audience()); - Assertions.assertEquals("metttwgd", model.dataPlaneAuthenticationIdentityInput().aadAuthority()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddRecoveryServicesProviderInputProperties model - = new AddRecoveryServicesProviderInputProperties().withMachineName("ysownbtgkbug") - .withMachineId("qctojcmisof") - .withBiosId("ypefojyqdhcupl") - .withAuthenticationIdentityInput(new IdentityProviderInput().withTenantId("plcwkhi") - .withApplicationId("ihlhzdsqtzb") - .withObjectId("rgnowcjhfgm") - .withAudience("ecactx") - .withAadAuthority("wotey")) - .withResourceAccessIdentityInput(new IdentityProviderInput().withTenantId("wcluqovekqvgq") - .withApplicationId("uwifzmpjwyiv") - .withObjectId("ikf") - .withAudience("cvhrfsp") - .withAadAuthority("uagrttikteusqc")) - .withDataPlaneAuthenticationIdentityInput(new IdentityProviderInput().withTenantId("vyklxuby") - .withApplicationId("affmmfblcqc") - .withObjectId("ubgq") - .withAudience("brta") - .withAadAuthority("metttwgd")); - model = BinaryData.fromObject(model).toObject(AddRecoveryServicesProviderInputProperties.class); - Assertions.assertEquals("ysownbtgkbug", model.machineName()); - Assertions.assertEquals("qctojcmisof", model.machineId()); - Assertions.assertEquals("ypefojyqdhcupl", model.biosId()); - Assertions.assertEquals("plcwkhi", model.authenticationIdentityInput().tenantId()); - Assertions.assertEquals("ihlhzdsqtzb", model.authenticationIdentityInput().applicationId()); - Assertions.assertEquals("rgnowcjhfgm", model.authenticationIdentityInput().objectId()); - Assertions.assertEquals("ecactx", model.authenticationIdentityInput().audience()); - Assertions.assertEquals("wotey", model.authenticationIdentityInput().aadAuthority()); - Assertions.assertEquals("wcluqovekqvgq", model.resourceAccessIdentityInput().tenantId()); - Assertions.assertEquals("uwifzmpjwyiv", model.resourceAccessIdentityInput().applicationId()); - Assertions.assertEquals("ikf", model.resourceAccessIdentityInput().objectId()); - Assertions.assertEquals("cvhrfsp", model.resourceAccessIdentityInput().audience()); - Assertions.assertEquals("uagrttikteusqc", model.resourceAccessIdentityInput().aadAuthority()); - Assertions.assertEquals("vyklxuby", model.dataPlaneAuthenticationIdentityInput().tenantId()); - Assertions.assertEquals("affmmfblcqc", model.dataPlaneAuthenticationIdentityInput().applicationId()); - Assertions.assertEquals("ubgq", model.dataPlaneAuthenticationIdentityInput().objectId()); - Assertions.assertEquals("brta", model.dataPlaneAuthenticationIdentityInput().audience()); - Assertions.assertEquals("metttwgd", model.dataPlaneAuthenticationIdentityInput().aadAuthority()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddRecoveryServicesProviderInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddRecoveryServicesProviderInputTests.java deleted file mode 100644 index e22951bc70da..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddRecoveryServicesProviderInputTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddRecoveryServicesProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddRecoveryServicesProviderInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IdentityProviderInput; -import org.junit.jupiter.api.Assertions; - -public final class AddRecoveryServicesProviderInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddRecoveryServicesProviderInput model = BinaryData.fromString( - "{\"properties\":{\"machineName\":\"xg\",\"machineId\":\"oyxcdyuib\",\"biosId\":\"fdn\",\"authenticationIdentityInput\":{\"tenantId\":\"zydvfvf\",\"applicationId\":\"jnaeois\",\"objectId\":\"vhmgorffukis\",\"audience\":\"vwmzhwplefaxvxil\",\"aadAuthority\":\"btgn\"},\"resourceAccessIdentityInput\":{\"tenantId\":\"nzeyqxtjj\",\"applicationId\":\"zqlqhyc\",\"objectId\":\"vodggxdbee\",\"audience\":\"mieknlraria\",\"aadAuthority\":\"wiuagydwqf\"},\"dataPlaneAuthenticationIdentityInput\":{\"tenantId\":\"lyr\",\"applicationId\":\"giagtcojo\",\"objectId\":\"qwogfnzjvus\",\"audience\":\"zldmozuxy\",\"aadAuthority\":\"fsbtkad\"}}}") - .toObject(AddRecoveryServicesProviderInput.class); - Assertions.assertEquals("xg", model.properties().machineName()); - Assertions.assertEquals("oyxcdyuib", model.properties().machineId()); - Assertions.assertEquals("fdn", model.properties().biosId()); - Assertions.assertEquals("zydvfvf", model.properties().authenticationIdentityInput().tenantId()); - Assertions.assertEquals("jnaeois", model.properties().authenticationIdentityInput().applicationId()); - Assertions.assertEquals("vhmgorffukis", model.properties().authenticationIdentityInput().objectId()); - Assertions.assertEquals("vwmzhwplefaxvxil", model.properties().authenticationIdentityInput().audience()); - Assertions.assertEquals("btgn", model.properties().authenticationIdentityInput().aadAuthority()); - Assertions.assertEquals("nzeyqxtjj", model.properties().resourceAccessIdentityInput().tenantId()); - Assertions.assertEquals("zqlqhyc", model.properties().resourceAccessIdentityInput().applicationId()); - Assertions.assertEquals("vodggxdbee", model.properties().resourceAccessIdentityInput().objectId()); - Assertions.assertEquals("mieknlraria", model.properties().resourceAccessIdentityInput().audience()); - Assertions.assertEquals("wiuagydwqf", model.properties().resourceAccessIdentityInput().aadAuthority()); - Assertions.assertEquals("lyr", model.properties().dataPlaneAuthenticationIdentityInput().tenantId()); - Assertions.assertEquals("giagtcojo", model.properties().dataPlaneAuthenticationIdentityInput().applicationId()); - Assertions.assertEquals("qwogfnzjvus", model.properties().dataPlaneAuthenticationIdentityInput().objectId()); - Assertions.assertEquals("zldmozuxy", model.properties().dataPlaneAuthenticationIdentityInput().audience()); - Assertions.assertEquals("fsbtkad", model.properties().dataPlaneAuthenticationIdentityInput().aadAuthority()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddRecoveryServicesProviderInput model = new AddRecoveryServicesProviderInput() - .withProperties(new AddRecoveryServicesProviderInputProperties().withMachineName("xg") - .withMachineId("oyxcdyuib") - .withBiosId("fdn") - .withAuthenticationIdentityInput(new IdentityProviderInput().withTenantId("zydvfvf") - .withApplicationId("jnaeois") - .withObjectId("vhmgorffukis") - .withAudience("vwmzhwplefaxvxil") - .withAadAuthority("btgn")) - .withResourceAccessIdentityInput(new IdentityProviderInput().withTenantId("nzeyqxtjj") - .withApplicationId("zqlqhyc") - .withObjectId("vodggxdbee") - .withAudience("mieknlraria") - .withAadAuthority("wiuagydwqf")) - .withDataPlaneAuthenticationIdentityInput(new IdentityProviderInput().withTenantId("lyr") - .withApplicationId("giagtcojo") - .withObjectId("qwogfnzjvus") - .withAudience("zldmozuxy") - .withAadAuthority("fsbtkad"))); - model = BinaryData.fromObject(model).toObject(AddRecoveryServicesProviderInput.class); - Assertions.assertEquals("xg", model.properties().machineName()); - Assertions.assertEquals("oyxcdyuib", model.properties().machineId()); - Assertions.assertEquals("fdn", model.properties().biosId()); - Assertions.assertEquals("zydvfvf", model.properties().authenticationIdentityInput().tenantId()); - Assertions.assertEquals("jnaeois", model.properties().authenticationIdentityInput().applicationId()); - Assertions.assertEquals("vhmgorffukis", model.properties().authenticationIdentityInput().objectId()); - Assertions.assertEquals("vwmzhwplefaxvxil", model.properties().authenticationIdentityInput().audience()); - Assertions.assertEquals("btgn", model.properties().authenticationIdentityInput().aadAuthority()); - Assertions.assertEquals("nzeyqxtjj", model.properties().resourceAccessIdentityInput().tenantId()); - Assertions.assertEquals("zqlqhyc", model.properties().resourceAccessIdentityInput().applicationId()); - Assertions.assertEquals("vodggxdbee", model.properties().resourceAccessIdentityInput().objectId()); - Assertions.assertEquals("mieknlraria", model.properties().resourceAccessIdentityInput().audience()); - Assertions.assertEquals("wiuagydwqf", model.properties().resourceAccessIdentityInput().aadAuthority()); - Assertions.assertEquals("lyr", model.properties().dataPlaneAuthenticationIdentityInput().tenantId()); - Assertions.assertEquals("giagtcojo", model.properties().dataPlaneAuthenticationIdentityInput().applicationId()); - Assertions.assertEquals("qwogfnzjvus", model.properties().dataPlaneAuthenticationIdentityInput().objectId()); - Assertions.assertEquals("zldmozuxy", model.properties().dataPlaneAuthenticationIdentityInput().audience()); - Assertions.assertEquals("fsbtkad", model.properties().dataPlaneAuthenticationIdentityInput().aadAuthority()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddVCenterRequestPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddVCenterRequestPropertiesTests.java deleted file mode 100644 index b291f5c98fec..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddVCenterRequestPropertiesTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddVCenterRequestProperties; -import org.junit.jupiter.api.Assertions; - -public final class AddVCenterRequestPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddVCenterRequestProperties model = BinaryData.fromString( - "{\"friendlyName\":\"dhzmmesckdlp\",\"ipAddress\":\"zrcxfailcfxwmdbo\",\"processServerId\":\"fgsftufqob\",\"port\":\"lnacgcc\",\"runAsAccountId\":\"nhxk\"}") - .toObject(AddVCenterRequestProperties.class); - Assertions.assertEquals("dhzmmesckdlp", model.friendlyName()); - Assertions.assertEquals("zrcxfailcfxwmdbo", model.ipAddress()); - Assertions.assertEquals("fgsftufqob", model.processServerId()); - Assertions.assertEquals("lnacgcc", model.port()); - Assertions.assertEquals("nhxk", model.runAsAccountId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddVCenterRequestProperties model = new AddVCenterRequestProperties().withFriendlyName("dhzmmesckdlp") - .withIpAddress("zrcxfailcfxwmdbo") - .withProcessServerId("fgsftufqob") - .withPort("lnacgcc") - .withRunAsAccountId("nhxk"); - model = BinaryData.fromObject(model).toObject(AddVCenterRequestProperties.class); - Assertions.assertEquals("dhzmmesckdlp", model.friendlyName()); - Assertions.assertEquals("zrcxfailcfxwmdbo", model.ipAddress()); - Assertions.assertEquals("fgsftufqob", model.processServerId()); - Assertions.assertEquals("lnacgcc", model.port()); - Assertions.assertEquals("nhxk", model.runAsAccountId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddVCenterRequestTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddVCenterRequestTests.java deleted file mode 100644 index 107fc5190a55..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AddVCenterRequestTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddVCenterRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddVCenterRequestProperties; -import org.junit.jupiter.api.Assertions; - -public final class AddVCenterRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddVCenterRequest model = BinaryData.fromString( - "{\"properties\":{\"friendlyName\":\"awddjibab\",\"ipAddress\":\"ititvtzeexavoxt\",\"processServerId\":\"lecdmdqbw\",\"port\":\"pqtgsfjac\",\"runAsAccountId\":\"lhhxudbxvodhtnsi\"}}") - .toObject(AddVCenterRequest.class); - Assertions.assertEquals("awddjibab", model.properties().friendlyName()); - Assertions.assertEquals("ititvtzeexavoxt", model.properties().ipAddress()); - Assertions.assertEquals("lecdmdqbw", model.properties().processServerId()); - Assertions.assertEquals("pqtgsfjac", model.properties().port()); - Assertions.assertEquals("lhhxudbxvodhtnsi", model.properties().runAsAccountId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddVCenterRequest model - = new AddVCenterRequest().withProperties(new AddVCenterRequestProperties().withFriendlyName("awddjibab") - .withIpAddress("ititvtzeexavoxt") - .withProcessServerId("lecdmdqbw") - .withPort("pqtgsfjac") - .withRunAsAccountId("lhhxudbxvodhtnsi")); - model = BinaryData.fromObject(model).toObject(AddVCenterRequest.class); - Assertions.assertEquals("awddjibab", model.properties().friendlyName()); - Assertions.assertEquals("ititvtzeexavoxt", model.properties().ipAddress()); - Assertions.assertEquals("lecdmdqbw", model.properties().processServerId()); - Assertions.assertEquals("pqtgsfjac", model.properties().port()); - Assertions.assertEquals("lhhxudbxvodhtnsi", model.properties().runAsAccountId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AgentDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AgentDetailsTests.java deleted file mode 100644 index 0d8e32eeaeb7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AgentDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AgentDetails; - -public final class AgentDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AgentDetails model = BinaryData.fromString( - "{\"agentId\":\"qfhefkwabsol\",\"machineId\":\"nqqlmgnl\",\"biosId\":\"sjxtel\",\"fqdn\":\"hvuqbo\",\"disks\":[{\"diskId\":\"zqocarku\",\"diskName\":\"bc\",\"isOSDisk\":\"dtsnxawqytllhdyz\",\"capacityInBytes\":4408018623458565457,\"lunId\":790899458}]}") - .toObject(AgentDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AgentDetails model = new AgentDetails(); - model = BinaryData.fromObject(model).toObject(AgentDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AgentDiskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AgentDiskDetailsTests.java deleted file mode 100644 index 21414ea486ce..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AgentDiskDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AgentDiskDetails; - -public final class AgentDiskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AgentDiskDetails model = BinaryData.fromString( - "{\"diskId\":\"nxakckyw\",\"diskName\":\"x\",\"isOSDisk\":\"abjkdtfohfao\",\"capacityInBytes\":5659515679437313606,\"lunId\":1355433605}") - .toObject(AgentDiskDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AgentDiskDetails model = new AgentDiskDetails(); - model = BinaryData.fromObject(model).toObject(AgentDiskDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AlertCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AlertCollectionTests.java deleted file mode 100644 index 5448693ad4da..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AlertCollectionTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.AlertInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AlertCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AlertProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AlertCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AlertCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"sendToOwners\":\"n\",\"customEmailAddresses\":[\"ybrk\"],\"locale\":\"dumjgrtfwvuk\"},\"location\":\"audccsnhs\",\"id\":\"cnyejhkryhtnapcz\",\"name\":\"lokjyemkk\",\"type\":\"ni\"}],\"nextLink\":\"oxzjnchgejspod\"}") - .toObject(AlertCollection.class); - Assertions.assertEquals("n", model.value().get(0).properties().sendToOwners()); - Assertions.assertEquals("ybrk", model.value().get(0).properties().customEmailAddresses().get(0)); - Assertions.assertEquals("dumjgrtfwvuk", model.value().get(0).properties().locale()); - Assertions.assertEquals("audccsnhs", model.value().get(0).location()); - Assertions.assertEquals("oxzjnchgejspod", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AlertCollection model = new AlertCollection() - .withValue(Arrays.asList(new AlertInner().withProperties(new AlertProperties().withSendToOwners("n") - .withCustomEmailAddresses(Arrays.asList("ybrk")) - .withLocale("dumjgrtfwvuk")).withLocation("audccsnhs"))) - .withNextLink("oxzjnchgejspod"); - model = BinaryData.fromObject(model).toObject(AlertCollection.class); - Assertions.assertEquals("n", model.value().get(0).properties().sendToOwners()); - Assertions.assertEquals("ybrk", model.value().get(0).properties().customEmailAddresses().get(0)); - Assertions.assertEquals("dumjgrtfwvuk", model.value().get(0).properties().locale()); - Assertions.assertEquals("audccsnhs", model.value().get(0).location()); - Assertions.assertEquals("oxzjnchgejspod", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AlertInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AlertInnerTests.java deleted file mode 100644 index 1f1d0ac05ae0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AlertInnerTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.AlertInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AlertProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AlertInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AlertInner model = BinaryData.fromString( - "{\"properties\":{\"sendToOwners\":\"lzydehojwyahux\",\"customEmailAddresses\":[\"mqnjaqw\",\"xj\"],\"locale\":\"r\"},\"location\":\"vcputegj\",\"id\":\"wmfdatscmdvpjhul\",\"name\":\"uuvmkjozkrwfnd\",\"type\":\"odjpslwejd\"}") - .toObject(AlertInner.class); - Assertions.assertEquals("lzydehojwyahux", model.properties().sendToOwners()); - Assertions.assertEquals("mqnjaqw", model.properties().customEmailAddresses().get(0)); - Assertions.assertEquals("r", model.properties().locale()); - Assertions.assertEquals("vcputegj", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AlertInner model = new AlertInner().withProperties(new AlertProperties().withSendToOwners("lzydehojwyahux") - .withCustomEmailAddresses(Arrays.asList("mqnjaqw", "xj")) - .withLocale("r")).withLocation("vcputegj"); - model = BinaryData.fromObject(model).toObject(AlertInner.class); - Assertions.assertEquals("lzydehojwyahux", model.properties().sendToOwners()); - Assertions.assertEquals("mqnjaqw", model.properties().customEmailAddresses().get(0)); - Assertions.assertEquals("r", model.properties().locale()); - Assertions.assertEquals("vcputegj", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AlertPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AlertPropertiesTests.java deleted file mode 100644 index e784a8b32c8c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AlertPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AlertProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AlertPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AlertProperties model = BinaryData.fromString( - "{\"sendToOwners\":\"wryoqpsoacc\",\"customEmailAddresses\":[\"akl\",\"lahbcryff\",\"fdosyg\"],\"locale\":\"paojakhmsbzjh\"}") - .toObject(AlertProperties.class); - Assertions.assertEquals("wryoqpsoacc", model.sendToOwners()); - Assertions.assertEquals("akl", model.customEmailAddresses().get(0)); - Assertions.assertEquals("paojakhmsbzjh", model.locale()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AlertProperties model = new AlertProperties().withSendToOwners("wryoqpsoacc") - .withCustomEmailAddresses(Arrays.asList("akl", "lahbcryff", "fdosyg")) - .withLocale("paojakhmsbzjh"); - model = BinaryData.fromObject(model).toObject(AlertProperties.class); - Assertions.assertEquals("wryoqpsoacc", model.sendToOwners()); - Assertions.assertEquals("akl", model.customEmailAddresses().get(0)); - Assertions.assertEquals("paojakhmsbzjh", model.locale()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplianceCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplianceCollectionTests.java deleted file mode 100644 index 5e10f4f2f91b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplianceCollectionTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationApplianceInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplianceCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplianceSpecificDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationApplianceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ApplianceCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplianceCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"ApplianceSpecificDetails\"}}},{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"ApplianceSpecificDetails\"}}},{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"ApplianceSpecificDetails\"}}}],\"nextLink\":\"nuvamiheogna\"}") - .toObject(ApplianceCollection.class); - Assertions.assertEquals("nuvamiheogna", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplianceCollection model = new ApplianceCollection() - .withValue(Arrays.asList( - new ReplicationApplianceInner().withProperties( - new ReplicationApplianceProperties().withProviderSpecificDetails(new ApplianceSpecificDetails())), - new ReplicationApplianceInner().withProperties( - new ReplicationApplianceProperties().withProviderSpecificDetails(new ApplianceSpecificDetails())), - new ReplicationApplianceInner().withProperties( - new ReplicationApplianceProperties().withProviderSpecificDetails(new ApplianceSpecificDetails())))) - .withNextLink("nuvamiheogna"); - model = BinaryData.fromObject(model).toObject(ApplianceCollection.class); - Assertions.assertEquals("nuvamiheogna", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplianceMonitoringDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplianceMonitoringDetailsTests.java deleted file mode 100644 index 83f4e234b171..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplianceMonitoringDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplianceMonitoringDetails; - -public final class ApplianceMonitoringDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplianceMonitoringDetails model = BinaryData.fromString( - "{\"cpuDetails\":{\"capacity\":8662079962112784708,\"processUtilization\":0.6405594211104648,\"totalUtilization\":82.0905475524268,\"status\":\"kcrr\"},\"ramDetails\":{\"capacity\":8013743376353139388,\"processUtilization\":1.694855656985783,\"totalUtilization\":1.5593173023171092,\"status\":\"ddacbcbgydlqidy\"},\"datastoreSnapshot\":[{\"totalSnapshotsSupported\":7488275222478686566,\"totalSnapshotsCreated\":2902686094359114858,\"dataStoreName\":\"kfbn\"},{\"totalSnapshotsSupported\":7259499785959731497,\"totalSnapshotsCreated\":4333536385090972582,\"dataStoreName\":\"bnfnqtxjtoma\"},{\"totalSnapshotsSupported\":45293283846031932,\"totalSnapshotsCreated\":4569715227142190855,\"dataStoreName\":\"epl\"}],\"disksReplicationDetails\":{\"capacity\":8132115358222180607,\"processUtilization\":1.9623944997706366,\"totalUtilization\":8.026231357545443,\"status\":\"exa\"},\"esxiNfcBuffer\":{\"capacity\":4341656564886470437,\"processUtilization\":40.02295487844362,\"totalUtilization\":89.70679469125682,\"status\":\"ycs\"},\"networkBandwidth\":{\"capacity\":5138554080249609396,\"processUtilization\":20.180830067778864,\"totalUtilization\":22.17605778669388,\"status\":\"ehzptdmk\"}}") - .toObject(ApplianceMonitoringDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplianceMonitoringDetails model = new ApplianceMonitoringDetails(); - model = BinaryData.fromObject(model).toObject(ApplianceMonitoringDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplianceResourceDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplianceResourceDetailsTests.java deleted file mode 100644 index 32982064b788..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplianceResourceDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplianceResourceDetails; - -public final class ApplianceResourceDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplianceResourceDetails model = BinaryData.fromString( - "{\"capacity\":7882439676090099182,\"processUtilization\":40.0101712180558,\"totalUtilization\":83.56402796641234,\"status\":\"efgybpmfbfununmp\"}") - .toObject(ApplianceResourceDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplianceResourceDetails model = new ApplianceResourceDetails(); - model = BinaryData.fromObject(model).toObject(ApplianceResourceDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplianceSpecificDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplianceSpecificDetailsTests.java deleted file mode 100644 index 1e10f11c4c1b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplianceSpecificDetailsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplianceSpecificDetails; - -public final class ApplianceSpecificDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplianceSpecificDetails model = BinaryData.fromString("{\"instanceType\":\"ApplianceSpecificDetails\"}") - .toObject(ApplianceSpecificDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplianceSpecificDetails model = new ApplianceSpecificDetails(); - model = BinaryData.fromObject(model).toObject(ApplianceSpecificDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplyRecoveryPointInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplyRecoveryPointInputPropertiesTests.java deleted file mode 100644 index eb782d83ede8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplyRecoveryPointInputPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplyRecoveryPointInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplyRecoveryPointProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class ApplyRecoveryPointInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplyRecoveryPointInputProperties model = BinaryData.fromString( - "{\"recoveryPointId\":\"rddh\",\"providerSpecificDetails\":{\"instanceType\":\"ApplyRecoveryPointProviderSpecificInput\"}}") - .toObject(ApplyRecoveryPointInputProperties.class); - Assertions.assertEquals("rddh", model.recoveryPointId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplyRecoveryPointInputProperties model = new ApplyRecoveryPointInputProperties().withRecoveryPointId("rddh") - .withProviderSpecificDetails(new ApplyRecoveryPointProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(ApplyRecoveryPointInputProperties.class); - Assertions.assertEquals("rddh", model.recoveryPointId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplyRecoveryPointInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplyRecoveryPointInputTests.java deleted file mode 100644 index f66ecd4fd071..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplyRecoveryPointInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplyRecoveryPointInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplyRecoveryPointInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplyRecoveryPointProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class ApplyRecoveryPointInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplyRecoveryPointInput model = BinaryData.fromString( - "{\"properties\":{\"recoveryPointId\":\"nrojlpijnkr\",\"providerSpecificDetails\":{\"instanceType\":\"ApplyRecoveryPointProviderSpecificInput\"}}}") - .toObject(ApplyRecoveryPointInput.class); - Assertions.assertEquals("nrojlpijnkr", model.properties().recoveryPointId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplyRecoveryPointInput model = new ApplyRecoveryPointInput() - .withProperties(new ApplyRecoveryPointInputProperties().withRecoveryPointId("nrojlpijnkr") - .withProviderSpecificDetails(new ApplyRecoveryPointProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(ApplyRecoveryPointInput.class); - Assertions.assertEquals("nrojlpijnkr", model.properties().recoveryPointId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplyRecoveryPointProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplyRecoveryPointProviderSpecificInputTests.java deleted file mode 100644 index 17282438da1f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ApplyRecoveryPointProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplyRecoveryPointProviderSpecificInput; - -public final class ApplyRecoveryPointProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplyRecoveryPointProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"ApplyRecoveryPointProviderSpecificInput\"}") - .toObject(ApplyRecoveryPointProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplyRecoveryPointProviderSpecificInput model = new ApplyRecoveryPointProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(ApplyRecoveryPointProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AsrJobDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AsrJobDetailsTests.java deleted file mode 100644 index 61c83d52a760..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AsrJobDetailsTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AsrJobDetails; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AsrJobDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AsrJobDetails model = BinaryData.fromString( - "{\"instanceType\":\"AsrJobDetails\",\"affectedObjectDetails\":{\"mhmjpjs\":\"wnphbkgfyrto\",\"mseharx\":\"dfpdqwtygevg\",\"n\":\"fv\",\"mbpjptnvwjh\":\"x\"}}") - .toObject(AsrJobDetails.class); - Assertions.assertEquals("wnphbkgfyrto", model.affectedObjectDetails().get("mhmjpjs")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AsrJobDetails model = new AsrJobDetails().withAffectedObjectDetails( - mapOf("mhmjpjs", "wnphbkgfyrto", "mseharx", "dfpdqwtygevg", "n", "fv", "mbpjptnvwjh", "x")); - model = BinaryData.fromObject(model).toObject(AsrJobDetails.class); - Assertions.assertEquals("wnphbkgfyrto", model.affectedObjectDetails().get("mhmjpjs")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AutomationRunbookTaskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AutomationRunbookTaskDetailsTests.java deleted file mode 100644 index fc63cd81f8d2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AutomationRunbookTaskDetailsTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AutomationRunbookTaskDetails; -import org.junit.jupiter.api.Assertions; - -public final class AutomationRunbookTaskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutomationRunbookTaskDetails model = BinaryData.fromString( - "{\"instanceType\":\"AutomationRunbookTaskDetails\",\"name\":\"idqpxlbtpakftn\",\"cloudServiceName\":\"twmykyut\",\"subscriptionId\":\"mdwmf\",\"accountName\":\"pycvjqdvdwkqpldr\",\"runbookId\":\"fgnaavuagnteta\",\"runbookName\":\"tnpdctuhspfefy\",\"jobId\":\"duyeuyl\",\"jobOutput\":\"hmtybkcgsuthhll\",\"isPrimarySideScript\":false}") - .toObject(AutomationRunbookTaskDetails.class); - Assertions.assertEquals("idqpxlbtpakftn", model.name()); - Assertions.assertEquals("twmykyut", model.cloudServiceName()); - Assertions.assertEquals("mdwmf", model.subscriptionId()); - Assertions.assertEquals("pycvjqdvdwkqpldr", model.accountName()); - Assertions.assertEquals("fgnaavuagnteta", model.runbookId()); - Assertions.assertEquals("tnpdctuhspfefy", model.runbookName()); - Assertions.assertEquals("duyeuyl", model.jobId()); - Assertions.assertEquals("hmtybkcgsuthhll", model.jobOutput()); - Assertions.assertEquals(false, model.isPrimarySideScript()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutomationRunbookTaskDetails model = new AutomationRunbookTaskDetails().withName("idqpxlbtpakftn") - .withCloudServiceName("twmykyut") - .withSubscriptionId("mdwmf") - .withAccountName("pycvjqdvdwkqpldr") - .withRunbookId("fgnaavuagnteta") - .withRunbookName("tnpdctuhspfefy") - .withJobId("duyeuyl") - .withJobOutput("hmtybkcgsuthhll") - .withIsPrimarySideScript(false); - model = BinaryData.fromObject(model).toObject(AutomationRunbookTaskDetails.class); - Assertions.assertEquals("idqpxlbtpakftn", model.name()); - Assertions.assertEquals("twmykyut", model.cloudServiceName()); - Assertions.assertEquals("mdwmf", model.subscriptionId()); - Assertions.assertEquals("pycvjqdvdwkqpldr", model.accountName()); - Assertions.assertEquals("fgnaavuagnteta", model.runbookId()); - Assertions.assertEquals("tnpdctuhspfefy", model.runbookName()); - Assertions.assertEquals("duyeuyl", model.jobId()); - Assertions.assertEquals("hmtybkcgsuthhll", model.jobOutput()); - Assertions.assertEquals(false, model.isPrimarySideScript()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureFabricCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureFabricCreationInputTests.java deleted file mode 100644 index f2a16a3da10e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureFabricCreationInputTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AzureFabricCreationInput; -import org.junit.jupiter.api.Assertions; - -public final class AzureFabricCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureFabricCreationInput model - = BinaryData.fromString("{\"instanceType\":\"Azure\",\"location\":\"nefxexlfciatx\"}") - .toObject(AzureFabricCreationInput.class); - Assertions.assertEquals("nefxexlfciatx", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureFabricCreationInput model = new AzureFabricCreationInput().withLocation("nefxexlfciatx"); - model = BinaryData.fromObject(model).toObject(AzureFabricCreationInput.class); - Assertions.assertEquals("nefxexlfciatx", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureFabricSpecificDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureFabricSpecificDetailsTests.java deleted file mode 100644 index 4017d18bbbdf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureFabricSpecificDetailsTests.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AExtendedLocationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AFabricSpecificLocationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2AZoneDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AzureFabricSpecificDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExtendedLocation; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExtendedLocationType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureFabricSpecificDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureFabricSpecificDetails model = BinaryData.fromString( - "{\"instanceType\":\"Azure\",\"location\":\"rrlkmdskjhhx\",\"containerIds\":[\"jfoxcxscvslxl\",\"uavkrmukm\"],\"zones\":[{\"source\":\"xett\",\"target\":\"lojfkqidnqto\"},{\"source\":\"jhqxc\",\"target\":\"htkbtnq\"},{\"source\":\"ngldmbiipsn\",\"target\":\"wl\"}],\"extendedLocations\":[{\"primaryExtendedLocation\":{\"name\":\"xhhllxricct\",\"type\":\"EdgeZone\"},\"recoveryExtendedLocation\":{\"name\":\"uqqoaj\",\"type\":\"EdgeZone\"}},{\"primaryExtendedLocation\":{\"name\":\"y\",\"type\":\"EdgeZone\"},\"recoveryExtendedLocation\":{\"name\":\"srwvaexhdctrce\",\"type\":\"EdgeZone\"}},{\"primaryExtendedLocation\":{\"name\":\"brupobehdmljza\",\"type\":\"EdgeZone\"},\"recoveryExtendedLocation\":{\"name\":\"me\",\"type\":\"EdgeZone\"}}],\"locationDetails\":[{\"initialPrimaryZone\":\"bn\",\"initialRecoveryZone\":\"phepifexleqirc\",\"initialPrimaryExtendedLocation\":{\"name\":\"cly\",\"type\":\"EdgeZone\"},\"initialRecoveryExtendedLocation\":{\"name\":\"x\",\"type\":\"EdgeZone\"},\"initialPrimaryFabricLocation\":\"jlvczu\",\"initialRecoveryFabricLocation\":\"ac\",\"primaryZone\":\"nettepdjxqeskoy\",\"recoveryZone\":\"iylpck\",\"primaryExtendedLocation\":{\"name\":\"wsedvesk\",\"type\":\"EdgeZone\"},\"recoveryExtendedLocation\":{\"name\":\"gqphrgfnzhctmjts\",\"type\":\"EdgeZone\"},\"primaryFabricLocation\":\"bcbcpz\",\"recoveryFabricLocation\":\"pzeqacdldtz\"},{\"initialPrimaryZone\":\"ypefcpczshnuqnda\",\"initialRecoveryZone\":\"upfkhuytuszxhmtv\",\"initialPrimaryExtendedLocation\":{\"name\":\"egw\",\"type\":\"EdgeZone\"},\"initialRecoveryExtendedLocation\":{\"name\":\"kvzwydw\",\"type\":\"EdgeZone\"},\"initialPrimaryFabricLocation\":\"aokgkskjivbsshaj\",\"initialRecoveryFabricLocation\":\"u\",\"primaryZone\":\"eexpgeumi\",\"recoveryZone\":\"wuit\",\"primaryExtendedLocation\":{\"name\":\"exyionofninbd\",\"type\":\"EdgeZone\"},\"recoveryExtendedLocation\":{\"name\":\"xcwqqrsmpc\",\"type\":\"EdgeZone\"},\"primaryFabricLocation\":\"rtugavbzbcyks\",\"recoveryFabricLocation\":\"mf\"},{\"initialPrimaryZone\":\"dr\",\"initialRecoveryZone\":\"fcmkr\",\"initialPrimaryExtendedLocation\":{\"name\":\"sjcwjjxsgmbawvif\",\"type\":\"EdgeZone\"},\"initialRecoveryExtendedLocation\":{\"name\":\"eci\",\"type\":\"EdgeZone\"},\"initialPrimaryFabricLocation\":\"cjxwkloozrvtxvcm\",\"initialRecoveryFabricLocation\":\"unlcpxxv\",\"primaryZone\":\"yeyng\",\"recoveryZone\":\"vrquv\",\"primaryExtendedLocation\":{\"name\":\"gglpmcrdcuelj\",\"type\":\"EdgeZone\"},\"recoveryExtendedLocation\":{\"name\":\"hxmfqryarvsxzqb\",\"type\":\"EdgeZone\"},\"primaryFabricLocation\":\"jkayspthzo\",\"recoveryFabricLocation\":\"btl\"},{\"initialPrimaryZone\":\"tgblioskkfmk\",\"initialRecoveryZone\":\"djxyxgbkkqvjcteo\",\"initialPrimaryExtendedLocation\":{\"name\":\"l\",\"type\":\"EdgeZone\"},\"initialRecoveryExtendedLocation\":{\"name\":\"skkzpxvjnzdpvo\",\"type\":\"EdgeZone\"},\"initialPrimaryFabricLocation\":\"hpcnabxzfsn\",\"initialRecoveryFabricLocation\":\"ytexvzilmhivzk\",\"primaryZone\":\"wncknr\",\"recoveryZone\":\"ajlskzptj\",\"primaryExtendedLocation\":{\"name\":\"lwe\",\"type\":\"EdgeZone\"},\"recoveryExtendedLocation\":{\"name\":\"rthxqlehmcg\",\"type\":\"EdgeZone\"},\"primaryFabricLocation\":\"inue\",\"recoveryFabricLocation\":\"kamvfe\"}]}") - .toObject(AzureFabricSpecificDetails.class); - Assertions.assertEquals("rrlkmdskjhhx", model.location()); - Assertions.assertEquals("jfoxcxscvslxl", model.containerIds().get(0)); - Assertions.assertEquals("xett", model.zones().get(0).source()); - Assertions.assertEquals("lojfkqidnqto", model.zones().get(0).target()); - Assertions.assertEquals("xhhllxricct", model.extendedLocations().get(0).primaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, - model.extendedLocations().get(0).primaryExtendedLocation().type()); - Assertions.assertEquals("uqqoaj", model.extendedLocations().get(0).recoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, - model.extendedLocations().get(0).recoveryExtendedLocation().type()); - Assertions.assertEquals("bn", model.locationDetails().get(0).initialPrimaryZone()); - Assertions.assertEquals("phepifexleqirc", model.locationDetails().get(0).initialRecoveryZone()); - Assertions.assertEquals("cly", model.locationDetails().get(0).initialPrimaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, - model.locationDetails().get(0).initialPrimaryExtendedLocation().type()); - Assertions.assertEquals("x", model.locationDetails().get(0).initialRecoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, - model.locationDetails().get(0).initialRecoveryExtendedLocation().type()); - Assertions.assertEquals("jlvczu", model.locationDetails().get(0).initialPrimaryFabricLocation()); - Assertions.assertEquals("ac", model.locationDetails().get(0).initialRecoveryFabricLocation()); - Assertions.assertEquals("nettepdjxqeskoy", model.locationDetails().get(0).primaryZone()); - Assertions.assertEquals("iylpck", model.locationDetails().get(0).recoveryZone()); - Assertions.assertEquals("wsedvesk", model.locationDetails().get(0).primaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, - model.locationDetails().get(0).primaryExtendedLocation().type()); - Assertions.assertEquals("gqphrgfnzhctmjts", model.locationDetails().get(0).recoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, - model.locationDetails().get(0).recoveryExtendedLocation().type()); - Assertions.assertEquals("bcbcpz", model.locationDetails().get(0).primaryFabricLocation()); - Assertions.assertEquals("pzeqacdldtz", model.locationDetails().get(0).recoveryFabricLocation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureFabricSpecificDetails model - = new AzureFabricSpecificDetails().withLocation("rrlkmdskjhhx") - .withContainerIds(Arrays.asList("jfoxcxscvslxl", "uavkrmukm")) - .withZones(Arrays.asList(new A2AZoneDetails().withSource("xett").withTarget("lojfkqidnqto"), - new A2AZoneDetails().withSource("jhqxc").withTarget("htkbtnq"), - new A2AZoneDetails().withSource("ngldmbiipsn").withTarget("wl"))) - .withExtendedLocations( - Arrays - .asList( - new A2AExtendedLocationDetails() - .withPrimaryExtendedLocation(new ExtendedLocation().withName("xhhllxricct") - .withType(ExtendedLocationType.EDGE_ZONE)) - .withRecoveryExtendedLocation( - new ExtendedLocation().withName("uqqoaj").withType(ExtendedLocationType.EDGE_ZONE)), - new A2AExtendedLocationDetails() - .withPrimaryExtendedLocation( - new ExtendedLocation().withName("y").withType(ExtendedLocationType.EDGE_ZONE)) - .withRecoveryExtendedLocation(new ExtendedLocation() - .withName("srwvaexhdctrce") - .withType(ExtendedLocationType.EDGE_ZONE)), - new A2AExtendedLocationDetails() - .withPrimaryExtendedLocation(new ExtendedLocation().withName("brupobehdmljza") - .withType(ExtendedLocationType.EDGE_ZONE)) - .withRecoveryExtendedLocation(new ExtendedLocation() - .withName("me") - .withType(ExtendedLocationType.EDGE_ZONE)))) - .withLocationDetails(Arrays.asList( - new A2AFabricSpecificLocationDetails().withInitialPrimaryZone("bn") - .withInitialRecoveryZone("phepifexleqirc") - .withInitialPrimaryExtendedLocation( - new ExtendedLocation().withName("cly").withType(ExtendedLocationType.EDGE_ZONE)) - .withInitialRecoveryExtendedLocation( - new ExtendedLocation().withName("x").withType(ExtendedLocationType.EDGE_ZONE)) - .withInitialPrimaryFabricLocation("jlvczu") - .withInitialRecoveryFabricLocation("ac") - .withPrimaryZone("nettepdjxqeskoy") - .withRecoveryZone("iylpck") - .withPrimaryExtendedLocation( - new ExtendedLocation().withName("wsedvesk").withType(ExtendedLocationType.EDGE_ZONE)) - .withRecoveryExtendedLocation(new ExtendedLocation().withName("gqphrgfnzhctmjts") - .withType(ExtendedLocationType.EDGE_ZONE)) - .withPrimaryFabricLocation("bcbcpz") - .withRecoveryFabricLocation("pzeqacdldtz"), - new A2AFabricSpecificLocationDetails().withInitialPrimaryZone("ypefcpczshnuqnda") - .withInitialRecoveryZone("upfkhuytuszxhmtv") - .withInitialPrimaryExtendedLocation( - new ExtendedLocation().withName("egw").withType(ExtendedLocationType.EDGE_ZONE)) - .withInitialRecoveryExtendedLocation( - new ExtendedLocation().withName("kvzwydw").withType(ExtendedLocationType.EDGE_ZONE)) - .withInitialPrimaryFabricLocation("aokgkskjivbsshaj") - .withInitialRecoveryFabricLocation("u") - .withPrimaryZone("eexpgeumi") - .withRecoveryZone("wuit") - .withPrimaryExtendedLocation( - new ExtendedLocation().withName("exyionofninbd").withType(ExtendedLocationType.EDGE_ZONE)) - .withRecoveryExtendedLocation( - new ExtendedLocation().withName("xcwqqrsmpc").withType(ExtendedLocationType.EDGE_ZONE)) - .withPrimaryFabricLocation("rtugavbzbcyks") - .withRecoveryFabricLocation("mf"), - new A2AFabricSpecificLocationDetails().withInitialPrimaryZone("dr") - .withInitialRecoveryZone("fcmkr") - .withInitialPrimaryExtendedLocation(new ExtendedLocation().withName("sjcwjjxsgmbawvif") - .withType(ExtendedLocationType.EDGE_ZONE)) - .withInitialRecoveryExtendedLocation( - new ExtendedLocation().withName("eci").withType(ExtendedLocationType.EDGE_ZONE)) - .withInitialPrimaryFabricLocation("cjxwkloozrvtxvcm") - .withInitialRecoveryFabricLocation("unlcpxxv") - .withPrimaryZone("yeyng") - .withRecoveryZone("vrquv") - .withPrimaryExtendedLocation( - new ExtendedLocation().withName("gglpmcrdcuelj").withType(ExtendedLocationType.EDGE_ZONE)) - .withRecoveryExtendedLocation( - new ExtendedLocation().withName("hxmfqryarvsxzqb").withType(ExtendedLocationType.EDGE_ZONE)) - .withPrimaryFabricLocation("jkayspthzo") - .withRecoveryFabricLocation("btl"), - new A2AFabricSpecificLocationDetails().withInitialPrimaryZone("tgblioskkfmk") - .withInitialRecoveryZone("djxyxgbkkqvjcteo") - .withInitialPrimaryExtendedLocation( - new ExtendedLocation().withName("l").withType(ExtendedLocationType.EDGE_ZONE)) - .withInitialRecoveryExtendedLocation( - new ExtendedLocation().withName("skkzpxvjnzdpvo").withType(ExtendedLocationType.EDGE_ZONE)) - .withInitialPrimaryFabricLocation("hpcnabxzfsn") - .withInitialRecoveryFabricLocation("ytexvzilmhivzk") - .withPrimaryZone("wncknr") - .withRecoveryZone("ajlskzptj") - .withPrimaryExtendedLocation( - new ExtendedLocation().withName("lwe").withType(ExtendedLocationType.EDGE_ZONE)) - .withRecoveryExtendedLocation( - new ExtendedLocation().withName("rthxqlehmcg").withType(ExtendedLocationType.EDGE_ZONE)) - .withPrimaryFabricLocation("inue") - .withRecoveryFabricLocation("kamvfe"))); - model = BinaryData.fromObject(model).toObject(AzureFabricSpecificDetails.class); - Assertions.assertEquals("rrlkmdskjhhx", model.location()); - Assertions.assertEquals("jfoxcxscvslxl", model.containerIds().get(0)); - Assertions.assertEquals("xett", model.zones().get(0).source()); - Assertions.assertEquals("lojfkqidnqto", model.zones().get(0).target()); - Assertions.assertEquals("xhhllxricct", model.extendedLocations().get(0).primaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, - model.extendedLocations().get(0).primaryExtendedLocation().type()); - Assertions.assertEquals("uqqoaj", model.extendedLocations().get(0).recoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, - model.extendedLocations().get(0).recoveryExtendedLocation().type()); - Assertions.assertEquals("bn", model.locationDetails().get(0).initialPrimaryZone()); - Assertions.assertEquals("phepifexleqirc", model.locationDetails().get(0).initialRecoveryZone()); - Assertions.assertEquals("cly", model.locationDetails().get(0).initialPrimaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, - model.locationDetails().get(0).initialPrimaryExtendedLocation().type()); - Assertions.assertEquals("x", model.locationDetails().get(0).initialRecoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, - model.locationDetails().get(0).initialRecoveryExtendedLocation().type()); - Assertions.assertEquals("jlvczu", model.locationDetails().get(0).initialPrimaryFabricLocation()); - Assertions.assertEquals("ac", model.locationDetails().get(0).initialRecoveryFabricLocation()); - Assertions.assertEquals("nettepdjxqeskoy", model.locationDetails().get(0).primaryZone()); - Assertions.assertEquals("iylpck", model.locationDetails().get(0).recoveryZone()); - Assertions.assertEquals("wsedvesk", model.locationDetails().get(0).primaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, - model.locationDetails().get(0).primaryExtendedLocation().type()); - Assertions.assertEquals("gqphrgfnzhctmjts", model.locationDetails().get(0).recoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, - model.locationDetails().get(0).recoveryExtendedLocation().type()); - Assertions.assertEquals("bcbcpz", model.locationDetails().get(0).primaryFabricLocation()); - Assertions.assertEquals("pzeqacdldtz", model.locationDetails().get(0).recoveryFabricLocation()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureToAzureCreateNetworkMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureToAzureCreateNetworkMappingInputTests.java deleted file mode 100644 index d7dfbaebd034..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureToAzureCreateNetworkMappingInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AzureToAzureCreateNetworkMappingInput; -import org.junit.jupiter.api.Assertions; - -public final class AzureToAzureCreateNetworkMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureToAzureCreateNetworkMappingInput model - = BinaryData.fromString("{\"instanceType\":\"AzureToAzure\",\"primaryNetworkId\":\"vq\"}") - .toObject(AzureToAzureCreateNetworkMappingInput.class); - Assertions.assertEquals("vq", model.primaryNetworkId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureToAzureCreateNetworkMappingInput model - = new AzureToAzureCreateNetworkMappingInput().withPrimaryNetworkId("vq"); - model = BinaryData.fromObject(model).toObject(AzureToAzureCreateNetworkMappingInput.class); - Assertions.assertEquals("vq", model.primaryNetworkId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureToAzureNetworkMappingSettingsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureToAzureNetworkMappingSettingsTests.java deleted file mode 100644 index 79bc5d57c8bf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureToAzureNetworkMappingSettingsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AzureToAzureNetworkMappingSettings; -import org.junit.jupiter.api.Assertions; - -public final class AzureToAzureNetworkMappingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureToAzureNetworkMappingSettings model = BinaryData.fromString( - "{\"instanceType\":\"AzureToAzure\",\"primaryFabricLocation\":\"tmbqdabzfivfok\",\"recoveryFabricLocation\":\"sthhzagjfwy\"}") - .toObject(AzureToAzureNetworkMappingSettings.class); - Assertions.assertEquals("tmbqdabzfivfok", model.primaryFabricLocation()); - Assertions.assertEquals("sthhzagjfwy", model.recoveryFabricLocation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureToAzureNetworkMappingSettings model - = new AzureToAzureNetworkMappingSettings().withPrimaryFabricLocation("tmbqdabzfivfok") - .withRecoveryFabricLocation("sthhzagjfwy"); - model = BinaryData.fromObject(model).toObject(AzureToAzureNetworkMappingSettings.class); - Assertions.assertEquals("tmbqdabzfivfok", model.primaryFabricLocation()); - Assertions.assertEquals("sthhzagjfwy", model.recoveryFabricLocation()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureToAzureUpdateNetworkMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureToAzureUpdateNetworkMappingInputTests.java deleted file mode 100644 index 6ef0652475d6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureToAzureUpdateNetworkMappingInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AzureToAzureUpdateNetworkMappingInput; -import org.junit.jupiter.api.Assertions; - -public final class AzureToAzureUpdateNetworkMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureToAzureUpdateNetworkMappingInput model - = BinaryData.fromString("{\"instanceType\":\"AzureToAzure\",\"primaryNetworkId\":\"lhgenuzejgvkv\"}") - .toObject(AzureToAzureUpdateNetworkMappingInput.class); - Assertions.assertEquals("lhgenuzejgvkv", model.primaryNetworkId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureToAzureUpdateNetworkMappingInput model - = new AzureToAzureUpdateNetworkMappingInput().withPrimaryNetworkId("lhgenuzejgvkv"); - model = BinaryData.fromObject(model).toObject(AzureToAzureUpdateNetworkMappingInput.class); - Assertions.assertEquals("lhgenuzejgvkv", model.primaryNetworkId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureToAzureVmSyncedConfigDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureToAzureVmSyncedConfigDetailsTests.java deleted file mode 100644 index ed9240a9137d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureToAzureVmSyncedConfigDetailsTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AzureToAzureVmSyncedConfigDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InputEndpoint; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AzureToAzureVmSyncedConfigDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureToAzureVmSyncedConfigDetails model = BinaryData.fromString( - "{\"tags\":{\"jceatlijjjrtva\":\"flwfgziiuci\",\"xk\":\"caszk\",\"ignohi\":\"ccxetyvkun\",\"indedvabbx\":\"kgqogjw\"},\"inputEndpoints\":[{\"endpointName\":\"dei\",\"privatePort\":1416675602,\"publicPort\":277548984,\"protocol\":\"cfxzirzzih\"},{\"endpointName\":\"ypusuvjslczwci\",\"privatePort\":73772123,\"publicPort\":1150687421,\"protocol\":\"fryvdmvxadqac\"}]}") - .toObject(AzureToAzureVmSyncedConfigDetails.class); - Assertions.assertEquals("flwfgziiuci", model.tags().get("jceatlijjjrtva")); - Assertions.assertEquals("dei", model.inputEndpoints().get(0).endpointName()); - Assertions.assertEquals(1416675602, model.inputEndpoints().get(0).privatePort()); - Assertions.assertEquals(277548984, model.inputEndpoints().get(0).publicPort()); - Assertions.assertEquals("cfxzirzzih", model.inputEndpoints().get(0).protocol()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureToAzureVmSyncedConfigDetails model = new AzureToAzureVmSyncedConfigDetails() - .withTags( - mapOf("jceatlijjjrtva", "flwfgziiuci", "xk", "caszk", "ignohi", "ccxetyvkun", "indedvabbx", "kgqogjw")) - .withInputEndpoints(Arrays.asList( - new InputEndpoint().withEndpointName("dei") - .withPrivatePort(1416675602) - .withPublicPort(277548984) - .withProtocol("cfxzirzzih"), - new InputEndpoint().withEndpointName("ypusuvjslczwci") - .withPrivatePort(73772123) - .withPublicPort(1150687421) - .withProtocol("fryvdmvxadqac"))); - model = BinaryData.fromObject(model).toObject(AzureToAzureVmSyncedConfigDetails.class); - Assertions.assertEquals("flwfgziiuci", model.tags().get("jceatlijjjrtva")); - Assertions.assertEquals("dei", model.inputEndpoints().get(0).endpointName()); - Assertions.assertEquals(1416675602, model.inputEndpoints().get(0).privatePort()); - Assertions.assertEquals(277548984, model.inputEndpoints().get(0).publicPort()); - Assertions.assertEquals("cfxzirzzih", model.inputEndpoints().get(0).protocol()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureVmDiskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureVmDiskDetailsTests.java deleted file mode 100644 index 2a77ee5b2d33..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/AzureVmDiskDetailsTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AzureVmDiskDetails; -import org.junit.jupiter.api.Assertions; - -public final class AzureVmDiskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureVmDiskDetails model = BinaryData.fromString( - "{\"vhdType\":\"aqszllrzl\",\"vhdId\":\"mdqgmihzpimcqr\",\"diskId\":\"xtminklogxsvtzar\",\"vhdName\":\"vqnsqk\",\"maxSizeMB\":\"mbjwzzoslpkyb\",\"targetDiskLocation\":\"lwkzpgajsqjcem\",\"targetDiskName\":\"mfuvqarwzxuqr\",\"lunId\":\"lui\",\"diskEncryptionSetId\":\"bwxsfgtdm\",\"customTargetDiskName\":\"xekr\"}") - .toObject(AzureVmDiskDetails.class); - Assertions.assertEquals("aqszllrzl", model.vhdType()); - Assertions.assertEquals("mdqgmihzpimcqr", model.vhdId()); - Assertions.assertEquals("xtminklogxsvtzar", model.diskId()); - Assertions.assertEquals("vqnsqk", model.vhdName()); - Assertions.assertEquals("mbjwzzoslpkyb", model.maxSizeMB()); - Assertions.assertEquals("lwkzpgajsqjcem", model.targetDiskLocation()); - Assertions.assertEquals("mfuvqarwzxuqr", model.targetDiskName()); - Assertions.assertEquals("lui", model.lunId()); - Assertions.assertEquals("bwxsfgtdm", model.diskEncryptionSetId()); - Assertions.assertEquals("xekr", model.customTargetDiskName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureVmDiskDetails model = new AzureVmDiskDetails().withVhdType("aqszllrzl") - .withVhdId("mdqgmihzpimcqr") - .withDiskId("xtminklogxsvtzar") - .withVhdName("vqnsqk") - .withMaxSizeMB("mbjwzzoslpkyb") - .withTargetDiskLocation("lwkzpgajsqjcem") - .withTargetDiskName("mfuvqarwzxuqr") - .withLunId("lui") - .withDiskEncryptionSetId("bwxsfgtdm") - .withCustomTargetDiskName("xekr"); - model = BinaryData.fromObject(model).toObject(AzureVmDiskDetails.class); - Assertions.assertEquals("aqszllrzl", model.vhdType()); - Assertions.assertEquals("mdqgmihzpimcqr", model.vhdId()); - Assertions.assertEquals("xtminklogxsvtzar", model.diskId()); - Assertions.assertEquals("vqnsqk", model.vhdName()); - Assertions.assertEquals("mbjwzzoslpkyb", model.maxSizeMB()); - Assertions.assertEquals("lwkzpgajsqjcem", model.targetDiskLocation()); - Assertions.assertEquals("mfuvqarwzxuqr", model.targetDiskName()); - Assertions.assertEquals("lui", model.lunId()); - Assertions.assertEquals("bwxsfgtdm", model.diskEncryptionSetId()); - Assertions.assertEquals("xekr", model.customTargetDiskName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ComputeSizeErrorDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ComputeSizeErrorDetailsTests.java deleted file mode 100644 index e56027aa3cb4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ComputeSizeErrorDetailsTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ComputeSizeErrorDetails; -import org.junit.jupiter.api.Assertions; - -public final class ComputeSizeErrorDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeSizeErrorDetails model = BinaryData.fromString("{\"message\":\"miloxggdufiqndie\",\"severity\":\"ao\"}") - .toObject(ComputeSizeErrorDetails.class); - Assertions.assertEquals("miloxggdufiqndie", model.message()); - Assertions.assertEquals("ao", model.severity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeSizeErrorDetails model - = new ComputeSizeErrorDetails().withMessage("miloxggdufiqndie").withSeverity("ao"); - model = BinaryData.fromObject(model).toObject(ComputeSizeErrorDetails.class); - Assertions.assertEquals("miloxggdufiqndie", model.message()); - Assertions.assertEquals("ao", model.severity()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ConfigurationSettingsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ConfigurationSettingsTests.java deleted file mode 100644 index 25fb5440402c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ConfigurationSettingsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigurationSettings; - -public final class ConfigurationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigurationSettings model = BinaryData.fromString("{\"instanceType\":\"ConfigurationSettings\"}") - .toObject(ConfigurationSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigurationSettings model = new ConfigurationSettings(); - model = BinaryData.fromObject(model).toObject(ConfigurationSettings.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ConfigureAlertRequestPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ConfigureAlertRequestPropertiesTests.java deleted file mode 100644 index c708597a2faa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ConfigureAlertRequestPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigureAlertRequestProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ConfigureAlertRequestPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigureAlertRequestProperties model = BinaryData.fromString( - "{\"sendToOwners\":\"fziton\",\"customEmailAddresses\":[\"fpjkjlxofp\",\"vhpfxxypininmay\"],\"locale\":\"ybb\"}") - .toObject(ConfigureAlertRequestProperties.class); - Assertions.assertEquals("fziton", model.sendToOwners()); - Assertions.assertEquals("fpjkjlxofp", model.customEmailAddresses().get(0)); - Assertions.assertEquals("ybb", model.locale()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigureAlertRequestProperties model = new ConfigureAlertRequestProperties().withSendToOwners("fziton") - .withCustomEmailAddresses(Arrays.asList("fpjkjlxofp", "vhpfxxypininmay")) - .withLocale("ybb"); - model = BinaryData.fromObject(model).toObject(ConfigureAlertRequestProperties.class); - Assertions.assertEquals("fziton", model.sendToOwners()); - Assertions.assertEquals("fpjkjlxofp", model.customEmailAddresses().get(0)); - Assertions.assertEquals("ybb", model.locale()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ConfigureAlertRequestTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ConfigureAlertRequestTests.java deleted file mode 100644 index 2a8ec9146984..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ConfigureAlertRequestTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigureAlertRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigureAlertRequestProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ConfigureAlertRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigureAlertRequest model = BinaryData.fromString( - "{\"properties\":{\"sendToOwners\":\"evdphlxaol\",\"customEmailAddresses\":[\"trg\",\"jbp\",\"zfsinzgvf\",\"jrwzox\"],\"locale\":\"tfell\"}}") - .toObject(ConfigureAlertRequest.class); - Assertions.assertEquals("evdphlxaol", model.properties().sendToOwners()); - Assertions.assertEquals("trg", model.properties().customEmailAddresses().get(0)); - Assertions.assertEquals("tfell", model.properties().locale()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigureAlertRequest model = new ConfigureAlertRequest() - .withProperties(new ConfigureAlertRequestProperties().withSendToOwners("evdphlxaol") - .withCustomEmailAddresses(Arrays.asList("trg", "jbp", "zfsinzgvf", "jrwzox")) - .withLocale("tfell")); - model = BinaryData.fromObject(model).toObject(ConfigureAlertRequest.class); - Assertions.assertEquals("evdphlxaol", model.properties().sendToOwners()); - Assertions.assertEquals("trg", model.properties().customEmailAddresses().get(0)); - Assertions.assertEquals("tfell", model.properties().locale()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ConsistencyCheckTaskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ConsistencyCheckTaskDetailsTests.java deleted file mode 100644 index 57d469c0f18f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ConsistencyCheckTaskDetailsTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConsistencyCheckTaskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InconsistentVmDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ConsistencyCheckTaskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConsistencyCheckTaskDetails model = BinaryData.fromString( - "{\"instanceType\":\"ConsistencyCheckTaskDetails\",\"vmDetails\":[{\"vmName\":\"kbudbtwaokb\",\"cloudName\":\"lyttaaknwfr\",\"details\":[\"sm\",\"p\",\"ujd\"],\"errorIds\":[\"toleksc\",\"ctnanqimwbzxp\",\"cldpkawn\"]}]}") - .toObject(ConsistencyCheckTaskDetails.class); - Assertions.assertEquals("kbudbtwaokb", model.vmDetails().get(0).vmName()); - Assertions.assertEquals("lyttaaknwfr", model.vmDetails().get(0).cloudName()); - Assertions.assertEquals("sm", model.vmDetails().get(0).details().get(0)); - Assertions.assertEquals("toleksc", model.vmDetails().get(0).errorIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConsistencyCheckTaskDetails model = new ConsistencyCheckTaskDetails() - .withVmDetails(Arrays.asList(new InconsistentVmDetails().withVmName("kbudbtwaokb") - .withCloudName("lyttaaknwfr") - .withDetails(Arrays.asList("sm", "p", "ujd")) - .withErrorIds(Arrays.asList("toleksc", "ctnanqimwbzxp", "cldpkawn")))); - model = BinaryData.fromObject(model).toObject(ConsistencyCheckTaskDetails.class); - Assertions.assertEquals("kbudbtwaokb", model.vmDetails().get(0).vmName()); - Assertions.assertEquals("lyttaaknwfr", model.vmDetails().get(0).cloudName()); - Assertions.assertEquals("sm", model.vmDetails().get(0).details().get(0)); - Assertions.assertEquals("toleksc", model.vmDetails().get(0).errorIds().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateNetworkMappingInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateNetworkMappingInputPropertiesTests.java deleted file mode 100644 index 44a24a45f20d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateNetworkMappingInputPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateNetworkMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricSpecificCreateNetworkMappingInput; -import org.junit.jupiter.api.Assertions; - -public final class CreateNetworkMappingInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateNetworkMappingInputProperties model = BinaryData.fromString( - "{\"recoveryFabricName\":\"j\",\"recoveryNetworkId\":\"dpydn\",\"fabricSpecificDetails\":{\"instanceType\":\"FabricSpecificCreateNetworkMappingInput\"}}") - .toObject(CreateNetworkMappingInputProperties.class); - Assertions.assertEquals("j", model.recoveryFabricName()); - Assertions.assertEquals("dpydn", model.recoveryNetworkId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateNetworkMappingInputProperties model - = new CreateNetworkMappingInputProperties().withRecoveryFabricName("j") - .withRecoveryNetworkId("dpydn") - .withFabricSpecificDetails(new FabricSpecificCreateNetworkMappingInput()); - model = BinaryData.fromObject(model).toObject(CreateNetworkMappingInputProperties.class); - Assertions.assertEquals("j", model.recoveryFabricName()); - Assertions.assertEquals("dpydn", model.recoveryNetworkId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateNetworkMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateNetworkMappingInputTests.java deleted file mode 100644 index bf016a79cc71..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateNetworkMappingInputTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateNetworkMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateNetworkMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricSpecificCreateNetworkMappingInput; -import org.junit.jupiter.api.Assertions; - -public final class CreateNetworkMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateNetworkMappingInput model = BinaryData.fromString( - "{\"properties\":{\"recoveryFabricName\":\"yp\",\"recoveryNetworkId\":\"rbpizc\",\"fabricSpecificDetails\":{\"instanceType\":\"FabricSpecificCreateNetworkMappingInput\"}}}") - .toObject(CreateNetworkMappingInput.class); - Assertions.assertEquals("yp", model.properties().recoveryFabricName()); - Assertions.assertEquals("rbpizc", model.properties().recoveryNetworkId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateNetworkMappingInput model = new CreateNetworkMappingInput() - .withProperties(new CreateNetworkMappingInputProperties().withRecoveryFabricName("yp") - .withRecoveryNetworkId("rbpizc") - .withFabricSpecificDetails(new FabricSpecificCreateNetworkMappingInput())); - model = BinaryData.fromObject(model).toObject(CreateNetworkMappingInput.class); - Assertions.assertEquals("yp", model.properties().recoveryFabricName()); - Assertions.assertEquals("rbpizc", model.properties().recoveryNetworkId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreatePolicyInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreatePolicyInputPropertiesTests.java deleted file mode 100644 index 8e474873603a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreatePolicyInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreatePolicyInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProviderSpecificInput; - -public final class CreatePolicyInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreatePolicyInputProperties model - = BinaryData.fromString("{\"providerSpecificInput\":{\"instanceType\":\"PolicyProviderSpecificInput\"}}") - .toObject(CreatePolicyInputProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreatePolicyInputProperties model - = new CreatePolicyInputProperties().withProviderSpecificInput(new PolicyProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(CreatePolicyInputProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreatePolicyInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreatePolicyInputTests.java deleted file mode 100644 index 5b70d5a6903e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreatePolicyInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreatePolicyInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreatePolicyInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProviderSpecificInput; - -public final class CreatePolicyInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreatePolicyInput model = BinaryData - .fromString( - "{\"properties\":{\"providerSpecificInput\":{\"instanceType\":\"PolicyProviderSpecificInput\"}}}") - .toObject(CreatePolicyInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreatePolicyInput model = new CreatePolicyInput().withProperties( - new CreatePolicyInputProperties().withProviderSpecificInput(new PolicyProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(CreatePolicyInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionContainerInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionContainerInputPropertiesTests.java deleted file mode 100644 index c8ab3a3ba1c4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionContainerInputPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderSpecificContainerCreationInput; -import java.util.Arrays; - -public final class CreateProtectionContainerInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateProtectionContainerInputProperties model = BinaryData.fromString( - "{\"providerSpecificInput\":[{\"instanceType\":\"ReplicationProviderSpecificContainerCreationInput\"},{\"instanceType\":\"ReplicationProviderSpecificContainerCreationInput\"},{\"instanceType\":\"ReplicationProviderSpecificContainerCreationInput\"}]}") - .toObject(CreateProtectionContainerInputProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateProtectionContainerInputProperties model = new CreateProtectionContainerInputProperties() - .withProviderSpecificInput(Arrays.asList(new ReplicationProviderSpecificContainerCreationInput(), - new ReplicationProviderSpecificContainerCreationInput(), - new ReplicationProviderSpecificContainerCreationInput())); - model = BinaryData.fromObject(model).toObject(CreateProtectionContainerInputProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionContainerInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionContainerInputTests.java deleted file mode 100644 index 235816f4de60..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionContainerInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderSpecificContainerCreationInput; -import java.util.Arrays; - -public final class CreateProtectionContainerInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateProtectionContainerInput model = BinaryData.fromString( - "{\"properties\":{\"providerSpecificInput\":[{\"instanceType\":\"ReplicationProviderSpecificContainerCreationInput\"},{\"instanceType\":\"ReplicationProviderSpecificContainerCreationInput\"},{\"instanceType\":\"ReplicationProviderSpecificContainerCreationInput\"}]}}") - .toObject(CreateProtectionContainerInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateProtectionContainerInput model - = new CreateProtectionContainerInput().withProperties(new CreateProtectionContainerInputProperties() - .withProviderSpecificInput(Arrays.asList(new ReplicationProviderSpecificContainerCreationInput(), - new ReplicationProviderSpecificContainerCreationInput(), - new ReplicationProviderSpecificContainerCreationInput()))); - model = BinaryData.fromObject(model).toObject(CreateProtectionContainerInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionContainerMappingInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionContainerMappingInputPropertiesTests.java deleted file mode 100644 index 85255010ae23..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionContainerMappingInputPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderSpecificContainerMappingInput; -import org.junit.jupiter.api.Assertions; - -public final class CreateProtectionContainerMappingInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateProtectionContainerMappingInputProperties model = BinaryData.fromString( - "{\"targetProtectionContainerId\":\"qbmfpjbabwidf\",\"policyId\":\"sspuunnoxyhkx\",\"providerSpecificInput\":{\"instanceType\":\"ReplicationProviderSpecificContainerMappingInput\"}}") - .toObject(CreateProtectionContainerMappingInputProperties.class); - Assertions.assertEquals("qbmfpjbabwidf", model.targetProtectionContainerId()); - Assertions.assertEquals("sspuunnoxyhkx", model.policyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateProtectionContainerMappingInputProperties model - = new CreateProtectionContainerMappingInputProperties().withTargetProtectionContainerId("qbmfpjbabwidf") - .withPolicyId("sspuunnoxyhkx") - .withProviderSpecificInput(new ReplicationProviderSpecificContainerMappingInput()); - model = BinaryData.fromObject(model).toObject(CreateProtectionContainerMappingInputProperties.class); - Assertions.assertEquals("qbmfpjbabwidf", model.targetProtectionContainerId()); - Assertions.assertEquals("sspuunnoxyhkx", model.policyId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionContainerMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionContainerMappingInputTests.java deleted file mode 100644 index f6c3aefed7e7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionContainerMappingInputTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderSpecificContainerMappingInput; -import org.junit.jupiter.api.Assertions; - -public final class CreateProtectionContainerMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateProtectionContainerMappingInput model = BinaryData.fromString( - "{\"properties\":{\"targetProtectionContainerId\":\"smystuluqypfc\",\"policyId\":\"er\",\"providerSpecificInput\":{\"instanceType\":\"ReplicationProviderSpecificContainerMappingInput\"}}}") - .toObject(CreateProtectionContainerMappingInput.class); - Assertions.assertEquals("smystuluqypfc", model.properties().targetProtectionContainerId()); - Assertions.assertEquals("er", model.properties().policyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateProtectionContainerMappingInput model = new CreateProtectionContainerMappingInput().withProperties( - new CreateProtectionContainerMappingInputProperties().withTargetProtectionContainerId("smystuluqypfc") - .withPolicyId("er") - .withProviderSpecificInput(new ReplicationProviderSpecificContainerMappingInput())); - model = BinaryData.fromObject(model).toObject(CreateProtectionContainerMappingInput.class); - Assertions.assertEquals("smystuluqypfc", model.properties().targetProtectionContainerId()); - Assertions.assertEquals("er", model.properties().policyId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionIntentInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionIntentInputTests.java deleted file mode 100644 index ddbb5d7e714f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionIntentInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentProviderSpecificDetails; - -public final class CreateProtectionIntentInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateProtectionIntentInput model = BinaryData.fromString( - "{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"CreateProtectionIntentProviderSpecificDetails\"}}}") - .toObject(CreateProtectionIntentInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateProtectionIntentInput model - = new CreateProtectionIntentInput().withProperties(new CreateProtectionIntentProperties() - .withProviderSpecificDetails(new CreateProtectionIntentProviderSpecificDetails())); - model = BinaryData.fromObject(model).toObject(CreateProtectionIntentInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionIntentPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionIntentPropertiesTests.java deleted file mode 100644 index 1a01987969b0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionIntentPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentProviderSpecificDetails; - -public final class CreateProtectionIntentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateProtectionIntentProperties model = BinaryData - .fromString( - "{\"providerSpecificDetails\":{\"instanceType\":\"CreateProtectionIntentProviderSpecificDetails\"}}") - .toObject(CreateProtectionIntentProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateProtectionIntentProperties model = new CreateProtectionIntentProperties() - .withProviderSpecificDetails(new CreateProtectionIntentProviderSpecificDetails()); - model = BinaryData.fromObject(model).toObject(CreateProtectionIntentProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionIntentProviderSpecificDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionIntentProviderSpecificDetailsTests.java deleted file mode 100644 index 8f3bbf17f1d9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateProtectionIntentProviderSpecificDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentProviderSpecificDetails; - -public final class CreateProtectionIntentProviderSpecificDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateProtectionIntentProviderSpecificDetails model - = BinaryData.fromString("{\"instanceType\":\"CreateProtectionIntentProviderSpecificDetails\"}") - .toObject(CreateProtectionIntentProviderSpecificDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateProtectionIntentProviderSpecificDetails model = new CreateProtectionIntentProviderSpecificDetails(); - model = BinaryData.fromObject(model).toObject(CreateProtectionIntentProviderSpecificDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateRecoveryPlanInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateRecoveryPlanInputPropertiesTests.java deleted file mode 100644 index 712df0b26464..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateRecoveryPlanInputPropertiesTests.java +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateRecoveryPlanInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverDeploymentModel; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanAction; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroup; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItemOperation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CreateRecoveryPlanInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateRecoveryPlanInputProperties model = BinaryData.fromString( - "{\"primaryFabricId\":\"ijp\",\"recoveryFabricId\":\"gsksrfhf\",\"failoverDeploymentModel\":\"NotApplicable\",\"groups\":[{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{\"id\":\"xwcdomm\",\"virtualMachineId\":\"fqawzfgbrttui\"},{\"id\":\"lkiexhajlfnthiq\",\"virtualMachineId\":\"uttdiygbp\"}],\"startGroupActions\":[{\"actionName\":\"swmtxk\",\"failoverTypes\":[\"PlannedFailover\",\"RepairReplication\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\",\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jlmec\",\"failoverTypes\":[\"ReverseReplicate\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"ezaifghtmo\",\"failoverTypes\":[\"PlannedFailover\",\"CancelFailover\",\"RepairReplication\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"bkrkjj\",\"failoverTypes\":[\"PlannedFailover\",\"CancelFailover\",\"RepairReplication\",\"TestFailoverCleanup\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"qoewdogiyetesy\",\"failoverTypes\":[\"Failback\",\"ReverseReplicate\",\"UnplannedFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"t\",\"failoverTypes\":[\"Failback\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{\"id\":\"etnjuhpsprkz\",\"virtualMachineId\":\"upia\"},{\"id\":\"xnafbw\",\"virtualMachineId\":\"oohtuovmaonurjtu\"},{\"id\":\"hihpvecmsl\",\"virtualMachineId\":\"bl\"}],\"startGroupActions\":[{\"actionName\":\"lt\",\"failoverTypes\":[\"DisableProtection\",\"CancelFailover\",\"TestFailoverCleanup\",\"TestFailoverCleanup\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"gctmgxuupbezq\",\"failoverTypes\":[\"PlannedFailover\",\"TestFailoverCleanup\",\"Commit\",\"TestFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"qkkyihztgeqmg\",\"failoverTypes\":[\"UnplannedFailover\",\"FinalizeFailback\",\"ReverseReplicate\",\"CancelFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"lcecfeh\",\"failoverTypes\":[\"TestFailoverCleanup\",\"TestFailoverCleanup\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"uhicqllizstacsjv\",\"failoverTypes\":[\"Failback\",\"SwitchProtection\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"wqejpmvsse\",\"failoverTypes\":[\"DisableProtection\",\"ChangePit\",\"CompleteMigration\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"cxtczhupeukn\",\"failoverTypes\":[\"TestFailover\",\"CancelFailover\",\"FinalizeFailback\",\"ChangePit\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{\"id\":\"fbocyvhh\",\"virtualMachineId\":\"rtywi\"},{\"id\":\"mhlaku\",\"virtualMachineId\":\"gbhgau\"}],\"startGroupActions\":[{\"actionName\":\"ixmxufrsryjqgdkf\",\"failoverTypes\":[\"ChangePit\"],\"failoverDirections\":[\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"oqbvjhvefgwbmqj\",\"failoverTypes\":[\"CompleteMigration\",\"Commit\",\"TestFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ay\",\"failoverTypes\":[\"Commit\",\"CancelFailover\",\"FinalizeFailback\",\"CancelFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"b\",\"failoverTypes\":[\"FinalizeFailback\",\"ChangePit\",\"ChangePit\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"fkmbtsuahxsgxj\",\"failoverTypes\":[\"FinalizeFailback\",\"PlannedFailover\",\"Commit\"],\"failoverDirections\":[\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{\"id\":\"wsdrnpxqwodif\",\"virtualMachineId\":\"xcjr\"},{\"id\":\"uabwibvjogjo\",\"virtualMachineId\":\"cyefoyzbamwine\"}],\"startGroupActions\":[{\"actionName\":\"fkak\",\"failoverTypes\":[\"FinalizeFailback\",\"UnplannedFailover\",\"CancelFailover\",\"Failback\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"lz\",\"failoverTypes\":[\"UnplannedFailover\",\"CancelFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"uxgvttxpnr\",\"failoverTypes\":[\"Failback\",\"UnplannedFailover\",\"FinalizeFailback\",\"ChangePit\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"rekidswysk\",\"failoverTypes\":[\"CompleteMigration\",\"SwitchProtection\",\"CompleteMigration\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"kutvlxhrpqhv\",\"failoverTypes\":[\"CancelFailover\",\"TestFailover\",\"PlannedFailover\",\"DisableProtection\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"hbcdsziry\",\"failoverTypes\":[\"DisableProtection\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificInput\":[{\"instanceType\":\"RecoveryPlanProviderSpecificInput\"},{\"instanceType\":\"RecoveryPlanProviderSpecificInput\"}]}") - .toObject(CreateRecoveryPlanInputProperties.class); - Assertions.assertEquals("ijp", model.primaryFabricId()); - Assertions.assertEquals("gsksrfhf", model.recoveryFabricId()); - Assertions.assertEquals(FailoverDeploymentModel.NOT_APPLICABLE, model.failoverDeploymentModel()); - Assertions.assertEquals(RecoveryPlanGroupType.BOOT, model.groups().get(0).groupType()); - Assertions.assertEquals("xwcdomm", model.groups().get(0).replicationProtectedItems().get(0).id()); - Assertions.assertEquals("fqawzfgbrttui", - model.groups().get(0).replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("swmtxk", model.groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.PLANNED_FAILOVER, - model.groups().get(0).startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.groups().get(0).startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("ezaifghtmo", model.groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.PLANNED_FAILOVER, - model.groups().get(0).endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.groups().get(0).endGroupActions().get(0).failoverDirections().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateRecoveryPlanInputProperties model = new CreateRecoveryPlanInputProperties().withPrimaryFabricId("ijp") - .withRecoveryFabricId("gsksrfhf") - .withFailoverDeploymentModel(FailoverDeploymentModel.NOT_APPLICABLE) - .withGroups(Arrays.asList( - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem().withId("xwcdomm").withVirtualMachineId("fqawzfgbrttui"), - new RecoveryPlanProtectedItem().withId("lkiexhajlfnthiq").withVirtualMachineId("uttdiygbp"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("swmtxk") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.PLANNED_FAILOVER, - ReplicationProtectedItemOperation.REPAIR_REPLICATION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("jlmec") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.REVERSE_REPLICATE)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("ezaifghtmo") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.PLANNED_FAILOVER, - ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.REPAIR_REPLICATION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("bkrkjj") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.PLANNED_FAILOVER, - ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.REPAIR_REPLICATION, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("qoewdogiyetesy") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.FAILBACK, - ReplicationProtectedItemOperation.REVERSE_REPLICATE, - ReplicationProtectedItemOperation.UNPLANNED_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("t") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.FAILBACK)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem().withId("etnjuhpsprkz").withVirtualMachineId("upia"), - new RecoveryPlanProtectedItem().withId("xnafbw").withVirtualMachineId("oohtuovmaonurjtu"), - new RecoveryPlanProtectedItem().withId("hihpvecmsl").withVirtualMachineId("bl"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("lt") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.DISABLE_PROTECTION, - ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("gctmgxuupbezq") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.PLANNED_FAILOVER, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.COMMIT, - ReplicationProtectedItemOperation.TEST_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("qkkyihztgeqmg") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.REVERSE_REPLICATE, - ReplicationProtectedItemOperation.CANCEL_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("lcecfeh") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("uhicqllizstacsjv") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.FAILBACK, - ReplicationProtectedItemOperation.SWITCH_PROTECTION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("wqejpmvsse") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.DISABLE_PROTECTION, - ReplicationProtectedItemOperation.CHANGE_PIT, - ReplicationProtectedItemOperation.COMPLETE_MIGRATION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("cxtczhupeukn") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.TEST_FAILOVER, - ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems( - Arrays.asList(new RecoveryPlanProtectedItem().withId("fbocyvhh").withVirtualMachineId("rtywi"), - new RecoveryPlanProtectedItem().withId("mhlaku").withVirtualMachineId("gbhgau"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("ixmxufrsryjqgdkf") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("oqbvjhvefgwbmqj") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - ReplicationProtectedItemOperation.COMMIT, - ReplicationProtectedItemOperation.TEST_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("ay") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMMIT, - ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.CANCEL_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("b") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.CHANGE_PIT, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList(new RecoveryPlanAction().withActionName("fkmbtsuahxsgxj") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.PLANNED_FAILOVER, - ReplicationProtectedItemOperation.COMMIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem().withId("wsdrnpxqwodif").withVirtualMachineId("xcjr"), - new RecoveryPlanProtectedItem().withId("uabwibvjogjo").withVirtualMachineId("cyefoyzbamwine"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("fkak") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.FAILBACK)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("lz") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.CANCEL_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("uxgvttxpnr") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.FAILBACK, - ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("rekidswysk") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - ReplicationProtectedItemOperation.SWITCH_PROTECTION, - ReplicationProtectedItemOperation.COMPLETE_MIGRATION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("kutvlxhrpqhv") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.TEST_FAILOVER, - ReplicationProtectedItemOperation.PLANNED_FAILOVER, - ReplicationProtectedItemOperation.DISABLE_PROTECTION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("hbcdsziry") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.DISABLE_PROTECTION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))))) - .withProviderSpecificInput( - Arrays.asList(new RecoveryPlanProviderSpecificInput(), new RecoveryPlanProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(CreateRecoveryPlanInputProperties.class); - Assertions.assertEquals("ijp", model.primaryFabricId()); - Assertions.assertEquals("gsksrfhf", model.recoveryFabricId()); - Assertions.assertEquals(FailoverDeploymentModel.NOT_APPLICABLE, model.failoverDeploymentModel()); - Assertions.assertEquals(RecoveryPlanGroupType.BOOT, model.groups().get(0).groupType()); - Assertions.assertEquals("xwcdomm", model.groups().get(0).replicationProtectedItems().get(0).id()); - Assertions.assertEquals("fqawzfgbrttui", - model.groups().get(0).replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("swmtxk", model.groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.PLANNED_FAILOVER, - model.groups().get(0).startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.groups().get(0).startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("ezaifghtmo", model.groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.PLANNED_FAILOVER, - model.groups().get(0).endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.groups().get(0).endGroupActions().get(0).failoverDirections().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateRecoveryPlanInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateRecoveryPlanInputTests.java deleted file mode 100644 index 337ec23bd160..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CreateRecoveryPlanInputTests.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateRecoveryPlanInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateRecoveryPlanInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverDeploymentModel; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanAction; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroup; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItemOperation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CreateRecoveryPlanInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateRecoveryPlanInput model = BinaryData.fromString( - "{\"properties\":{\"primaryFabricId\":\"gvoavyunssxlgh\",\"recoveryFabricId\":\"ee\",\"failoverDeploymentModel\":\"NotApplicable\",\"groups\":[{\"groupType\":\"Shutdown\",\"replicationProtectedItems\":[{\"id\":\"seksgbux\",\"virtualMachineId\":\"tu\"},{\"id\":\"dhga\",\"virtualMachineId\":\"pirpiwrqof\"}],\"startGroupActions\":[{\"actionName\":\"pmjnlexwhcb\",\"failoverTypes\":[\"CancelFailover\",\"ChangePit\",\"CancelFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"uuerctatoyi\",\"failoverTypes\":[\"UnplannedFailover\",\"DisableProtection\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"lc\",\"failoverTypes\":[\"UnplannedFailover\",\"Commit\",\"TestFailoverCleanup\",\"ChangePit\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{\"id\":\"fsrucv\",\"virtualMachineId\":\"rpcjttbstvjeaqnr\"}],\"startGroupActions\":[{\"actionName\":\"fkoxmlghktuidvr\",\"failoverTypes\":[\"PlannedFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"exymzvla\",\"failoverTypes\":[\"DisableProtection\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"sgnyyuuzivensrp\",\"failoverTypes\":[\"FinalizeFailback\",\"FinalizeFailback\",\"ChangePit\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificInput\":[{\"instanceType\":\"RecoveryPlanProviderSpecificInput\"},{\"instanceType\":\"RecoveryPlanProviderSpecificInput\"},{\"instanceType\":\"RecoveryPlanProviderSpecificInput\"}]}}") - .toObject(CreateRecoveryPlanInput.class); - Assertions.assertEquals("gvoavyunssxlgh", model.properties().primaryFabricId()); - Assertions.assertEquals("ee", model.properties().recoveryFabricId()); - Assertions.assertEquals(FailoverDeploymentModel.NOT_APPLICABLE, model.properties().failoverDeploymentModel()); - Assertions.assertEquals(RecoveryPlanGroupType.SHUTDOWN, model.properties().groups().get(0).groupType()); - Assertions.assertEquals("seksgbux", model.properties().groups().get(0).replicationProtectedItems().get(0).id()); - Assertions.assertEquals("tu", - model.properties().groups().get(0).replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("pmjnlexwhcb", - model.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.CANCEL_FAILOVER, - model.properties().groups().get(0).startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.properties().groups().get(0).startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("uuerctatoyi", - model.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - model.properties().groups().get(0).endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.properties().groups().get(0).endGroupActions().get(0).failoverDirections().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateRecoveryPlanInput model = new CreateRecoveryPlanInput() - .withProperties(new CreateRecoveryPlanInputProperties().withPrimaryFabricId("gvoavyunssxlgh") - .withRecoveryFabricId("ee") - .withFailoverDeploymentModel(FailoverDeploymentModel.NOT_APPLICABLE) - .withGroups( - Arrays.asList( - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.SHUTDOWN) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem().withId("seksgbux").withVirtualMachineId("tu"), - new RecoveryPlanProtectedItem().withId("dhga").withVirtualMachineId("pirpiwrqof"))) - .withStartGroupActions(Arrays.asList(new RecoveryPlanAction() - .withActionName("pmjnlexwhcb") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.CHANGE_PIT, - ReplicationProtectedItemOperation.CANCEL_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList(new RecoveryPlanAction() - .withActionName("uuerctatoyi") - .withFailoverTypes( - Arrays.asList(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.DISABLE_PROTECTION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("lc") - .withFailoverTypes( - Arrays.asList(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.COMMIT, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections( - Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems(Arrays - .asList(new RecoveryPlanProtectedItem().withId("fsrucv") - .withVirtualMachineId("rpcjttbstvjeaqnr"))) - .withStartGroupActions(Arrays.asList(new RecoveryPlanAction() - .withActionName("fkoxmlghktuidvr") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.PLANNED_FAILOVER)) - .withFailoverDirections( - Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("exymzvla") - .withFailoverTypes( - Arrays.asList(ReplicationProtectedItemOperation.DISABLE_PROTECTION)) - .withFailoverDirections( - Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList(new RecoveryPlanAction() - .withActionName("sgnyyuuzivensrp") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))))) - .withProviderSpecificInput(Arrays.asList(new RecoveryPlanProviderSpecificInput(), - new RecoveryPlanProviderSpecificInput(), new RecoveryPlanProviderSpecificInput()))); - model = BinaryData.fromObject(model).toObject(CreateRecoveryPlanInput.class); - Assertions.assertEquals("gvoavyunssxlgh", model.properties().primaryFabricId()); - Assertions.assertEquals("ee", model.properties().recoveryFabricId()); - Assertions.assertEquals(FailoverDeploymentModel.NOT_APPLICABLE, model.properties().failoverDeploymentModel()); - Assertions.assertEquals(RecoveryPlanGroupType.SHUTDOWN, model.properties().groups().get(0).groupType()); - Assertions.assertEquals("seksgbux", model.properties().groups().get(0).replicationProtectedItems().get(0).id()); - Assertions.assertEquals("tu", - model.properties().groups().get(0).replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("pmjnlexwhcb", - model.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.CANCEL_FAILOVER, - model.properties().groups().get(0).startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.properties().groups().get(0).startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("uuerctatoyi", - model.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - model.properties().groups().get(0).endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.properties().groups().get(0).endGroupActions().get(0).failoverDirections().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CriticalJobHistoryDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CriticalJobHistoryDetailsTests.java deleted file mode 100644 index 4822366a41f5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CriticalJobHistoryDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CriticalJobHistoryDetails; - -public final class CriticalJobHistoryDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CriticalJobHistoryDetails model = BinaryData.fromString( - "{\"jobName\":\"iplrbpbewtghfgb\",\"jobId\":\"gw\",\"startTime\":\"2021-01-14T04:37:45Z\",\"jobStatus\":\"v\"}") - .toObject(CriticalJobHistoryDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CriticalJobHistoryDetails model = new CriticalJobHistoryDetails(); - model = BinaryData.fromObject(model).toObject(CriticalJobHistoryDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CurrentJobDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CurrentJobDetailsTests.java deleted file mode 100644 index 4a607fdabf14..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CurrentJobDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CurrentJobDetails; - -public final class CurrentJobDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CurrentJobDetails model - = BinaryData.fromString("{\"jobName\":\"obbc\",\"jobId\":\"s\",\"startTime\":\"2021-04-25T18:58:37Z\"}") - .toObject(CurrentJobDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CurrentJobDetails model = new CurrentJobDetails(); - model = BinaryData.fromObject(model).toObject(CurrentJobDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CurrentScenarioDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CurrentScenarioDetailsTests.java deleted file mode 100644 index f81637aee400..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/CurrentScenarioDetailsTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CurrentScenarioDetails; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class CurrentScenarioDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CurrentScenarioDetails model = BinaryData - .fromString( - "{\"scenarioName\":\"epxgyqagvr\",\"jobId\":\"npkukghimdblx\",\"startTime\":\"2021-02-15T12:58:28Z\"}") - .toObject(CurrentScenarioDetails.class); - Assertions.assertEquals("epxgyqagvr", model.scenarioName()); - Assertions.assertEquals("npkukghimdblx", model.jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-15T12:58:28Z"), model.startTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CurrentScenarioDetails model = new CurrentScenarioDetails().withScenarioName("epxgyqagvr") - .withJobId("npkukghimdblx") - .withStartTime(OffsetDateTime.parse("2021-02-15T12:58:28Z")); - model = BinaryData.fromObject(model).toObject(CurrentScenarioDetails.class); - Assertions.assertEquals("epxgyqagvr", model.scenarioName()); - Assertions.assertEquals("npkukghimdblx", model.jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-15T12:58:28Z"), model.startTime()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DataStoreTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DataStoreTests.java deleted file mode 100644 index c09101f21106..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DataStoreTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DataStore; -import org.junit.jupiter.api.Assertions; - -public final class DataStoreTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataStore model = BinaryData.fromString( - "{\"symbolicName\":\"ogfuyzwvbhlim\",\"uuid\":\"qecroodl\",\"capacity\":\"cdrdaasaxxo\",\"freeSpace\":\"mfkwiyjvzuk\",\"type\":\"r\"}") - .toObject(DataStore.class); - Assertions.assertEquals("ogfuyzwvbhlim", model.symbolicName()); - Assertions.assertEquals("qecroodl", model.uuid()); - Assertions.assertEquals("cdrdaasaxxo", model.capacity()); - Assertions.assertEquals("mfkwiyjvzuk", model.freeSpace()); - Assertions.assertEquals("r", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataStore model = new DataStore().withSymbolicName("ogfuyzwvbhlim") - .withUuid("qecroodl") - .withCapacity("cdrdaasaxxo") - .withFreeSpace("mfkwiyjvzuk") - .withType("r"); - model = BinaryData.fromObject(model).toObject(DataStore.class); - Assertions.assertEquals("ogfuyzwvbhlim", model.symbolicName()); - Assertions.assertEquals("qecroodl", model.uuid()); - Assertions.assertEquals("cdrdaasaxxo", model.capacity()); - Assertions.assertEquals("mfkwiyjvzuk", model.freeSpace()); - Assertions.assertEquals("r", model.type()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DataStoreUtilizationDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DataStoreUtilizationDetailsTests.java deleted file mode 100644 index c39c8c0eb623..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DataStoreUtilizationDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DataStoreUtilizationDetails; - -public final class DataStoreUtilizationDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataStoreUtilizationDetails model = BinaryData.fromString( - "{\"totalSnapshotsSupported\":3097932904552377371,\"totalSnapshotsCreated\":4245389434648384828,\"dataStoreName\":\"kdschlzvfictnkjj\"}") - .toObject(DataStoreUtilizationDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataStoreUtilizationDetails model = new DataStoreUtilizationDetails(); - model = BinaryData.fromObject(model).toObject(DataStoreUtilizationDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DisableProtectionInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DisableProtectionInputPropertiesTests.java deleted file mode 100644 index a63f987146c2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DisableProtectionInputPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionProviderSpecificInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionReason; -import org.junit.jupiter.api.Assertions; - -public final class DisableProtectionInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DisableProtectionInputProperties model = BinaryData.fromString( - "{\"disableProtectionReason\":\"NotSpecified\",\"replicationProviderInput\":{\"instanceType\":\"DisableProtectionProviderSpecificInput\"}}") - .toObject(DisableProtectionInputProperties.class); - Assertions.assertEquals(DisableProtectionReason.NOT_SPECIFIED, model.disableProtectionReason()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DisableProtectionInputProperties model - = new DisableProtectionInputProperties().withDisableProtectionReason(DisableProtectionReason.NOT_SPECIFIED) - .withReplicationProviderInput(new DisableProtectionProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(DisableProtectionInputProperties.class); - Assertions.assertEquals(DisableProtectionReason.NOT_SPECIFIED, model.disableProtectionReason()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DisableProtectionInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DisableProtectionInputTests.java deleted file mode 100644 index 9e567ebe9dab..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DisableProtectionInputTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionProviderSpecificInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionReason; -import org.junit.jupiter.api.Assertions; - -public final class DisableProtectionInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DisableProtectionInput model = BinaryData.fromString( - "{\"properties\":{\"disableProtectionReason\":\"NotSpecified\",\"replicationProviderInput\":{\"instanceType\":\"DisableProtectionProviderSpecificInput\"}}}") - .toObject(DisableProtectionInput.class); - Assertions.assertEquals(DisableProtectionReason.NOT_SPECIFIED, model.properties().disableProtectionReason()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DisableProtectionInput model = new DisableProtectionInput().withProperties( - new DisableProtectionInputProperties().withDisableProtectionReason(DisableProtectionReason.NOT_SPECIFIED) - .withReplicationProviderInput(new DisableProtectionProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(DisableProtectionInput.class); - Assertions.assertEquals(DisableProtectionReason.NOT_SPECIFIED, model.properties().disableProtectionReason()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DisableProtectionProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DisableProtectionProviderSpecificInputTests.java deleted file mode 100644 index f19b3f24da60..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DisableProtectionProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DisableProtectionProviderSpecificInput; - -public final class DisableProtectionProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DisableProtectionProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"DisableProtectionProviderSpecificInput\"}") - .toObject(DisableProtectionProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DisableProtectionProviderSpecificInput model = new DisableProtectionProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(DisableProtectionProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DiscoverProtectableItemRequestPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DiscoverProtectableItemRequestPropertiesTests.java deleted file mode 100644 index 7e8f87be5a69..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DiscoverProtectableItemRequestPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiscoverProtectableItemRequestProperties; -import org.junit.jupiter.api.Assertions; - -public final class DiscoverProtectableItemRequestPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiscoverProtectableItemRequestProperties model = BinaryData - .fromString("{\"friendlyName\":\"aiuebbaumnyqu\",\"ipAddress\":\"deoj\",\"osType\":\"bckhsmtxpsi\"}") - .toObject(DiscoverProtectableItemRequestProperties.class); - Assertions.assertEquals("aiuebbaumnyqu", model.friendlyName()); - Assertions.assertEquals("deoj", model.ipAddress()); - Assertions.assertEquals("bckhsmtxpsi", model.osType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiscoverProtectableItemRequestProperties model - = new DiscoverProtectableItemRequestProperties().withFriendlyName("aiuebbaumnyqu") - .withIpAddress("deoj") - .withOsType("bckhsmtxpsi"); - model = BinaryData.fromObject(model).toObject(DiscoverProtectableItemRequestProperties.class); - Assertions.assertEquals("aiuebbaumnyqu", model.friendlyName()); - Assertions.assertEquals("deoj", model.ipAddress()); - Assertions.assertEquals("bckhsmtxpsi", model.osType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DiscoverProtectableItemRequestTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DiscoverProtectableItemRequestTests.java deleted file mode 100644 index c2de96e3ac72..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DiscoverProtectableItemRequestTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiscoverProtectableItemRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiscoverProtectableItemRequestProperties; -import org.junit.jupiter.api.Assertions; - -public final class DiscoverProtectableItemRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiscoverProtectableItemRequest model = BinaryData - .fromString( - "{\"properties\":{\"friendlyName\":\"sxnkjzkdeslpvlo\",\"ipAddress\":\"i\",\"osType\":\"ghxpkdw\"}}") - .toObject(DiscoverProtectableItemRequest.class); - Assertions.assertEquals("sxnkjzkdeslpvlo", model.properties().friendlyName()); - Assertions.assertEquals("i", model.properties().ipAddress()); - Assertions.assertEquals("ghxpkdw", model.properties().osType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiscoverProtectableItemRequest model = new DiscoverProtectableItemRequest() - .withProperties(new DiscoverProtectableItemRequestProperties().withFriendlyName("sxnkjzkdeslpvlo") - .withIpAddress("i") - .withOsType("ghxpkdw")); - model = BinaryData.fromObject(model).toObject(DiscoverProtectableItemRequest.class); - Assertions.assertEquals("sxnkjzkdeslpvlo", model.properties().friendlyName()); - Assertions.assertEquals("i", model.properties().ipAddress()); - Assertions.assertEquals("ghxpkdw", model.properties().osType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DiskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DiskDetailsTests.java deleted file mode 100644 index 67073f36e794..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DiskDetailsTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskDetails; -import org.junit.jupiter.api.Assertions; - -public final class DiskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskDetails model = BinaryData - .fromString( - "{\"maxSizeMB\":3920956440221145049,\"vhdType\":\"zm\",\"vhdId\":\"k\",\"vhdName\":\"wsxvjab\"}") - .toObject(DiskDetails.class); - Assertions.assertEquals(3920956440221145049L, model.maxSizeMB()); - Assertions.assertEquals("zm", model.vhdType()); - Assertions.assertEquals("k", model.vhdId()); - Assertions.assertEquals("wsxvjab", model.vhdName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskDetails model = new DiskDetails().withMaxSizeMB(3920956440221145049L) - .withVhdType("zm") - .withVhdId("k") - .withVhdName("wsxvjab"); - model = BinaryData.fromObject(model).toObject(DiskDetails.class); - Assertions.assertEquals(3920956440221145049L, model.maxSizeMB()); - Assertions.assertEquals("zm", model.vhdType()); - Assertions.assertEquals("k", model.vhdId()); - Assertions.assertEquals("wsxvjab", model.vhdName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DiskVolumeDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DiskVolumeDetailsTests.java deleted file mode 100644 index 0ad172b4047d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DiskVolumeDetailsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskVolumeDetails; -import org.junit.jupiter.api.Assertions; - -public final class DiskVolumeDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskVolumeDetails model - = BinaryData.fromString("{\"label\":\"qa\",\"name\":\"yvymcnudndo\"}").toObject(DiskVolumeDetails.class); - Assertions.assertEquals("qa", model.label()); - Assertions.assertEquals("yvymcnudndo", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskVolumeDetails model = new DiskVolumeDetails().withLabel("qa").withName("yvymcnudndo"); - model = BinaryData.fromObject(model).toObject(DiskVolumeDetails.class); - Assertions.assertEquals("qa", model.label()); - Assertions.assertEquals("yvymcnudndo", model.name()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DisplayTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DisplayTests.java deleted file mode 100644 index a951434db647..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/DisplayTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Display; -import org.junit.jupiter.api.Assertions; - -public final class DisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Display model = BinaryData - .fromString( - "{\"provider\":\"a\",\"resource\":\"th\",\"operation\":\"hab\",\"description\":\"pikxwczbyscnpqxu\"}") - .toObject(Display.class); - Assertions.assertEquals("a", model.provider()); - Assertions.assertEquals("th", model.resource()); - Assertions.assertEquals("hab", model.operation()); - Assertions.assertEquals("pikxwczbyscnpqxu", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Display model = new Display().withProvider("a") - .withResource("th") - .withOperation("hab") - .withDescription("pikxwczbyscnpqxu"); - model = BinaryData.fromObject(model).toObject(Display.class); - Assertions.assertEquals("a", model.provider()); - Assertions.assertEquals("th", model.resource()); - Assertions.assertEquals("hab", model.operation()); - Assertions.assertEquals("pikxwczbyscnpqxu", model.description()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableMigrationInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableMigrationInputPropertiesTests.java deleted file mode 100644 index f9346d1e7b90..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableMigrationInputPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableMigrationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableMigrationProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class EnableMigrationInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnableMigrationInputProperties model = BinaryData.fromString( - "{\"policyId\":\"waloayqcgwr\",\"providerSpecificDetails\":{\"instanceType\":\"EnableMigrationProviderSpecificInput\"}}") - .toObject(EnableMigrationInputProperties.class); - Assertions.assertEquals("waloayqcgwr", model.policyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnableMigrationInputProperties model = new EnableMigrationInputProperties().withPolicyId("waloayqcgwr") - .withProviderSpecificDetails(new EnableMigrationProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(EnableMigrationInputProperties.class); - Assertions.assertEquals("waloayqcgwr", model.policyId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableMigrationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableMigrationInputTests.java deleted file mode 100644 index 449ae2ad386b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableMigrationInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableMigrationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableMigrationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableMigrationProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class EnableMigrationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnableMigrationInput model = BinaryData.fromString( - "{\"properties\":{\"policyId\":\"hjkbegibtnmxieb\",\"providerSpecificDetails\":{\"instanceType\":\"EnableMigrationProviderSpecificInput\"}}}") - .toObject(EnableMigrationInput.class); - Assertions.assertEquals("hjkbegibtnmxieb", model.properties().policyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnableMigrationInput model = new EnableMigrationInput() - .withProperties(new EnableMigrationInputProperties().withPolicyId("hjkbegibtnmxieb") - .withProviderSpecificDetails(new EnableMigrationProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(EnableMigrationInput.class); - Assertions.assertEquals("hjkbegibtnmxieb", model.properties().policyId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableMigrationProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableMigrationProviderSpecificInputTests.java deleted file mode 100644 index 9d79fb84b234..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableMigrationProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableMigrationProviderSpecificInput; - -public final class EnableMigrationProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnableMigrationProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"EnableMigrationProviderSpecificInput\"}") - .toObject(EnableMigrationProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnableMigrationProviderSpecificInput model = new EnableMigrationProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(EnableMigrationProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableProtectionInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableProtectionInputPropertiesTests.java deleted file mode 100644 index ca0cc397a33a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableProtectionInputPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableProtectionInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableProtectionProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class EnableProtectionInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnableProtectionInputProperties model = BinaryData.fromString( - "{\"policyId\":\"rey\",\"protectableItemId\":\"zi\",\"providerSpecificDetails\":{\"instanceType\":\"EnableProtectionProviderSpecificInput\"}}") - .toObject(EnableProtectionInputProperties.class); - Assertions.assertEquals("rey", model.policyId()); - Assertions.assertEquals("zi", model.protectableItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnableProtectionInputProperties model = new EnableProtectionInputProperties().withPolicyId("rey") - .withProtectableItemId("zi") - .withProviderSpecificDetails(new EnableProtectionProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(EnableProtectionInputProperties.class); - Assertions.assertEquals("rey", model.policyId()); - Assertions.assertEquals("zi", model.protectableItemId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableProtectionInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableProtectionInputTests.java deleted file mode 100644 index 653bff93a70e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableProtectionInputTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableProtectionInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableProtectionProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class EnableProtectionInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnableProtectionInput model = BinaryData.fromString( - "{\"properties\":{\"policyId\":\"njhf\",\"protectableItemId\":\"wmszkk\",\"providerSpecificDetails\":{\"instanceType\":\"EnableProtectionProviderSpecificInput\"}}}") - .toObject(EnableProtectionInput.class); - Assertions.assertEquals("njhf", model.properties().policyId()); - Assertions.assertEquals("wmszkk", model.properties().protectableItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnableProtectionInput model - = new EnableProtectionInput().withProperties(new EnableProtectionInputProperties().withPolicyId("njhf") - .withProtectableItemId("wmszkk") - .withProviderSpecificDetails(new EnableProtectionProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(EnableProtectionInput.class); - Assertions.assertEquals("njhf", model.properties().policyId()); - Assertions.assertEquals("wmszkk", model.properties().protectableItemId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableProtectionProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableProtectionProviderSpecificInputTests.java deleted file mode 100644 index 4160deac2372..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EnableProtectionProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EnableProtectionProviderSpecificInput; - -public final class EnableProtectionProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnableProtectionProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"EnableProtectionProviderSpecificInput\"}") - .toObject(EnableProtectionProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnableProtectionProviderSpecificInput model = new EnableProtectionProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(EnableProtectionProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EncryptionDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EncryptionDetailsTests.java deleted file mode 100644 index bb67eeedc587..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EncryptionDetailsTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EncryptionDetails; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class EncryptionDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EncryptionDetails model = BinaryData.fromString( - "{\"kekState\":\"soodqxhcrmnoh\",\"kekCertThumbprint\":\"ckwhds\",\"kekCertExpiryDate\":\"2021-07-22T01:38:16Z\"}") - .toObject(EncryptionDetails.class); - Assertions.assertEquals("soodqxhcrmnoh", model.kekState()); - Assertions.assertEquals("ckwhds", model.kekCertThumbprint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-22T01:38:16Z"), model.kekCertExpiryDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EncryptionDetails model = new EncryptionDetails().withKekState("soodqxhcrmnoh") - .withKekCertThumbprint("ckwhds") - .withKekCertExpiryDate(OffsetDateTime.parse("2021-07-22T01:38:16Z")); - model = BinaryData.fromObject(model).toObject(EncryptionDetails.class); - Assertions.assertEquals("soodqxhcrmnoh", model.kekState()); - Assertions.assertEquals("ckwhds", model.kekCertThumbprint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-22T01:38:16Z"), model.kekCertExpiryDate()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EventProviderSpecificDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EventProviderSpecificDetailsTests.java deleted file mode 100644 index 7d2432edf787..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EventProviderSpecificDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EventProviderSpecificDetails; - -public final class EventProviderSpecificDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventProviderSpecificDetails model - = BinaryData.fromString("{\"instanceType\":\"EventProviderSpecificDetails\"}") - .toObject(EventProviderSpecificDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventProviderSpecificDetails model = new EventProviderSpecificDetails(); - model = BinaryData.fromObject(model).toObject(EventProviderSpecificDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EventSpecificDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EventSpecificDetailsTests.java deleted file mode 100644 index 51c06c1ab13a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/EventSpecificDetailsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EventSpecificDetails; - -public final class EventSpecificDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventSpecificDetails model - = BinaryData.fromString("{\"instanceType\":\"EventSpecificDetails\"}").toObject(EventSpecificDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventSpecificDetails model = new EventSpecificDetails(); - model = BinaryData.fromObject(model).toObject(EventSpecificDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingProtectionProfileTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingProtectionProfileTests.java deleted file mode 100644 index fc2218662262..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingProtectionProfileTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExistingProtectionProfile; -import org.junit.jupiter.api.Assertions; - -public final class ExistingProtectionProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExistingProtectionProfile model - = BinaryData.fromString("{\"resourceType\":\"Existing\",\"protectionProfileId\":\"zi\"}") - .toObject(ExistingProtectionProfile.class); - Assertions.assertEquals("zi", model.protectionProfileId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExistingProtectionProfile model = new ExistingProtectionProfile().withProtectionProfileId("zi"); - model = BinaryData.fromObject(model).toObject(ExistingProtectionProfile.class); - Assertions.assertEquals("zi", model.protectionProfileId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingRecoveryAvailabilitySetTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingRecoveryAvailabilitySetTests.java deleted file mode 100644 index 2e090fd8e00a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingRecoveryAvailabilitySetTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExistingRecoveryAvailabilitySet; -import org.junit.jupiter.api.Assertions; - -public final class ExistingRecoveryAvailabilitySetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExistingRecoveryAvailabilitySet model - = BinaryData.fromString("{\"resourceType\":\"Existing\",\"recoveryAvailabilitySetId\":\"qimiymqr\"}") - .toObject(ExistingRecoveryAvailabilitySet.class); - Assertions.assertEquals("qimiymqr", model.recoveryAvailabilitySetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExistingRecoveryAvailabilitySet model - = new ExistingRecoveryAvailabilitySet().withRecoveryAvailabilitySetId("qimiymqr"); - model = BinaryData.fromObject(model).toObject(ExistingRecoveryAvailabilitySet.class); - Assertions.assertEquals("qimiymqr", model.recoveryAvailabilitySetId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingRecoveryProximityPlacementGroupTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingRecoveryProximityPlacementGroupTests.java deleted file mode 100644 index c5aa42966a69..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingRecoveryProximityPlacementGroupTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExistingRecoveryProximityPlacementGroup; -import org.junit.jupiter.api.Assertions; - -public final class ExistingRecoveryProximityPlacementGroupTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExistingRecoveryProximityPlacementGroup model - = BinaryData.fromString("{\"resourceType\":\"Existing\",\"recoveryProximityPlacementGroupId\":\"guhfupe\"}") - .toObject(ExistingRecoveryProximityPlacementGroup.class); - Assertions.assertEquals("guhfupe", model.recoveryProximityPlacementGroupId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExistingRecoveryProximityPlacementGroup model - = new ExistingRecoveryProximityPlacementGroup().withRecoveryProximityPlacementGroupId("guhfupe"); - model = BinaryData.fromObject(model).toObject(ExistingRecoveryProximityPlacementGroup.class); - Assertions.assertEquals("guhfupe", model.recoveryProximityPlacementGroupId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingRecoveryResourceGroupTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingRecoveryResourceGroupTests.java deleted file mode 100644 index 173461fe574a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingRecoveryResourceGroupTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExistingRecoveryResourceGroup; -import org.junit.jupiter.api.Assertions; - -public final class ExistingRecoveryResourceGroupTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExistingRecoveryResourceGroup model - = BinaryData.fromString("{\"resourceType\":\"Existing\",\"recoveryResourceGroupId\":\"svvoqsbpkflanfk\"}") - .toObject(ExistingRecoveryResourceGroup.class); - Assertions.assertEquals("svvoqsbpkflanfk", model.recoveryResourceGroupId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExistingRecoveryResourceGroup model - = new ExistingRecoveryResourceGroup().withRecoveryResourceGroupId("svvoqsbpkflanfk"); - model = BinaryData.fromObject(model).toObject(ExistingRecoveryResourceGroup.class); - Assertions.assertEquals("svvoqsbpkflanfk", model.recoveryResourceGroupId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingRecoveryVirtualNetworkTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingRecoveryVirtualNetworkTests.java deleted file mode 100644 index 43f3122de352..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingRecoveryVirtualNetworkTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExistingRecoveryVirtualNetwork; -import org.junit.jupiter.api.Assertions; - -public final class ExistingRecoveryVirtualNetworkTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExistingRecoveryVirtualNetwork model = BinaryData.fromString( - "{\"resourceType\":\"Existing\",\"recoveryVirtualNetworkId\":\"xsyaowuzowpuoh\",\"recoverySubnetName\":\"cprgukxrztiochl\"}") - .toObject(ExistingRecoveryVirtualNetwork.class); - Assertions.assertEquals("xsyaowuzowpuoh", model.recoveryVirtualNetworkId()); - Assertions.assertEquals("cprgukxrztiochl", model.recoverySubnetName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExistingRecoveryVirtualNetwork model - = new ExistingRecoveryVirtualNetwork().withRecoveryVirtualNetworkId("xsyaowuzowpuoh") - .withRecoverySubnetName("cprgukxrztiochl"); - model = BinaryData.fromObject(model).toObject(ExistingRecoveryVirtualNetwork.class); - Assertions.assertEquals("xsyaowuzowpuoh", model.recoveryVirtualNetworkId()); - Assertions.assertEquals("cprgukxrztiochl", model.recoverySubnetName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingStorageAccountTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingStorageAccountTests.java deleted file mode 100644 index 30f4c18d8fc2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExistingStorageAccountTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExistingStorageAccount; -import org.junit.jupiter.api.Assertions; - -public final class ExistingStorageAccountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExistingStorageAccount model - = BinaryData.fromString("{\"resourceType\":\"Existing\",\"azureStorageAccountId\":\"tixmqrudjiz\"}") - .toObject(ExistingStorageAccount.class); - Assertions.assertEquals("tixmqrudjiz", model.azureStorageAccountId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExistingStorageAccount model = new ExistingStorageAccount().withAzureStorageAccountId("tixmqrudjiz"); - model = BinaryData.fromObject(model).toObject(ExistingStorageAccount.class); - Assertions.assertEquals("tixmqrudjiz", model.azureStorageAccountId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExtendedLocationTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExtendedLocationTests.java deleted file mode 100644 index 8b5f28064bd1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ExtendedLocationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExtendedLocation; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExtendedLocationType; -import org.junit.jupiter.api.Assertions; - -public final class ExtendedLocationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtendedLocation model = BinaryData.fromString("{\"name\":\"moenodnaien\",\"type\":\"EdgeZone\"}") - .toObject(ExtendedLocation.class); - Assertions.assertEquals("moenodnaien", model.name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocation model - = new ExtendedLocation().withName("moenodnaien").withType(ExtendedLocationType.EDGE_ZONE); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("moenodnaien", model.name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.type()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricCreationInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricCreationInputPropertiesTests.java deleted file mode 100644 index 7a8490a8ac53..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricCreationInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricCreationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricSpecificCreationInput; - -public final class FabricCreationInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FabricCreationInputProperties model - = BinaryData.fromString("{\"customDetails\":{\"instanceType\":\"FabricSpecificCreationInput\"}}") - .toObject(FabricCreationInputProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FabricCreationInputProperties model - = new FabricCreationInputProperties().withCustomDetails(new FabricSpecificCreationInput()); - model = BinaryData.fromObject(model).toObject(FabricCreationInputProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricCreationInputTests.java deleted file mode 100644 index 9f83d62c2d01..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricCreationInputTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricCreationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricCreationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricSpecificCreationInput; - -public final class FabricCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FabricCreationInput model = BinaryData - .fromString("{\"properties\":{\"customDetails\":{\"instanceType\":\"FabricSpecificCreationInput\"}}}") - .toObject(FabricCreationInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FabricCreationInput model = new FabricCreationInput() - .withProperties(new FabricCreationInputProperties().withCustomDetails(new FabricSpecificCreationInput())); - model = BinaryData.fromObject(model).toObject(FabricCreationInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricReplicationGroupTaskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricReplicationGroupTaskDetailsTests.java deleted file mode 100644 index bc7c02aa8cc9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricReplicationGroupTaskDetailsTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricReplicationGroupTaskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobEntity; -import org.junit.jupiter.api.Assertions; - -public final class FabricReplicationGroupTaskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FabricReplicationGroupTaskDetails model = BinaryData.fromString( - "{\"instanceType\":\"FabricReplicationGroupTaskDetails\",\"skippedReason\":\"nmfbc\",\"skippedReasonString\":\"qktkrumzuedkyzbf\",\"jobTask\":{\"jobId\":\"vqkxiuxqggvq\",\"jobFriendlyName\":\"hyhlwcjsqg\",\"targetObjectId\":\"hffbxrq\",\"targetObjectName\":\"ijpeuql\",\"targetInstanceType\":\"x\",\"jobScenarioName\":\"ztv\"}}") - .toObject(FabricReplicationGroupTaskDetails.class); - Assertions.assertEquals("vqkxiuxqggvq", model.jobTask().jobId()); - Assertions.assertEquals("hyhlwcjsqg", model.jobTask().jobFriendlyName()); - Assertions.assertEquals("hffbxrq", model.jobTask().targetObjectId()); - Assertions.assertEquals("ijpeuql", model.jobTask().targetObjectName()); - Assertions.assertEquals("x", model.jobTask().targetInstanceType()); - Assertions.assertEquals("ztv", model.jobTask().jobScenarioName()); - Assertions.assertEquals("nmfbc", model.skippedReason()); - Assertions.assertEquals("qktkrumzuedkyzbf", model.skippedReasonString()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FabricReplicationGroupTaskDetails model - = new FabricReplicationGroupTaskDetails().withJobTask(new JobEntity().withJobId("vqkxiuxqggvq") - .withJobFriendlyName("hyhlwcjsqg") - .withTargetObjectId("hffbxrq") - .withTargetObjectName("ijpeuql") - .withTargetInstanceType("x") - .withJobScenarioName("ztv")).withSkippedReason("nmfbc").withSkippedReasonString("qktkrumzuedkyzbf"); - model = BinaryData.fromObject(model).toObject(FabricReplicationGroupTaskDetails.class); - Assertions.assertEquals("vqkxiuxqggvq", model.jobTask().jobId()); - Assertions.assertEquals("hyhlwcjsqg", model.jobTask().jobFriendlyName()); - Assertions.assertEquals("hffbxrq", model.jobTask().targetObjectId()); - Assertions.assertEquals("ijpeuql", model.jobTask().targetObjectName()); - Assertions.assertEquals("x", model.jobTask().targetInstanceType()); - Assertions.assertEquals("ztv", model.jobTask().jobScenarioName()); - Assertions.assertEquals("nmfbc", model.skippedReason()); - Assertions.assertEquals("qktkrumzuedkyzbf", model.skippedReasonString()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricSpecificCreateNetworkMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricSpecificCreateNetworkMappingInputTests.java deleted file mode 100644 index 3c8f56eead5f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricSpecificCreateNetworkMappingInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricSpecificCreateNetworkMappingInput; - -public final class FabricSpecificCreateNetworkMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FabricSpecificCreateNetworkMappingInput model - = BinaryData.fromString("{\"instanceType\":\"FabricSpecificCreateNetworkMappingInput\"}") - .toObject(FabricSpecificCreateNetworkMappingInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FabricSpecificCreateNetworkMappingInput model = new FabricSpecificCreateNetworkMappingInput(); - model = BinaryData.fromObject(model).toObject(FabricSpecificCreateNetworkMappingInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricSpecificCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricSpecificCreationInputTests.java deleted file mode 100644 index ad1c08f54ef7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricSpecificCreationInputTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricSpecificCreationInput; - -public final class FabricSpecificCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FabricSpecificCreationInput model = BinaryData.fromString("{\"instanceType\":\"FabricSpecificCreationInput\"}") - .toObject(FabricSpecificCreationInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FabricSpecificCreationInput model = new FabricSpecificCreationInput(); - model = BinaryData.fromObject(model).toObject(FabricSpecificCreationInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricSpecificDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricSpecificDetailsTests.java deleted file mode 100644 index bae3c11641e1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricSpecificDetailsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricSpecificDetails; - -public final class FabricSpecificDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FabricSpecificDetails model = BinaryData.fromString("{\"instanceType\":\"FabricSpecificDetails\"}") - .toObject(FabricSpecificDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FabricSpecificDetails model = new FabricSpecificDetails(); - model = BinaryData.fromObject(model).toObject(FabricSpecificDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricSpecificUpdateNetworkMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricSpecificUpdateNetworkMappingInputTests.java deleted file mode 100644 index bfc37c08e9ac..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FabricSpecificUpdateNetworkMappingInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricSpecificUpdateNetworkMappingInput; - -public final class FabricSpecificUpdateNetworkMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FabricSpecificUpdateNetworkMappingInput model - = BinaryData.fromString("{\"instanceType\":\"FabricSpecificUpdateNetworkMappingInput\"}") - .toObject(FabricSpecificUpdateNetworkMappingInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FabricSpecificUpdateNetworkMappingInput model = new FabricSpecificUpdateNetworkMappingInput(); - model = BinaryData.fromObject(model).toObject(FabricSpecificUpdateNetworkMappingInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FailoverJobDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FailoverJobDetailsTests.java deleted file mode 100644 index 99b28f426964..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FailoverJobDetailsTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverJobDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverReplicationProtectedItemDetails; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FailoverJobDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FailoverJobDetails model = BinaryData.fromString( - "{\"instanceType\":\"FailoverJobDetails\",\"protectedItemDetails\":[{\"name\":\"jcciklhsyek\",\"friendlyName\":\"renxolriyehqbe\",\"testVmName\":\"dlh\",\"testVmFriendlyName\":\"wbdbfg\",\"networkConnectionStatus\":\"punytjl\",\"networkFriendlyName\":\"smmpathubt\",\"subnet\":\"deani\",\"recoveryPointId\":\"llbvgwzsfftedous\",\"recoveryPointTime\":\"2021-07-21T04:35:12Z\"},{\"name\":\"tgravaqogf\",\"friendlyName\":\"ebauzlqbtx\",\"testVmName\":\"pfhnjzudrt\",\"testVmFriendlyName\":\"kgmeb\",\"networkConnectionStatus\":\"whczzqrhmng\",\"networkFriendlyName\":\"edygisrzwnykdi\",\"subnet\":\"chl\",\"recoveryPointId\":\"pwctofl\",\"recoveryPointTime\":\"2021-07-22T16:13:46Z\"},{\"name\":\"cdhz\",\"friendlyName\":\"kbrfgdrwji\",\"testVmName\":\"whfjsrwqrxe\",\"testVmFriendlyName\":\"gcwvrrmdqntycna\",\"networkConnectionStatus\":\"hvmaxgnuyeamcmhu\",\"networkFriendlyName\":\"jecehokwc\",\"subnet\":\"twloesqr\",\"recoveryPointId\":\"vrbnyrukoil\",\"recoveryPointTime\":\"2021-09-21T11:09:08Z\"}],\"affectedObjectDetails\":{\"lh\":\"wjleip\"}}") - .toObject(FailoverJobDetails.class); - Assertions.assertEquals("wjleip", model.affectedObjectDetails().get("lh")); - Assertions.assertEquals("jcciklhsyek", model.protectedItemDetails().get(0).name()); - Assertions.assertEquals("renxolriyehqbe", model.protectedItemDetails().get(0).friendlyName()); - Assertions.assertEquals("dlh", model.protectedItemDetails().get(0).testVmName()); - Assertions.assertEquals("wbdbfg", model.protectedItemDetails().get(0).testVmFriendlyName()); - Assertions.assertEquals("punytjl", model.protectedItemDetails().get(0).networkConnectionStatus()); - Assertions.assertEquals("smmpathubt", model.protectedItemDetails().get(0).networkFriendlyName()); - Assertions.assertEquals("deani", model.protectedItemDetails().get(0).subnet()); - Assertions.assertEquals("llbvgwzsfftedous", model.protectedItemDetails().get(0).recoveryPointId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T04:35:12Z"), - model.protectedItemDetails().get(0).recoveryPointTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FailoverJobDetails model = new FailoverJobDetails().withAffectedObjectDetails(mapOf("lh", "wjleip")) - .withProtectedItemDetails(Arrays.asList( - new FailoverReplicationProtectedItemDetails().withName("jcciklhsyek") - .withFriendlyName("renxolriyehqbe") - .withTestVmName("dlh") - .withTestVmFriendlyName("wbdbfg") - .withNetworkConnectionStatus("punytjl") - .withNetworkFriendlyName("smmpathubt") - .withSubnet("deani") - .withRecoveryPointId("llbvgwzsfftedous") - .withRecoveryPointTime(OffsetDateTime.parse("2021-07-21T04:35:12Z")), - new FailoverReplicationProtectedItemDetails().withName("tgravaqogf") - .withFriendlyName("ebauzlqbtx") - .withTestVmName("pfhnjzudrt") - .withTestVmFriendlyName("kgmeb") - .withNetworkConnectionStatus("whczzqrhmng") - .withNetworkFriendlyName("edygisrzwnykdi") - .withSubnet("chl") - .withRecoveryPointId("pwctofl") - .withRecoveryPointTime(OffsetDateTime.parse("2021-07-22T16:13:46Z")), - new FailoverReplicationProtectedItemDetails().withName("cdhz") - .withFriendlyName("kbrfgdrwji") - .withTestVmName("whfjsrwqrxe") - .withTestVmFriendlyName("gcwvrrmdqntycna") - .withNetworkConnectionStatus("hvmaxgnuyeamcmhu") - .withNetworkFriendlyName("jecehokwc") - .withSubnet("twloesqr") - .withRecoveryPointId("vrbnyrukoil") - .withRecoveryPointTime(OffsetDateTime.parse("2021-09-21T11:09:08Z")))); - model = BinaryData.fromObject(model).toObject(FailoverJobDetails.class); - Assertions.assertEquals("wjleip", model.affectedObjectDetails().get("lh")); - Assertions.assertEquals("jcciklhsyek", model.protectedItemDetails().get(0).name()); - Assertions.assertEquals("renxolriyehqbe", model.protectedItemDetails().get(0).friendlyName()); - Assertions.assertEquals("dlh", model.protectedItemDetails().get(0).testVmName()); - Assertions.assertEquals("wbdbfg", model.protectedItemDetails().get(0).testVmFriendlyName()); - Assertions.assertEquals("punytjl", model.protectedItemDetails().get(0).networkConnectionStatus()); - Assertions.assertEquals("smmpathubt", model.protectedItemDetails().get(0).networkFriendlyName()); - Assertions.assertEquals("deani", model.protectedItemDetails().get(0).subnet()); - Assertions.assertEquals("llbvgwzsfftedous", model.protectedItemDetails().get(0).recoveryPointId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T04:35:12Z"), - model.protectedItemDetails().get(0).recoveryPointTime()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FailoverProcessServerRequestPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FailoverProcessServerRequestPropertiesTests.java deleted file mode 100644 index d3f27193bd26..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FailoverProcessServerRequestPropertiesTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverProcessServerRequestProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FailoverProcessServerRequestPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FailoverProcessServerRequestProperties model = BinaryData.fromString( - "{\"containerName\":\"l\",\"sourceProcessServerId\":\"u\",\"targetProcessServerId\":\"krlkhbzhfepg\",\"vmsToMigrate\":[\"e\"],\"updateType\":\"locx\"}") - .toObject(FailoverProcessServerRequestProperties.class); - Assertions.assertEquals("l", model.containerName()); - Assertions.assertEquals("u", model.sourceProcessServerId()); - Assertions.assertEquals("krlkhbzhfepg", model.targetProcessServerId()); - Assertions.assertEquals("e", model.vmsToMigrate().get(0)); - Assertions.assertEquals("locx", model.updateType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FailoverProcessServerRequestProperties model - = new FailoverProcessServerRequestProperties().withContainerName("l") - .withSourceProcessServerId("u") - .withTargetProcessServerId("krlkhbzhfepg") - .withVmsToMigrate(Arrays.asList("e")) - .withUpdateType("locx"); - model = BinaryData.fromObject(model).toObject(FailoverProcessServerRequestProperties.class); - Assertions.assertEquals("l", model.containerName()); - Assertions.assertEquals("u", model.sourceProcessServerId()); - Assertions.assertEquals("krlkhbzhfepg", model.targetProcessServerId()); - Assertions.assertEquals("e", model.vmsToMigrate().get(0)); - Assertions.assertEquals("locx", model.updateType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FailoverProcessServerRequestTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FailoverProcessServerRequestTests.java deleted file mode 100644 index f8134cf0ace8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FailoverProcessServerRequestTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverProcessServerRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverProcessServerRequestProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FailoverProcessServerRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FailoverProcessServerRequest model = BinaryData.fromString( - "{\"properties\":{\"containerName\":\"xsqwpgrjbznorc\",\"sourceProcessServerId\":\"vsnb\",\"targetProcessServerId\":\"qabnmoc\",\"vmsToMigrate\":[\"shurzafbljjgpbto\"],\"updateType\":\"jmkljavbqidtqajz\"}}") - .toObject(FailoverProcessServerRequest.class); - Assertions.assertEquals("xsqwpgrjbznorc", model.properties().containerName()); - Assertions.assertEquals("vsnb", model.properties().sourceProcessServerId()); - Assertions.assertEquals("qabnmoc", model.properties().targetProcessServerId()); - Assertions.assertEquals("shurzafbljjgpbto", model.properties().vmsToMigrate().get(0)); - Assertions.assertEquals("jmkljavbqidtqajz", model.properties().updateType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FailoverProcessServerRequest model = new FailoverProcessServerRequest() - .withProperties(new FailoverProcessServerRequestProperties().withContainerName("xsqwpgrjbznorc") - .withSourceProcessServerId("vsnb") - .withTargetProcessServerId("qabnmoc") - .withVmsToMigrate(Arrays.asList("shurzafbljjgpbto")) - .withUpdateType("jmkljavbqidtqajz")); - model = BinaryData.fromObject(model).toObject(FailoverProcessServerRequest.class); - Assertions.assertEquals("xsqwpgrjbznorc", model.properties().containerName()); - Assertions.assertEquals("vsnb", model.properties().sourceProcessServerId()); - Assertions.assertEquals("qabnmoc", model.properties().targetProcessServerId()); - Assertions.assertEquals("shurzafbljjgpbto", model.properties().vmsToMigrate().get(0)); - Assertions.assertEquals("jmkljavbqidtqajz", model.properties().updateType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FailoverReplicationProtectedItemDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FailoverReplicationProtectedItemDetailsTests.java deleted file mode 100644 index af016b182ca2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/FailoverReplicationProtectedItemDetailsTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverReplicationProtectedItemDetails; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class FailoverReplicationProtectedItemDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FailoverReplicationProtectedItemDetails model = BinaryData.fromString( - "{\"name\":\"xpzruzythqkk\",\"friendlyName\":\"bg\",\"testVmName\":\"ellv\",\"testVmFriendlyName\":\"nxdmnitmujdtv\",\"networkConnectionStatus\":\"lyymffhmjpddny\",\"networkFriendlyName\":\"zuvrzmzqmz\",\"subnet\":\"rb\",\"recoveryPointId\":\"vnmdyfoeboj\",\"recoveryPointTime\":\"2021-06-09T22:38:27Z\"}") - .toObject(FailoverReplicationProtectedItemDetails.class); - Assertions.assertEquals("xpzruzythqkk", model.name()); - Assertions.assertEquals("bg", model.friendlyName()); - Assertions.assertEquals("ellv", model.testVmName()); - Assertions.assertEquals("nxdmnitmujdtv", model.testVmFriendlyName()); - Assertions.assertEquals("lyymffhmjpddny", model.networkConnectionStatus()); - Assertions.assertEquals("zuvrzmzqmz", model.networkFriendlyName()); - Assertions.assertEquals("rb", model.subnet()); - Assertions.assertEquals("vnmdyfoeboj", model.recoveryPointId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T22:38:27Z"), model.recoveryPointTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FailoverReplicationProtectedItemDetails model - = new FailoverReplicationProtectedItemDetails().withName("xpzruzythqkk") - .withFriendlyName("bg") - .withTestVmName("ellv") - .withTestVmFriendlyName("nxdmnitmujdtv") - .withNetworkConnectionStatus("lyymffhmjpddny") - .withNetworkFriendlyName("zuvrzmzqmz") - .withSubnet("rb") - .withRecoveryPointId("vnmdyfoeboj") - .withRecoveryPointTime(OffsetDateTime.parse("2021-06-09T22:38:27Z")); - model = BinaryData.fromObject(model).toObject(FailoverReplicationProtectedItemDetails.class); - Assertions.assertEquals("xpzruzythqkk", model.name()); - Assertions.assertEquals("bg", model.friendlyName()); - Assertions.assertEquals("ellv", model.testVmName()); - Assertions.assertEquals("nxdmnitmujdtv", model.testVmFriendlyName()); - Assertions.assertEquals("lyymffhmjpddny", model.networkConnectionStatus()); - Assertions.assertEquals("zuvrzmzqmz", model.networkFriendlyName()); - Assertions.assertEquals("rb", model.subnet()); - Assertions.assertEquals("vnmdyfoeboj", model.recoveryPointId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T22:38:27Z"), model.recoveryPointTime()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/GatewayOperationDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/GatewayOperationDetailsTests.java deleted file mode 100644 index 963aee8b70cf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/GatewayOperationDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.GatewayOperationDetails; - -public final class GatewayOperationDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GatewayOperationDetails model = BinaryData.fromString( - "{\"state\":\"g\",\"progressPercentage\":2029904789,\"timeElapsed\":322502128306108788,\"timeRemaining\":7668781915393184343,\"uploadSpeed\":826381918369159803,\"hostName\":\"ilaywkdcwm\",\"dataStores\":[\"ri\",\"mhxdqaolfy\",\"nkkbjpjvlywltmfw\",\"bbjwhlw\"],\"vmwareReadThroughput\":8018197232244540786}") - .toObject(GatewayOperationDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GatewayOperationDetails model = new GatewayOperationDetails(); - model = BinaryData.fromObject(model).toObject(GatewayOperationDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVHostDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVHostDetailsTests.java deleted file mode 100644 index e87f65a5cd6b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVHostDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVHostDetails; - -public final class HyperVHostDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVHostDetails model - = BinaryData.fromString("{\"id\":\"zocrdzgczeu\",\"name\":\"g\",\"marsAgentVersion\":\"ncaqttiekoifu\"}") - .toObject(HyperVHostDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVHostDetails model = new HyperVHostDetails(); - model = BinaryData.fromObject(model).toObject(HyperVHostDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplica2012EventDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplica2012EventDetailsTests.java deleted file mode 100644 index 24606c438f1d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplica2012EventDetailsTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplica2012EventDetails; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplica2012EventDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplica2012EventDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplica2012\",\"containerName\":\"yttzgixgyrih\",\"fabricName\":\"mgb\",\"remoteContainerName\":\"lqtxnrflkndrn\",\"remoteFabricName\":\"gfjo\"}") - .toObject(HyperVReplica2012EventDetails.class); - Assertions.assertEquals("yttzgixgyrih", model.containerName()); - Assertions.assertEquals("mgb", model.fabricName()); - Assertions.assertEquals("lqtxnrflkndrn", model.remoteContainerName()); - Assertions.assertEquals("gfjo", model.remoteFabricName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplica2012EventDetails model = new HyperVReplica2012EventDetails().withContainerName("yttzgixgyrih") - .withFabricName("mgb") - .withRemoteContainerName("lqtxnrflkndrn") - .withRemoteFabricName("gfjo"); - model = BinaryData.fromObject(model).toObject(HyperVReplica2012EventDetails.class); - Assertions.assertEquals("yttzgixgyrih", model.containerName()); - Assertions.assertEquals("mgb", model.fabricName()); - Assertions.assertEquals("lqtxnrflkndrn", model.remoteContainerName()); - Assertions.assertEquals("gfjo", model.remoteFabricName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplica2012R2EventDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplica2012R2EventDetailsTests.java deleted file mode 100644 index e63b768222ed..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplica2012R2EventDetailsTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplica2012R2EventDetails; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplica2012R2EventDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplica2012R2EventDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplica2012R2\",\"containerName\":\"daqotwfh\",\"fabricName\":\"xwgsa\",\"remoteContainerName\":\"c\",\"remoteFabricName\":\"owzafczu\"}") - .toObject(HyperVReplica2012R2EventDetails.class); - Assertions.assertEquals("daqotwfh", model.containerName()); - Assertions.assertEquals("xwgsa", model.fabricName()); - Assertions.assertEquals("c", model.remoteContainerName()); - Assertions.assertEquals("owzafczu", model.remoteFabricName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplica2012R2EventDetails model = new HyperVReplica2012R2EventDetails().withContainerName("daqotwfh") - .withFabricName("xwgsa") - .withRemoteContainerName("c") - .withRemoteFabricName("owzafczu"); - model = BinaryData.fromObject(model).toObject(HyperVReplica2012R2EventDetails.class); - Assertions.assertEquals("daqotwfh", model.containerName()); - Assertions.assertEquals("xwgsa", model.fabricName()); - Assertions.assertEquals("c", model.remoteContainerName()); - Assertions.assertEquals("owzafczu", model.remoteFabricName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureApplyRecoveryPointInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureApplyRecoveryPointInputTests.java deleted file mode 100644 index 55602f4b6b87..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureApplyRecoveryPointInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureApplyRecoveryPointInput; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzureApplyRecoveryPointInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzureApplyRecoveryPointInput model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzure\",\"primaryKekCertificatePfx\":\"ljcirvpefycdvei\",\"secondaryKekCertificatePfx\":\"tjnsx\"}") - .toObject(HyperVReplicaAzureApplyRecoveryPointInput.class); - Assertions.assertEquals("ljcirvpefycdvei", model.primaryKekCertificatePfx()); - Assertions.assertEquals("tjnsx", model.secondaryKekCertificatePfx()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzureApplyRecoveryPointInput model - = new HyperVReplicaAzureApplyRecoveryPointInput().withPrimaryKekCertificatePfx("ljcirvpefycdvei") - .withSecondaryKekCertificatePfx("tjnsx"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzureApplyRecoveryPointInput.class); - Assertions.assertEquals("ljcirvpefycdvei", model.primaryKekCertificatePfx()); - Assertions.assertEquals("tjnsx", model.secondaryKekCertificatePfx()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureDiskInputDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureDiskInputDetailsTests.java deleted file mode 100644 index e2f621b825a4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureDiskInputDetailsTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskAccountType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureDiskInputDetails; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzureDiskInputDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzureDiskInputDetails model = BinaryData.fromString( - "{\"diskId\":\"jlnsj\",\"logStorageAccountId\":\"ju\",\"diskType\":\"StandardSSD_LRS\",\"diskEncryptionSetId\":\"xqvmvuay\"}") - .toObject(HyperVReplicaAzureDiskInputDetails.class); - Assertions.assertEquals("jlnsj", model.diskId()); - Assertions.assertEquals("ju", model.logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_SSD_LRS, model.diskType()); - Assertions.assertEquals("xqvmvuay", model.diskEncryptionSetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzureDiskInputDetails model = new HyperVReplicaAzureDiskInputDetails().withDiskId("jlnsj") - .withLogStorageAccountId("ju") - .withDiskType(DiskAccountType.STANDARD_SSD_LRS) - .withDiskEncryptionSetId("xqvmvuay"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzureDiskInputDetails.class); - Assertions.assertEquals("jlnsj", model.diskId()); - Assertions.assertEquals("ju", model.logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_SSD_LRS, model.diskType()); - Assertions.assertEquals("xqvmvuay", model.diskEncryptionSetId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureEnableProtectionInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureEnableProtectionInputTests.java deleted file mode 100644 index c8f2da2d6526..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureEnableProtectionInputTests.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskAccountType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureDiskInputDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureEnableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LicenseType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SqlServerLicenseType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzureEnableProtectionInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzureEnableProtectionInput model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzure\",\"hvHostVmId\":\"adxkxeqbwpntghy\",\"vmName\":\"a\",\"osType\":\"drnxsluvlzla\",\"vhdId\":\"t\",\"targetStorageAccountId\":\"pbqhvfdqqjwkr\",\"targetAzureNetworkId\":\"zdanojis\",\"targetAzureSubnetId\":\"lmvokat\",\"enableRdpOnTargetOption\":\"tjctibpvbkaeh\",\"targetAzureVmName\":\"mzy\",\"logStorageAccountId\":\"fwakw\",\"disksToInclude\":[\"vmakxhysowljuxl\",\"bectvtfjmskdch\"],\"targetAzureV1ResourceGroupId\":\"iubavlzwpvgm\",\"targetAzureV2ResourceGroupId\":\"lkzazmgok\",\"useManagedDisks\":\"gjqafkmkrokzr\",\"targetAvailabilitySetId\":\"qetwpqrtvaozn\",\"targetAvailabilityZone\":\"ixiezeag\",\"licenseType\":\"NotSpecified\",\"sqlServerLicenseType\":\"NotSpecified\",\"targetVmSize\":\"ugedh\",\"targetProximityPlacementGroupId\":\"jstlzmblsyj\",\"useManagedDisksForReplication\":\"olctae\",\"diskType\":\"Standard_LRS\",\"disksToIncludeForManagedDisks\":[{\"diskId\":\"edjc\",\"logStorageAccountId\":\"tb\",\"diskType\":\"StandardSSD_LRS\",\"diskEncryptionSetId\":\"gdxzvsgeafgfoseh\"},{\"diskId\":\"zsxezppkkwaae\",\"logStorageAccountId\":\"yfjlpzeqto\",\"diskType\":\"Premium_LRS\",\"diskEncryptionSetId\":\"ixlajmllpquevham\"}],\"diskEncryptionSetId\":\"wg\",\"targetVmTags\":{\"qovchiqbp\":\"mkekxpkzwaqxo\"},\"seedManagedDiskTags\":{\"ztekxbyjgmsfep\":\"idu\",\"dicxdw\":\"yihpqadagrh\",\"vcxjsgbipcukdvek\":\"jfowxwy\",\"scrdp\":\"buhoduchv\"},\"targetManagedDiskTags\":{\"szekbh\":\"dyjdussp\",\"hbfrnuybfflj\":\"lkaaggkr\"},\"targetNicTags\":{\"srexxfavs\":\"mreoagsqtaad\",\"l\":\"wudohzilfm\"}}") - .toObject(HyperVReplicaAzureEnableProtectionInput.class); - Assertions.assertEquals("adxkxeqbwpntghy", model.hvHostVmId()); - Assertions.assertEquals("a", model.vmName()); - Assertions.assertEquals("drnxsluvlzla", model.osType()); - Assertions.assertEquals("t", model.vhdId()); - Assertions.assertEquals("pbqhvfdqqjwkr", model.targetStorageAccountId()); - Assertions.assertEquals("zdanojis", model.targetAzureNetworkId()); - Assertions.assertEquals("lmvokat", model.targetAzureSubnetId()); - Assertions.assertEquals("tjctibpvbkaeh", model.enableRdpOnTargetOption()); - Assertions.assertEquals("mzy", model.targetAzureVmName()); - Assertions.assertEquals("fwakw", model.logStorageAccountId()); - Assertions.assertEquals("vmakxhysowljuxl", model.disksToInclude().get(0)); - Assertions.assertEquals("iubavlzwpvgm", model.targetAzureV1ResourceGroupId()); - Assertions.assertEquals("lkzazmgok", model.targetAzureV2ResourceGroupId()); - Assertions.assertEquals("gjqafkmkrokzr", model.useManagedDisks()); - Assertions.assertEquals("qetwpqrtvaozn", model.targetAvailabilitySetId()); - Assertions.assertEquals("ixiezeag", model.targetAvailabilityZone()); - Assertions.assertEquals(LicenseType.NOT_SPECIFIED, model.licenseType()); - Assertions.assertEquals(SqlServerLicenseType.NOT_SPECIFIED, model.sqlServerLicenseType()); - Assertions.assertEquals("ugedh", model.targetVmSize()); - Assertions.assertEquals("jstlzmblsyj", model.targetProximityPlacementGroupId()); - Assertions.assertEquals("olctae", model.useManagedDisksForReplication()); - Assertions.assertEquals(DiskAccountType.STANDARD_LRS, model.diskType()); - Assertions.assertEquals("edjc", model.disksToIncludeForManagedDisks().get(0).diskId()); - Assertions.assertEquals("tb", model.disksToIncludeForManagedDisks().get(0).logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_SSD_LRS, - model.disksToIncludeForManagedDisks().get(0).diskType()); - Assertions.assertEquals("gdxzvsgeafgfoseh", model.disksToIncludeForManagedDisks().get(0).diskEncryptionSetId()); - Assertions.assertEquals("wg", model.diskEncryptionSetId()); - Assertions.assertEquals("mkekxpkzwaqxo", model.targetVmTags().get("qovchiqbp")); - Assertions.assertEquals("idu", model.seedManagedDiskTags().get("ztekxbyjgmsfep")); - Assertions.assertEquals("dyjdussp", model.targetManagedDiskTags().get("szekbh")); - Assertions.assertEquals("mreoagsqtaad", model.targetNicTags().get("srexxfavs")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzureEnableProtectionInput model - = new HyperVReplicaAzureEnableProtectionInput().withHvHostVmId("adxkxeqbwpntghy") - .withVmName("a") - .withOsType("drnxsluvlzla") - .withVhdId("t") - .withTargetStorageAccountId("pbqhvfdqqjwkr") - .withTargetAzureNetworkId("zdanojis") - .withTargetAzureSubnetId("lmvokat") - .withEnableRdpOnTargetOption("tjctibpvbkaeh") - .withTargetAzureVmName("mzy") - .withLogStorageAccountId("fwakw") - .withDisksToInclude(Arrays.asList("vmakxhysowljuxl", "bectvtfjmskdch")) - .withTargetAzureV1ResourceGroupId("iubavlzwpvgm") - .withTargetAzureV2ResourceGroupId("lkzazmgok") - .withUseManagedDisks("gjqafkmkrokzr") - .withTargetAvailabilitySetId("qetwpqrtvaozn") - .withTargetAvailabilityZone("ixiezeag") - .withLicenseType(LicenseType.NOT_SPECIFIED) - .withSqlServerLicenseType(SqlServerLicenseType.NOT_SPECIFIED) - .withTargetVmSize("ugedh") - .withTargetProximityPlacementGroupId("jstlzmblsyj") - .withUseManagedDisksForReplication("olctae") - .withDiskType(DiskAccountType.STANDARD_LRS) - .withDisksToIncludeForManagedDisks(Arrays.asList( - new HyperVReplicaAzureDiskInputDetails().withDiskId("edjc") - .withLogStorageAccountId("tb") - .withDiskType(DiskAccountType.STANDARD_SSD_LRS) - .withDiskEncryptionSetId("gdxzvsgeafgfoseh"), - new HyperVReplicaAzureDiskInputDetails().withDiskId("zsxezppkkwaae") - .withLogStorageAccountId("yfjlpzeqto") - .withDiskType(DiskAccountType.PREMIUM_LRS) - .withDiskEncryptionSetId("ixlajmllpquevham"))) - .withDiskEncryptionSetId("wg") - .withTargetVmTags(mapOf("qovchiqbp", "mkekxpkzwaqxo")) - .withSeedManagedDiskTags(mapOf("ztekxbyjgmsfep", "idu", "dicxdw", "yihpqadagrh", "vcxjsgbipcukdvek", - "jfowxwy", "scrdp", "buhoduchv")) - .withTargetManagedDiskTags(mapOf("szekbh", "dyjdussp", "hbfrnuybfflj", "lkaaggkr")) - .withTargetNicTags(mapOf("srexxfavs", "mreoagsqtaad", "l", "wudohzilfm")); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzureEnableProtectionInput.class); - Assertions.assertEquals("adxkxeqbwpntghy", model.hvHostVmId()); - Assertions.assertEquals("a", model.vmName()); - Assertions.assertEquals("drnxsluvlzla", model.osType()); - Assertions.assertEquals("t", model.vhdId()); - Assertions.assertEquals("pbqhvfdqqjwkr", model.targetStorageAccountId()); - Assertions.assertEquals("zdanojis", model.targetAzureNetworkId()); - Assertions.assertEquals("lmvokat", model.targetAzureSubnetId()); - Assertions.assertEquals("tjctibpvbkaeh", model.enableRdpOnTargetOption()); - Assertions.assertEquals("mzy", model.targetAzureVmName()); - Assertions.assertEquals("fwakw", model.logStorageAccountId()); - Assertions.assertEquals("vmakxhysowljuxl", model.disksToInclude().get(0)); - Assertions.assertEquals("iubavlzwpvgm", model.targetAzureV1ResourceGroupId()); - Assertions.assertEquals("lkzazmgok", model.targetAzureV2ResourceGroupId()); - Assertions.assertEquals("gjqafkmkrokzr", model.useManagedDisks()); - Assertions.assertEquals("qetwpqrtvaozn", model.targetAvailabilitySetId()); - Assertions.assertEquals("ixiezeag", model.targetAvailabilityZone()); - Assertions.assertEquals(LicenseType.NOT_SPECIFIED, model.licenseType()); - Assertions.assertEquals(SqlServerLicenseType.NOT_SPECIFIED, model.sqlServerLicenseType()); - Assertions.assertEquals("ugedh", model.targetVmSize()); - Assertions.assertEquals("jstlzmblsyj", model.targetProximityPlacementGroupId()); - Assertions.assertEquals("olctae", model.useManagedDisksForReplication()); - Assertions.assertEquals(DiskAccountType.STANDARD_LRS, model.diskType()); - Assertions.assertEquals("edjc", model.disksToIncludeForManagedDisks().get(0).diskId()); - Assertions.assertEquals("tb", model.disksToIncludeForManagedDisks().get(0).logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_SSD_LRS, - model.disksToIncludeForManagedDisks().get(0).diskType()); - Assertions.assertEquals("gdxzvsgeafgfoseh", model.disksToIncludeForManagedDisks().get(0).diskEncryptionSetId()); - Assertions.assertEquals("wg", model.diskEncryptionSetId()); - Assertions.assertEquals("mkekxpkzwaqxo", model.targetVmTags().get("qovchiqbp")); - Assertions.assertEquals("idu", model.seedManagedDiskTags().get("ztekxbyjgmsfep")); - Assertions.assertEquals("dyjdussp", model.targetManagedDiskTags().get("szekbh")); - Assertions.assertEquals("mreoagsqtaad", model.targetNicTags().get("srexxfavs")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureEventDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureEventDetailsTests.java deleted file mode 100644 index 7f6c745cb780..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureEventDetailsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureEventDetails; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzureEventDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzureEventDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzure\",\"containerName\":\"psimsf\",\"fabricName\":\"pofqpmbhy\",\"remoteContainerName\":\"sdrmmttjxophgerh\"}") - .toObject(HyperVReplicaAzureEventDetails.class); - Assertions.assertEquals("psimsf", model.containerName()); - Assertions.assertEquals("pofqpmbhy", model.fabricName()); - Assertions.assertEquals("sdrmmttjxophgerh", model.remoteContainerName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzureEventDetails model = new HyperVReplicaAzureEventDetails().withContainerName("psimsf") - .withFabricName("pofqpmbhy") - .withRemoteContainerName("sdrmmttjxophgerh"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzureEventDetails.class); - Assertions.assertEquals("psimsf", model.containerName()); - Assertions.assertEquals("pofqpmbhy", model.fabricName()); - Assertions.assertEquals("sdrmmttjxophgerh", model.remoteContainerName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureFailbackProviderInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureFailbackProviderInputTests.java deleted file mode 100644 index fcaf55f23f5e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureFailbackProviderInputTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureFailbackProviderInput; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzureFailbackProviderInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzureFailbackProviderInput model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzureFailback\",\"dataSyncOption\":\"vgohtw\",\"recoveryVmCreationOption\":\"qilrixysfn\",\"providerIdForAlternateRecovery\":\"sqywwwmhkru\"}") - .toObject(HyperVReplicaAzureFailbackProviderInput.class); - Assertions.assertEquals("vgohtw", model.dataSyncOption()); - Assertions.assertEquals("qilrixysfn", model.recoveryVmCreationOption()); - Assertions.assertEquals("sqywwwmhkru", model.providerIdForAlternateRecovery()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzureFailbackProviderInput model - = new HyperVReplicaAzureFailbackProviderInput().withDataSyncOption("vgohtw") - .withRecoveryVmCreationOption("qilrixysfn") - .withProviderIdForAlternateRecovery("sqywwwmhkru"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzureFailbackProviderInput.class); - Assertions.assertEquals("vgohtw", model.dataSyncOption()); - Assertions.assertEquals("qilrixysfn", model.recoveryVmCreationOption()); - Assertions.assertEquals("sqywwwmhkru", model.providerIdForAlternateRecovery()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureManagedDiskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureManagedDiskDetailsTests.java deleted file mode 100644 index d782ccf02125..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureManagedDiskDetailsTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureManagedDiskDetails; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzureManagedDiskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzureManagedDiskDetails model = BinaryData.fromString( - "{\"diskId\":\"edrympmlqo\",\"seedManagedDiskId\":\"hzdue\",\"replicaDiskType\":\"hapfjiik\",\"diskEncryptionSetId\":\"diqfliejhpclbi\"}") - .toObject(HyperVReplicaAzureManagedDiskDetails.class); - Assertions.assertEquals("edrympmlqo", model.diskId()); - Assertions.assertEquals("hzdue", model.seedManagedDiskId()); - Assertions.assertEquals("hapfjiik", model.replicaDiskType()); - Assertions.assertEquals("diqfliejhpclbi", model.diskEncryptionSetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzureManagedDiskDetails model = new HyperVReplicaAzureManagedDiskDetails().withDiskId("edrympmlqo") - .withSeedManagedDiskId("hzdue") - .withReplicaDiskType("hapfjiik") - .withDiskEncryptionSetId("diqfliejhpclbi"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzureManagedDiskDetails.class); - Assertions.assertEquals("edrympmlqo", model.diskId()); - Assertions.assertEquals("hzdue", model.seedManagedDiskId()); - Assertions.assertEquals("hapfjiik", model.replicaDiskType()); - Assertions.assertEquals("diqfliejhpclbi", model.diskEncryptionSetId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzurePlannedFailoverProviderInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzurePlannedFailoverProviderInputTests.java deleted file mode 100644 index 3465bbea7447..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzurePlannedFailoverProviderInputTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzurePlannedFailoverProviderInput; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzurePlannedFailoverProviderInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzurePlannedFailoverProviderInput model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzure\",\"primaryKekCertificatePfx\":\"fsbw\",\"secondaryKekCertificatePfx\":\"ivbvzi\",\"recoveryPointId\":\"wxgoooxzpra\",\"osUpgradeVersion\":\"s\"}") - .toObject(HyperVReplicaAzurePlannedFailoverProviderInput.class); - Assertions.assertEquals("fsbw", model.primaryKekCertificatePfx()); - Assertions.assertEquals("ivbvzi", model.secondaryKekCertificatePfx()); - Assertions.assertEquals("wxgoooxzpra", model.recoveryPointId()); - Assertions.assertEquals("s", model.osUpgradeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzurePlannedFailoverProviderInput model - = new HyperVReplicaAzurePlannedFailoverProviderInput().withPrimaryKekCertificatePfx("fsbw") - .withSecondaryKekCertificatePfx("ivbvzi") - .withRecoveryPointId("wxgoooxzpra") - .withOsUpgradeVersion("s"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzurePlannedFailoverProviderInput.class); - Assertions.assertEquals("fsbw", model.primaryKekCertificatePfx()); - Assertions.assertEquals("ivbvzi", model.secondaryKekCertificatePfx()); - Assertions.assertEquals("wxgoooxzpra", model.recoveryPointId()); - Assertions.assertEquals("s", model.osUpgradeVersion()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzurePolicyDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzurePolicyDetailsTests.java deleted file mode 100644 index 0c6f29731c0f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzurePolicyDetailsTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzurePolicyDetails; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzurePolicyDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzurePolicyDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzure\",\"recoveryPointHistoryDurationInHours\":779585791,\"applicationConsistentSnapshotFrequencyInHours\":1492620534,\"replicationInterval\":2041507399,\"onlineReplicationStartTime\":\"igjsugswhgs\",\"encryption\":\"dkwwn\",\"activeStorageAccountId\":\"foct\"}") - .toObject(HyperVReplicaAzurePolicyDetails.class); - Assertions.assertEquals(779585791, model.recoveryPointHistoryDurationInHours()); - Assertions.assertEquals(1492620534, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals(2041507399, model.replicationInterval()); - Assertions.assertEquals("igjsugswhgs", model.onlineReplicationStartTime()); - Assertions.assertEquals("dkwwn", model.encryption()); - Assertions.assertEquals("foct", model.activeStorageAccountId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzurePolicyDetails model - = new HyperVReplicaAzurePolicyDetails().withRecoveryPointHistoryDurationInHours(779585791) - .withApplicationConsistentSnapshotFrequencyInHours(1492620534) - .withReplicationInterval(2041507399) - .withOnlineReplicationStartTime("igjsugswhgs") - .withEncryption("dkwwn") - .withActiveStorageAccountId("foct"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzurePolicyDetails.class); - Assertions.assertEquals(779585791, model.recoveryPointHistoryDurationInHours()); - Assertions.assertEquals(1492620534, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals(2041507399, model.replicationInterval()); - Assertions.assertEquals("igjsugswhgs", model.onlineReplicationStartTime()); - Assertions.assertEquals("dkwwn", model.encryption()); - Assertions.assertEquals("foct", model.activeStorageAccountId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzurePolicyInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzurePolicyInputTests.java deleted file mode 100644 index 473e4ddc6ba3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzurePolicyInputTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzurePolicyInput; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzurePolicyInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzurePolicyInput model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzure\",\"recoveryPointHistoryDuration\":498645411,\"applicationConsistentSnapshotFrequencyInHours\":2120923366,\"replicationInterval\":394441796,\"onlineReplicationStartTime\":\"wsxbgnvkervqc\",\"storageAccounts\":[\"dhrsxqvzvsp\",\"bdsrgfajglzrsu\",\"klrxhjnltce\",\"jdvqy\"]}") - .toObject(HyperVReplicaAzurePolicyInput.class); - Assertions.assertEquals(498645411, model.recoveryPointHistoryDuration()); - Assertions.assertEquals(2120923366, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals(394441796, model.replicationInterval()); - Assertions.assertEquals("wsxbgnvkervqc", model.onlineReplicationStartTime()); - Assertions.assertEquals("dhrsxqvzvsp", model.storageAccounts().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzurePolicyInput model - = new HyperVReplicaAzurePolicyInput().withRecoveryPointHistoryDuration(498645411) - .withApplicationConsistentSnapshotFrequencyInHours(2120923366) - .withReplicationInterval(394441796) - .withOnlineReplicationStartTime("wsxbgnvkervqc") - .withStorageAccounts(Arrays.asList("dhrsxqvzvsp", "bdsrgfajglzrsu", "klrxhjnltce", "jdvqy")); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzurePolicyInput.class); - Assertions.assertEquals(498645411, model.recoveryPointHistoryDuration()); - Assertions.assertEquals(2120923366, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals(394441796, model.replicationInterval()); - Assertions.assertEquals("wsxbgnvkervqc", model.onlineReplicationStartTime()); - Assertions.assertEquals("dhrsxqvzvsp", model.storageAccounts().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureReplicationDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureReplicationDetailsTests.java deleted file mode 100644 index 01d7d23a2df4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureReplicationDetailsTests.java +++ /dev/null @@ -1,408 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AzureVmDiskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureManagedDiskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureReplicationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InitialReplicationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IpConfigDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OSDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OSUpgradeSupportedVersions; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMNicDetails; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzureReplicationDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzureReplicationDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzure\",\"azureVmDiskDetails\":[{\"vhdType\":\"qkwaruwd\",\"vhdId\":\"qzxoebwgjxbi\",\"diskId\":\"nbau\",\"vhdName\":\"tzvp\",\"maxSizeMB\":\"lozkxbzrp\",\"targetDiskLocation\":\"plssanbtttk\",\"targetDiskName\":\"uxunrswg\",\"lunId\":\"jhboyikebhuhks\",\"diskEncryptionSetId\":\"wlokhueoijyzcq\",\"customTargetDiskName\":\"zqzu\"}],\"recoveryAzureVmName\":\"s\",\"recoveryAzureVMSize\":\"ej\",\"recoveryAzureStorageAccount\":\"dwtfx\",\"recoveryAzureLogStorageAccountId\":\"pqa\",\"lastReplicatedTime\":\"2021-12-08T02:26:36Z\",\"rpoInSeconds\":5044054827498032259,\"lastRpoCalculatedTime\":\"2021-10-17T04:21:19Z\",\"vmId\":\"bmxsnxoc\",\"vmProtectionState\":\"llojkpoyhgwwdj\",\"vmProtectionStateDescription\":\"dbdljz\",\"initialReplicationDetails\":{\"initialReplicationType\":\"rcvuqbsgzlrqhb\",\"initialReplicationProgressPercentage\":\"qogdx\"},\"vmNics\":[{\"nicId\":\"p\",\"replicaNicId\":\"x\",\"sourceNicArmId\":\"lflec\",\"vMNetworkName\":\"inxojjlux\",\"recoveryVMNetworkId\":\"hilzzdzzq\",\"ipConfigs\":[{\"name\":\"za\",\"isPrimary\":true,\"subnetName\":\"ibqlotokhtvwtaz\",\"staticIPAddress\":\"cqwwxwj\",\"ipAddressType\":\"fgwhnkbtlwljs\",\"isSeletedForFailover\":true,\"recoverySubnetName\":\"sn\",\"recoveryStaticIPAddress\":\"kpwolg\",\"recoveryIPAddressType\":\"ubxbteogfgfiijr\",\"recoveryPublicIPAddressId\":\"wlefksxqceazfpxg\",\"recoveryLBBackendAddressPoolIds\":[\"vzvluyq\",\"aiossscyvaifp\"],\"tfoSubnetName\":\"acvfyeowps\",\"tfoStaticIPAddress\":\"tjdhsoymhpvtyq\",\"tfoPublicIPAddressId\":\"tehdpboujs\",\"tfoLBBackendAddressPoolIds\":[\"vvdshxcdedsue\",\"ygnxcgjtfrnqukt\",\"fnslnlrxsmy\",\"trwntfmtbgw\"]},{\"name\":\"xwnaz\",\"isPrimary\":true,\"subnetName\":\"drey\",\"staticIPAddress\":\"whsetwwjwzzqs\",\"ipAddressType\":\"zuukykcyqhyqq\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"ykeys\",\"recoveryStaticIPAddress\":\"wfopazdazg\",\"recoveryIPAddressType\":\"qgpewqcfutmdpvoz\",\"recoveryPublicIPAddressId\":\"qjbknl\",\"recoveryLBBackendAddressPoolIds\":[\"ctzeyowmndc\",\"v\",\"wzqauxzanhmkvf\",\"uwkudrbcp\"],\"tfoSubnetName\":\"xudqyemebunaucmc\",\"tfoStaticIPAddress\":\"tneemmjauwcgxef\",\"tfoPublicIPAddressId\":\"haitranize\",\"tfoLBBackendAddressPoolIds\":[\"udasmxubvfbng\",\"coce\",\"hpriylfm\"]}],\"selectionType\":\"trauds\",\"recoveryNetworkSecurityGroupId\":\"lcdculregpq\",\"enableAcceleratedNetworkingOnRecovery\":false,\"tfoVMNetworkId\":\"hvrztnvg\",\"tfoNetworkSecurityGroupId\":\"hqrdgrtwmewjzlpy\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"zzwjcayerzrran\",\"recoveryNicResourceGroupName\":\"bylpolwzr\",\"reuseExistingNic\":true,\"tfoRecoveryNicName\":\"l\",\"tfoRecoveryNicResourceGroupName\":\"nkfscjfn\",\"tfoReuseExistingNic\":true,\"targetNicName\":\"uagfqwtltngv\"},{\"nicId\":\"e\",\"replicaNicId\":\"trklzmijajwol\",\"sourceNicArmId\":\"s\",\"vMNetworkName\":\"ghmp\",\"recoveryVMNetworkId\":\"wl\",\"ipConfigs\":[{\"name\":\"igt\",\"isPrimary\":true,\"subnetName\":\"bxqla\",\"staticIPAddress\":\"nssovyxpav\",\"ipAddressType\":\"nievwffc\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"zslp\",\"recoveryStaticIPAddress\":\"gcbdsvalpnptw\",\"recoveryIPAddressType\":\"kx\",\"recoveryPublicIPAddressId\":\"azwu\",\"recoveryLBBackendAddressPoolIds\":[\"qvn\",\"obfelhldiuhz\",\"gqlmfaewzgi\"],\"tfoSubnetName\":\"jpxpqhttqhnmhkre\",\"tfoStaticIPAddress\":\"dsuxheqdgcrux\",\"tfoPublicIPAddressId\":\"inymmqgwokmikp\",\"tfoLBBackendAddressPoolIds\":[\"bmjxuvjipf\",\"vhax\",\"vwzaehp\"]},{\"name\":\"thd\",\"isPrimary\":true,\"subnetName\":\"etatlakf\",\"staticIPAddress\":\"ixwgiksbbvtooxrp\",\"ipAddressType\":\"wp\",\"isSeletedForFailover\":true,\"recoverySubnetName\":\"jtnhtukfac\",\"recoveryStaticIPAddress\":\"mbf\",\"recoveryIPAddressType\":\"umeezbxvqxb\",\"recoveryPublicIPAddressId\":\"vwcga\",\"recoveryLBBackendAddressPoolIds\":[\"mtmjzw\",\"uqgovsxpwwztjfm\",\"khtgfredmlscgrll\",\"cnaovjo\"],\"tfoSubnetName\":\"zhpabac\",\"tfoStaticIPAddress\":\"lyotg\",\"tfoPublicIPAddressId\":\"sxnsrqorcge\",\"tfoLBBackendAddressPoolIds\":[\"c\",\"bxeetqujxcxxqn\",\"cqjkedwqu\",\"cgojmrv\"]},{\"name\":\"wjongzs\",\"isPrimary\":false,\"subnetName\":\"rsilcchskxxkansb\",\"staticIPAddress\":\"ia\",\"ipAddressType\":\"vtojrulfuctejr\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"jzhxlyubqjrost\",\"recoveryStaticIPAddress\":\"jeqmtzzbeqrzt\",\"recoveryIPAddressType\":\"alx\",\"recoveryPublicIPAddressId\":\"habsrwrsnrh\",\"recoveryLBBackendAddressPoolIds\":[\"tiwkkvyan\"],\"tfoSubnetName\":\"vvcsemsvuvdjkqxe\",\"tfoStaticIPAddress\":\"mmlivrjjxnw\",\"tfoPublicIPAddressId\":\"chp\",\"tfoLBBackendAddressPoolIds\":[\"lehzlxpgfq\",\"wzpwiibel\",\"cerwkwbpjxljtxbu\",\"qtbxxniuisdzh\"]}],\"selectionType\":\"d\",\"recoveryNetworkSecurityGroupId\":\"pagsecnad\",\"enableAcceleratedNetworkingOnRecovery\":true,\"tfoVMNetworkId\":\"r\",\"tfoNetworkSecurityGroupId\":\"fllmqiy\",\"enableAcceleratedNetworkingOnTfo\":true,\"recoveryNicName\":\"ellnkkii\",\"recoveryNicResourceGroupName\":\"mtum\",\"reuseExistingNic\":false,\"tfoRecoveryNicName\":\"djf\",\"tfoRecoveryNicResourceGroupName\":\"xroq\",\"tfoReuseExistingNic\":true,\"targetNicName\":\"lr\"}],\"selectedRecoveryAzureNetworkId\":\"ncanlduwzor\",\"selectedSourceNicId\":\"bm\",\"encryption\":\"qk\",\"oSDetails\":{\"osType\":\"mxkqvf\",\"productType\":\"pdxcltuubwy\",\"osEdition\":\"jbowcpj\",\"oSVersion\":\"uqgixex\",\"oSMajorVersion\":\"dfbwljav\",\"oSMinorVersion\":\"erkjddv\"},\"sourceVmRamSizeInMB\":436483933,\"sourceVmCpuCount\":1692980760,\"enableRdpOnTargetOption\":\"ftcvbii\",\"recoveryAzureResourceGroupId\":\"ksdwgdnk\",\"recoveryAvailabilitySetId\":\"gmwdh\",\"targetAvailabilityZone\":\"buvczldbglzoutb\",\"targetProximityPlacementGroupId\":\"qgz\",\"useManagedDisks\":\"ajclyzgsnorbjg\",\"licenseType\":\"zjotvmrxkhlo\",\"sqlServerLicenseType\":\"vjb\",\"lastRecoveryPointReceived\":\"2021-05-11T18:13:33Z\",\"targetVmTags\":{\"iyu\":\"qayfl\",\"rswhbuubpyro\":\"snuudtelvhyibdr\"},\"seedManagedDiskTags\":{\"czevjnn\":\"oxztfwfqch\",\"mhzcgkrepdqh\":\"tagfyvrtpqp\",\"mvxqab\":\"yhwqw\",\"eoxinhgre\":\"km\"},\"targetManagedDiskTags\":{\"angp\":\"whlpuzjpceezn\",\"phmsexroq\":\"bfaxyxzlbc\",\"nfee\":\"ndktxfv\"},\"targetNicTags\":{\"bgnixxoww\":\"krie\",\"p\":\"kyfwnwpiwxeiicr\",\"dm\":\"pk\"},\"protectedManagedDisks\":[{\"diskId\":\"jvskwsdgkjg\",\"seedManagedDiskId\":\"cwrase\",\"replicaDiskType\":\"efcvo\",\"diskEncryptionSetId\":\"woqartwy\"},{\"diskId\":\"i\",\"seedManagedDiskId\":\"advatdavuqmcb\",\"replicaDiskType\":\"sfobjl\",\"diskEncryptionSetId\":\"vjezcjumvpsim\"},{\"diskId\":\"yoi\",\"seedManagedDiskId\":\"kmi\",\"replicaDiskType\":\"nnraclibbfqpspkl\",\"diskEncryptionSetId\":\"ydgnha\"},{\"diskId\":\"wuk\",\"seedManagedDiskId\":\"zgpmnma\",\"replicaDiskType\":\"ddqil\",\"diskEncryptionSetId\":\"d\"}],\"allAvailableOSUpgradeConfigurations\":[{\"supportedSourceOsVersion\":\"fpcvstclgqrvwerf\",\"supportedTargetOsVersions\":[\"smtbljjehhcif\",\"wdv\",\"tbrekqhsqhtf\"]}]}") - .toObject(HyperVReplicaAzureReplicationDetails.class); - Assertions.assertEquals("qkwaruwd", model.azureVmDiskDetails().get(0).vhdType()); - Assertions.assertEquals("qzxoebwgjxbi", model.azureVmDiskDetails().get(0).vhdId()); - Assertions.assertEquals("nbau", model.azureVmDiskDetails().get(0).diskId()); - Assertions.assertEquals("tzvp", model.azureVmDiskDetails().get(0).vhdName()); - Assertions.assertEquals("lozkxbzrp", model.azureVmDiskDetails().get(0).maxSizeMB()); - Assertions.assertEquals("plssanbtttk", model.azureVmDiskDetails().get(0).targetDiskLocation()); - Assertions.assertEquals("uxunrswg", model.azureVmDiskDetails().get(0).targetDiskName()); - Assertions.assertEquals("jhboyikebhuhks", model.azureVmDiskDetails().get(0).lunId()); - Assertions.assertEquals("wlokhueoijyzcq", model.azureVmDiskDetails().get(0).diskEncryptionSetId()); - Assertions.assertEquals("zqzu", model.azureVmDiskDetails().get(0).customTargetDiskName()); - Assertions.assertEquals("s", model.recoveryAzureVmName()); - Assertions.assertEquals("ej", model.recoveryAzureVMSize()); - Assertions.assertEquals("dwtfx", model.recoveryAzureStorageAccount()); - Assertions.assertEquals("pqa", model.recoveryAzureLogStorageAccountId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T02:26:36Z"), model.lastReplicatedTime()); - Assertions.assertEquals(5044054827498032259L, model.rpoInSeconds()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T04:21:19Z"), model.lastRpoCalculatedTime()); - Assertions.assertEquals("bmxsnxoc", model.vmId()); - Assertions.assertEquals("llojkpoyhgwwdj", model.vmProtectionState()); - Assertions.assertEquals("dbdljz", model.vmProtectionStateDescription()); - Assertions.assertEquals("rcvuqbsgzlrqhb", model.initialReplicationDetails().initialReplicationType()); - Assertions.assertEquals("qogdx", model.initialReplicationDetails().initialReplicationProgressPercentage()); - Assertions.assertEquals("p", model.vmNics().get(0).nicId()); - Assertions.assertEquals("x", model.vmNics().get(0).replicaNicId()); - Assertions.assertEquals("lflec", model.vmNics().get(0).sourceNicArmId()); - Assertions.assertEquals("inxojjlux", model.vmNics().get(0).vMNetworkName()); - Assertions.assertEquals("hilzzdzzq", model.vmNics().get(0).recoveryVMNetworkId()); - Assertions.assertEquals("za", model.vmNics().get(0).ipConfigs().get(0).name()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isPrimary()); - Assertions.assertEquals("ibqlotokhtvwtaz", model.vmNics().get(0).ipConfigs().get(0).subnetName()); - Assertions.assertEquals("cqwwxwj", model.vmNics().get(0).ipConfigs().get(0).staticIpAddress()); - Assertions.assertEquals("fgwhnkbtlwljs", model.vmNics().get(0).ipConfigs().get(0).ipAddressType()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("sn", model.vmNics().get(0).ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("kpwolg", model.vmNics().get(0).ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("ubxbteogfgfiijr", model.vmNics().get(0).ipConfigs().get(0).recoveryIpAddressType()); - Assertions.assertEquals("wlefksxqceazfpxg", - model.vmNics().get(0).ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("vzvluyq", - model.vmNics().get(0).ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("acvfyeowps", model.vmNics().get(0).ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("tjdhsoymhpvtyq", model.vmNics().get(0).ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("tehdpboujs", model.vmNics().get(0).ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("vvdshxcdedsue", - model.vmNics().get(0).ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("trauds", model.vmNics().get(0).selectionType()); - Assertions.assertEquals("lcdculregpq", model.vmNics().get(0).recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("hvrztnvg", model.vmNics().get(0).tfoVMNetworkId()); - Assertions.assertEquals("hqrdgrtwmewjzlpy", model.vmNics().get(0).tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("zzwjcayerzrran", model.vmNics().get(0).recoveryNicName()); - Assertions.assertEquals("bylpolwzr", model.vmNics().get(0).recoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).reuseExistingNic()); - Assertions.assertEquals("l", model.vmNics().get(0).tfoRecoveryNicName()); - Assertions.assertEquals("nkfscjfn", model.vmNics().get(0).tfoRecoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).tfoReuseExistingNic()); - Assertions.assertEquals("uagfqwtltngv", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals("ncanlduwzor", model.selectedRecoveryAzureNetworkId()); - Assertions.assertEquals("bm", model.selectedSourceNicId()); - Assertions.assertEquals("qk", model.encryption()); - Assertions.assertEquals("mxkqvf", model.oSDetails().osType()); - Assertions.assertEquals("pdxcltuubwy", model.oSDetails().productType()); - Assertions.assertEquals("jbowcpj", model.oSDetails().osEdition()); - Assertions.assertEquals("uqgixex", model.oSDetails().oSVersion()); - Assertions.assertEquals("dfbwljav", model.oSDetails().oSMajorVersion()); - Assertions.assertEquals("erkjddv", model.oSDetails().oSMinorVersion()); - Assertions.assertEquals(436483933, model.sourceVmRamSizeInMB()); - Assertions.assertEquals(1692980760, model.sourceVmCpuCount()); - Assertions.assertEquals("ftcvbii", model.enableRdpOnTargetOption()); - Assertions.assertEquals("ksdwgdnk", model.recoveryAzureResourceGroupId()); - Assertions.assertEquals("gmwdh", model.recoveryAvailabilitySetId()); - Assertions.assertEquals("buvczldbglzoutb", model.targetAvailabilityZone()); - Assertions.assertEquals("qgz", model.targetProximityPlacementGroupId()); - Assertions.assertEquals("ajclyzgsnorbjg", model.useManagedDisks()); - Assertions.assertEquals("zjotvmrxkhlo", model.licenseType()); - Assertions.assertEquals("vjb", model.sqlServerLicenseType()); - Assertions.assertEquals("qayfl", model.targetVmTags().get("iyu")); - Assertions.assertEquals("oxztfwfqch", model.seedManagedDiskTags().get("czevjnn")); - Assertions.assertEquals("whlpuzjpceezn", model.targetManagedDiskTags().get("angp")); - Assertions.assertEquals("krie", model.targetNicTags().get("bgnixxoww")); - Assertions.assertEquals("jvskwsdgkjg", model.protectedManagedDisks().get(0).diskId()); - Assertions.assertEquals("cwrase", model.protectedManagedDisks().get(0).seedManagedDiskId()); - Assertions.assertEquals("efcvo", model.protectedManagedDisks().get(0).replicaDiskType()); - Assertions.assertEquals("woqartwy", model.protectedManagedDisks().get(0).diskEncryptionSetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzureReplicationDetails model - = new HyperVReplicaAzureReplicationDetails() - .withAzureVmDiskDetails(Arrays.asList(new AzureVmDiskDetails().withVhdType("qkwaruwd") - .withVhdId("qzxoebwgjxbi") - .withDiskId("nbau") - .withVhdName("tzvp") - .withMaxSizeMB("lozkxbzrp") - .withTargetDiskLocation("plssanbtttk") - .withTargetDiskName("uxunrswg") - .withLunId("jhboyikebhuhks") - .withDiskEncryptionSetId("wlokhueoijyzcq") - .withCustomTargetDiskName("zqzu"))) - .withRecoveryAzureVmName("s") - .withRecoveryAzureVMSize("ej") - .withRecoveryAzureStorageAccount("dwtfx") - .withRecoveryAzureLogStorageAccountId("pqa") - .withLastReplicatedTime(OffsetDateTime.parse("2021-12-08T02:26:36Z")) - .withRpoInSeconds(5044054827498032259L) - .withLastRpoCalculatedTime(OffsetDateTime.parse("2021-10-17T04:21:19Z")) - .withVmId("bmxsnxoc") - .withVmProtectionState("llojkpoyhgwwdj") - .withVmProtectionStateDescription("dbdljz") - .withInitialReplicationDetails( - new InitialReplicationDetails().withInitialReplicationType("rcvuqbsgzlrqhb") - .withInitialReplicationProgressPercentage("qogdx")) - .withVmNics( - Arrays - .asList( - new VMNicDetails().withNicId("p") - .withReplicaNicId("x") - .withSourceNicArmId("lflec") - .withVMNetworkName("inxojjlux") - .withRecoveryVMNetworkId("hilzzdzzq") - .withIpConfigs( - Arrays.asList( - new IpConfigDetails().withName("za") - .withIsPrimary(true) - .withSubnetName("ibqlotokhtvwtaz") - .withStaticIpAddress("cqwwxwj") - .withIpAddressType("fgwhnkbtlwljs") - .withIsSeletedForFailover(true) - .withRecoverySubnetName("sn") - .withRecoveryStaticIpAddress("kpwolg") - .withRecoveryIpAddressType("ubxbteogfgfiijr") - .withRecoveryPublicIpAddressId("wlefksxqceazfpxg") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("vzvluyq", "aiossscyvaifp")) - .withTfoSubnetName("acvfyeowps") - .withTfoStaticIpAddress("tjdhsoymhpvtyq") - .withTfoPublicIpAddressId("tehdpboujs") - .withTfoLBBackendAddressPoolIds(Arrays.asList("vvdshxcdedsue", - "ygnxcgjtfrnqukt", "fnslnlrxsmy", "trwntfmtbgw")), - new IpConfigDetails().withName("xwnaz") - .withIsPrimary(true) - .withSubnetName("drey") - .withStaticIpAddress("whsetwwjwzzqs") - .withIpAddressType("zuukykcyqhyqq") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("ykeys") - .withRecoveryStaticIpAddress("wfopazdazg") - .withRecoveryIpAddressType("qgpewqcfutmdpvoz") - .withRecoveryPublicIpAddressId("qjbknl") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("ctzeyowmndc", "v", "wzqauxzanhmkvf", "uwkudrbcp")) - .withTfoSubnetName("xudqyemebunaucmc") - .withTfoStaticIpAddress("tneemmjauwcgxef") - .withTfoPublicIpAddressId("haitranize") - .withTfoLBBackendAddressPoolIds( - Arrays.asList("udasmxubvfbng", "coce", "hpriylfm")))) - .withSelectionType("trauds") - .withRecoveryNetworkSecurityGroupId("lcdculregpq") - .withEnableAcceleratedNetworkingOnRecovery(false) - .withTfoVMNetworkId("hvrztnvg") - .withTfoNetworkSecurityGroupId("hqrdgrtwmewjzlpy") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("zzwjcayerzrran") - .withRecoveryNicResourceGroupName("bylpolwzr") - .withReuseExistingNic(true) - .withTfoRecoveryNicName("l") - .withTfoRecoveryNicResourceGroupName("nkfscjfn") - .withTfoReuseExistingNic(true) - .withTargetNicName("uagfqwtltngv"), - new VMNicDetails().withNicId("e") - .withReplicaNicId("trklzmijajwol") - .withSourceNicArmId("s") - .withVMNetworkName("ghmp") - .withRecoveryVMNetworkId("wl") - .withIpConfigs(Arrays.asList( - new IpConfigDetails().withName("igt") - .withIsPrimary(true) - .withSubnetName("bxqla") - .withStaticIpAddress("nssovyxpav") - .withIpAddressType("nievwffc") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("zslp") - .withRecoveryStaticIpAddress("gcbdsvalpnptw") - .withRecoveryIpAddressType("kx") - .withRecoveryPublicIpAddressId("azwu") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("qvn", "obfelhldiuhz", "gqlmfaewzgi")) - .withTfoSubnetName("jpxpqhttqhnmhkre") - .withTfoStaticIpAddress("dsuxheqdgcrux") - .withTfoPublicIpAddressId("inymmqgwokmikp") - .withTfoLBBackendAddressPoolIds(Arrays.asList("bmjxuvjipf", "vhax", "vwzaehp")), - new IpConfigDetails().withName("thd") - .withIsPrimary(true) - .withSubnetName("etatlakf") - .withStaticIpAddress("ixwgiksbbvtooxrp") - .withIpAddressType("wp") - .withIsSeletedForFailover(true) - .withRecoverySubnetName("jtnhtukfac") - .withRecoveryStaticIpAddress("mbf") - .withRecoveryIpAddressType("umeezbxvqxb") - .withRecoveryPublicIpAddressId("vwcga") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("mtmjzw", "uqgovsxpwwztjfm", "khtgfredmlscgrll", "cnaovjo")) - .withTfoSubnetName("zhpabac") - .withTfoStaticIpAddress("lyotg") - .withTfoPublicIpAddressId("sxnsrqorcge") - .withTfoLBBackendAddressPoolIds( - Arrays.asList("c", "bxeetqujxcxxqn", "cqjkedwqu", "cgojmrv")), - new IpConfigDetails().withName("wjongzs") - .withIsPrimary(false) - .withSubnetName("rsilcchskxxkansb") - .withStaticIpAddress("ia") - .withIpAddressType("vtojrulfuctejr") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("jzhxlyubqjrost") - .withRecoveryStaticIpAddress("jeqmtzzbeqrzt") - .withRecoveryIpAddressType("alx") - .withRecoveryPublicIpAddressId("habsrwrsnrh") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("tiwkkvyan")) - .withTfoSubnetName("vvcsemsvuvdjkqxe") - .withTfoStaticIpAddress("mmlivrjjxnw") - .withTfoPublicIpAddressId("chp") - .withTfoLBBackendAddressPoolIds(Arrays.asList("lehzlxpgfq", "wzpwiibel", - "cerwkwbpjxljtxbu", "qtbxxniuisdzh")))) - .withSelectionType("d") - .withRecoveryNetworkSecurityGroupId("pagsecnad") - .withEnableAcceleratedNetworkingOnRecovery(true) - .withTfoVMNetworkId("r") - .withTfoNetworkSecurityGroupId("fllmqiy") - .withEnableAcceleratedNetworkingOnTfo(true) - .withRecoveryNicName("ellnkkii") - .withRecoveryNicResourceGroupName("mtum") - .withReuseExistingNic(false) - .withTfoRecoveryNicName("djf") - .withTfoRecoveryNicResourceGroupName("xroq") - .withTfoReuseExistingNic(true) - .withTargetNicName("lr"))) - .withSelectedRecoveryAzureNetworkId("ncanlduwzor") - .withSelectedSourceNicId("bm") - .withEncryption("qk") - .withOSDetails(new OSDetails().withOsType("mxkqvf") - .withProductType("pdxcltuubwy") - .withOsEdition("jbowcpj") - .withOSVersion("uqgixex") - .withOSMajorVersion("dfbwljav") - .withOSMinorVersion("erkjddv")) - .withSourceVmRamSizeInMB(436483933) - .withSourceVmCpuCount(1692980760) - .withEnableRdpOnTargetOption("ftcvbii") - .withRecoveryAzureResourceGroupId("ksdwgdnk") - .withRecoveryAvailabilitySetId("gmwdh") - .withTargetAvailabilityZone("buvczldbglzoutb") - .withTargetProximityPlacementGroupId("qgz") - .withUseManagedDisks("ajclyzgsnorbjg") - .withLicenseType("zjotvmrxkhlo") - .withSqlServerLicenseType("vjb") - .withTargetVmTags(mapOf("iyu", "qayfl", "rswhbuubpyro", "snuudtelvhyibdr")) - .withSeedManagedDiskTags( - mapOf("czevjnn", "oxztfwfqch", "mhzcgkrepdqh", "tagfyvrtpqp", "mvxqab", "yhwqw", "eoxinhgre", "km")) - .withTargetManagedDiskTags(mapOf("angp", "whlpuzjpceezn", "phmsexroq", "bfaxyxzlbc", "nfee", "ndktxfv")) - .withTargetNicTags(mapOf("bgnixxoww", "krie", "p", "kyfwnwpiwxeiicr", "dm", "pk")) - .withProtectedManagedDisks(Arrays.asList( - new HyperVReplicaAzureManagedDiskDetails().withDiskId("jvskwsdgkjg") - .withSeedManagedDiskId("cwrase") - .withReplicaDiskType("efcvo") - .withDiskEncryptionSetId("woqartwy"), - new HyperVReplicaAzureManagedDiskDetails().withDiskId("i") - .withSeedManagedDiskId("advatdavuqmcb") - .withReplicaDiskType("sfobjl") - .withDiskEncryptionSetId("vjezcjumvpsim"), - new HyperVReplicaAzureManagedDiskDetails().withDiskId("yoi") - .withSeedManagedDiskId("kmi") - .withReplicaDiskType("nnraclibbfqpspkl") - .withDiskEncryptionSetId("ydgnha"), - new HyperVReplicaAzureManagedDiskDetails().withDiskId("wuk") - .withSeedManagedDiskId("zgpmnma") - .withReplicaDiskType("ddqil") - .withDiskEncryptionSetId("d"))) - .withAllAvailableOSUpgradeConfigurations(Arrays.asList(new OSUpgradeSupportedVersions())); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzureReplicationDetails.class); - Assertions.assertEquals("qkwaruwd", model.azureVmDiskDetails().get(0).vhdType()); - Assertions.assertEquals("qzxoebwgjxbi", model.azureVmDiskDetails().get(0).vhdId()); - Assertions.assertEquals("nbau", model.azureVmDiskDetails().get(0).diskId()); - Assertions.assertEquals("tzvp", model.azureVmDiskDetails().get(0).vhdName()); - Assertions.assertEquals("lozkxbzrp", model.azureVmDiskDetails().get(0).maxSizeMB()); - Assertions.assertEquals("plssanbtttk", model.azureVmDiskDetails().get(0).targetDiskLocation()); - Assertions.assertEquals("uxunrswg", model.azureVmDiskDetails().get(0).targetDiskName()); - Assertions.assertEquals("jhboyikebhuhks", model.azureVmDiskDetails().get(0).lunId()); - Assertions.assertEquals("wlokhueoijyzcq", model.azureVmDiskDetails().get(0).diskEncryptionSetId()); - Assertions.assertEquals("zqzu", model.azureVmDiskDetails().get(0).customTargetDiskName()); - Assertions.assertEquals("s", model.recoveryAzureVmName()); - Assertions.assertEquals("ej", model.recoveryAzureVMSize()); - Assertions.assertEquals("dwtfx", model.recoveryAzureStorageAccount()); - Assertions.assertEquals("pqa", model.recoveryAzureLogStorageAccountId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T02:26:36Z"), model.lastReplicatedTime()); - Assertions.assertEquals(5044054827498032259L, model.rpoInSeconds()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T04:21:19Z"), model.lastRpoCalculatedTime()); - Assertions.assertEquals("bmxsnxoc", model.vmId()); - Assertions.assertEquals("llojkpoyhgwwdj", model.vmProtectionState()); - Assertions.assertEquals("dbdljz", model.vmProtectionStateDescription()); - Assertions.assertEquals("rcvuqbsgzlrqhb", model.initialReplicationDetails().initialReplicationType()); - Assertions.assertEquals("qogdx", model.initialReplicationDetails().initialReplicationProgressPercentage()); - Assertions.assertEquals("p", model.vmNics().get(0).nicId()); - Assertions.assertEquals("x", model.vmNics().get(0).replicaNicId()); - Assertions.assertEquals("lflec", model.vmNics().get(0).sourceNicArmId()); - Assertions.assertEquals("inxojjlux", model.vmNics().get(0).vMNetworkName()); - Assertions.assertEquals("hilzzdzzq", model.vmNics().get(0).recoveryVMNetworkId()); - Assertions.assertEquals("za", model.vmNics().get(0).ipConfigs().get(0).name()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isPrimary()); - Assertions.assertEquals("ibqlotokhtvwtaz", model.vmNics().get(0).ipConfigs().get(0).subnetName()); - Assertions.assertEquals("cqwwxwj", model.vmNics().get(0).ipConfigs().get(0).staticIpAddress()); - Assertions.assertEquals("fgwhnkbtlwljs", model.vmNics().get(0).ipConfigs().get(0).ipAddressType()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("sn", model.vmNics().get(0).ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("kpwolg", model.vmNics().get(0).ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("ubxbteogfgfiijr", model.vmNics().get(0).ipConfigs().get(0).recoveryIpAddressType()); - Assertions.assertEquals("wlefksxqceazfpxg", - model.vmNics().get(0).ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("vzvluyq", - model.vmNics().get(0).ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("acvfyeowps", model.vmNics().get(0).ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("tjdhsoymhpvtyq", model.vmNics().get(0).ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("tehdpboujs", model.vmNics().get(0).ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("vvdshxcdedsue", - model.vmNics().get(0).ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("trauds", model.vmNics().get(0).selectionType()); - Assertions.assertEquals("lcdculregpq", model.vmNics().get(0).recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("hvrztnvg", model.vmNics().get(0).tfoVMNetworkId()); - Assertions.assertEquals("hqrdgrtwmewjzlpy", model.vmNics().get(0).tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("zzwjcayerzrran", model.vmNics().get(0).recoveryNicName()); - Assertions.assertEquals("bylpolwzr", model.vmNics().get(0).recoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).reuseExistingNic()); - Assertions.assertEquals("l", model.vmNics().get(0).tfoRecoveryNicName()); - Assertions.assertEquals("nkfscjfn", model.vmNics().get(0).tfoRecoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).tfoReuseExistingNic()); - Assertions.assertEquals("uagfqwtltngv", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals("ncanlduwzor", model.selectedRecoveryAzureNetworkId()); - Assertions.assertEquals("bm", model.selectedSourceNicId()); - Assertions.assertEquals("qk", model.encryption()); - Assertions.assertEquals("mxkqvf", model.oSDetails().osType()); - Assertions.assertEquals("pdxcltuubwy", model.oSDetails().productType()); - Assertions.assertEquals("jbowcpj", model.oSDetails().osEdition()); - Assertions.assertEquals("uqgixex", model.oSDetails().oSVersion()); - Assertions.assertEquals("dfbwljav", model.oSDetails().oSMajorVersion()); - Assertions.assertEquals("erkjddv", model.oSDetails().oSMinorVersion()); - Assertions.assertEquals(436483933, model.sourceVmRamSizeInMB()); - Assertions.assertEquals(1692980760, model.sourceVmCpuCount()); - Assertions.assertEquals("ftcvbii", model.enableRdpOnTargetOption()); - Assertions.assertEquals("ksdwgdnk", model.recoveryAzureResourceGroupId()); - Assertions.assertEquals("gmwdh", model.recoveryAvailabilitySetId()); - Assertions.assertEquals("buvczldbglzoutb", model.targetAvailabilityZone()); - Assertions.assertEquals("qgz", model.targetProximityPlacementGroupId()); - Assertions.assertEquals("ajclyzgsnorbjg", model.useManagedDisks()); - Assertions.assertEquals("zjotvmrxkhlo", model.licenseType()); - Assertions.assertEquals("vjb", model.sqlServerLicenseType()); - Assertions.assertEquals("qayfl", model.targetVmTags().get("iyu")); - Assertions.assertEquals("oxztfwfqch", model.seedManagedDiskTags().get("czevjnn")); - Assertions.assertEquals("whlpuzjpceezn", model.targetManagedDiskTags().get("angp")); - Assertions.assertEquals("krie", model.targetNicTags().get("bgnixxoww")); - Assertions.assertEquals("jvskwsdgkjg", model.protectedManagedDisks().get(0).diskId()); - Assertions.assertEquals("cwrase", model.protectedManagedDisks().get(0).seedManagedDiskId()); - Assertions.assertEquals("efcvo", model.protectedManagedDisks().get(0).replicaDiskType()); - Assertions.assertEquals("woqartwy", model.protectedManagedDisks().get(0).diskEncryptionSetId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureReprotectInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureReprotectInputTests.java deleted file mode 100644 index 9bc015e1003e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureReprotectInputTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureReprotectInput; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzureReprotectInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzureReprotectInput model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzure\",\"hvHostVmId\":\"zbnobr\",\"vmName\":\"pbcjtrpzuyudivbx\",\"osType\":\"sqeaeonqelwg\",\"vHDId\":\"uruzy\",\"storageAccountId\":\"arogatmolji\",\"logStorageAccountId\":\"mpinmzvfkneerzzt\"}") - .toObject(HyperVReplicaAzureReprotectInput.class); - Assertions.assertEquals("zbnobr", model.hvHostVmId()); - Assertions.assertEquals("pbcjtrpzuyudivbx", model.vmName()); - Assertions.assertEquals("sqeaeonqelwg", model.osType()); - Assertions.assertEquals("uruzy", model.vHDId()); - Assertions.assertEquals("arogatmolji", model.storageAccountId()); - Assertions.assertEquals("mpinmzvfkneerzzt", model.logStorageAccountId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzureReprotectInput model = new HyperVReplicaAzureReprotectInput().withHvHostVmId("zbnobr") - .withVmName("pbcjtrpzuyudivbx") - .withOsType("sqeaeonqelwg") - .withVHDId("uruzy") - .withStorageAccountId("arogatmolji") - .withLogStorageAccountId("mpinmzvfkneerzzt"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzureReprotectInput.class); - Assertions.assertEquals("zbnobr", model.hvHostVmId()); - Assertions.assertEquals("pbcjtrpzuyudivbx", model.vmName()); - Assertions.assertEquals("sqeaeonqelwg", model.osType()); - Assertions.assertEquals("uruzy", model.vHDId()); - Assertions.assertEquals("arogatmolji", model.storageAccountId()); - Assertions.assertEquals("mpinmzvfkneerzzt", model.logStorageAccountId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureTestFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureTestFailoverInputTests.java deleted file mode 100644 index 900cc4e85a44..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureTestFailoverInputTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureTestFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzureTestFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzureTestFailoverInput model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzure\",\"primaryKekCertificatePfx\":\"nsjulugdybnh\",\"secondaryKekCertificatePfx\":\"lelfjhkeizcpih\",\"recoveryPointId\":\"miw\",\"osUpgradeVersion\":\"kpty\"}") - .toObject(HyperVReplicaAzureTestFailoverInput.class); - Assertions.assertEquals("nsjulugdybnh", model.primaryKekCertificatePfx()); - Assertions.assertEquals("lelfjhkeizcpih", model.secondaryKekCertificatePfx()); - Assertions.assertEquals("miw", model.recoveryPointId()); - Assertions.assertEquals("kpty", model.osUpgradeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzureTestFailoverInput model - = new HyperVReplicaAzureTestFailoverInput().withPrimaryKekCertificatePfx("nsjulugdybnh") - .withSecondaryKekCertificatePfx("lelfjhkeizcpih") - .withRecoveryPointId("miw") - .withOsUpgradeVersion("kpty"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzureTestFailoverInput.class); - Assertions.assertEquals("nsjulugdybnh", model.primaryKekCertificatePfx()); - Assertions.assertEquals("lelfjhkeizcpih", model.secondaryKekCertificatePfx()); - Assertions.assertEquals("miw", model.recoveryPointId()); - Assertions.assertEquals("kpty", model.osUpgradeVersion()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureUnplannedFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureUnplannedFailoverInputTests.java deleted file mode 100644 index 1751074b803e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaAzureUnplannedFailoverInputTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureUnplannedFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaAzureUnplannedFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaAzureUnplannedFailoverInput model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzure\",\"primaryKekCertificatePfx\":\"ydbjzcqymlcf\",\"secondaryKekCertificatePfx\":\"hmhsurlgwqkpm\",\"recoveryPointId\":\"pstauol\"}") - .toObject(HyperVReplicaAzureUnplannedFailoverInput.class); - Assertions.assertEquals("ydbjzcqymlcf", model.primaryKekCertificatePfx()); - Assertions.assertEquals("hmhsurlgwqkpm", model.secondaryKekCertificatePfx()); - Assertions.assertEquals("pstauol", model.recoveryPointId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaAzureUnplannedFailoverInput model - = new HyperVReplicaAzureUnplannedFailoverInput().withPrimaryKekCertificatePfx("ydbjzcqymlcf") - .withSecondaryKekCertificatePfx("hmhsurlgwqkpm") - .withRecoveryPointId("pstauol"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaAzureUnplannedFailoverInput.class); - Assertions.assertEquals("ydbjzcqymlcf", model.primaryKekCertificatePfx()); - Assertions.assertEquals("hmhsurlgwqkpm", model.secondaryKekCertificatePfx()); - Assertions.assertEquals("pstauol", model.recoveryPointId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBaseEventDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBaseEventDetailsTests.java deleted file mode 100644 index 056710d0d5b1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBaseEventDetailsTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaBaseEventDetails; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaBaseEventDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaBaseEventDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaBaseEventDetails\",\"containerName\":\"xke\",\"fabricName\":\"iraabmdlqjbedpf\",\"remoteContainerName\":\"lhupmomihzbdnpxp\",\"remoteFabricName\":\"dpr\"}") - .toObject(HyperVReplicaBaseEventDetails.class); - Assertions.assertEquals("xke", model.containerName()); - Assertions.assertEquals("iraabmdlqjbedpf", model.fabricName()); - Assertions.assertEquals("lhupmomihzbdnpxp", model.remoteContainerName()); - Assertions.assertEquals("dpr", model.remoteFabricName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaBaseEventDetails model = new HyperVReplicaBaseEventDetails().withContainerName("xke") - .withFabricName("iraabmdlqjbedpf") - .withRemoteContainerName("lhupmomihzbdnpxp") - .withRemoteFabricName("dpr"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaBaseEventDetails.class); - Assertions.assertEquals("xke", model.containerName()); - Assertions.assertEquals("iraabmdlqjbedpf", model.fabricName()); - Assertions.assertEquals("lhupmomihzbdnpxp", model.remoteContainerName()); - Assertions.assertEquals("dpr", model.remoteFabricName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBasePolicyDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBasePolicyDetailsTests.java deleted file mode 100644 index 5b716761057c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBasePolicyDetailsTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaBasePolicyDetails; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaBasePolicyDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaBasePolicyDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaBasePolicyDetails\",\"recoveryPoints\":656606105,\"applicationConsistentSnapshotFrequencyInHours\":287145648,\"compression\":\"icghfl\",\"initialReplicationMethod\":\"fss\",\"onlineReplicationStartTime\":\"ghsfxrkbhammgmqf\",\"offlineReplicationImportPath\":\"fgvqcpdw\",\"offlineReplicationExportPath\":\"quxweyslandkd\",\"replicationPort\":27796894,\"allowedAuthenticationType\":654444535,\"replicaDeletionOption\":\"hghcgawnrrnqu\"}") - .toObject(HyperVReplicaBasePolicyDetails.class); - Assertions.assertEquals(656606105, model.recoveryPoints()); - Assertions.assertEquals(287145648, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals("icghfl", model.compression()); - Assertions.assertEquals("fss", model.initialReplicationMethod()); - Assertions.assertEquals("ghsfxrkbhammgmqf", model.onlineReplicationStartTime()); - Assertions.assertEquals("fgvqcpdw", model.offlineReplicationImportPath()); - Assertions.assertEquals("quxweyslandkd", model.offlineReplicationExportPath()); - Assertions.assertEquals(27796894, model.replicationPort()); - Assertions.assertEquals(654444535, model.allowedAuthenticationType()); - Assertions.assertEquals("hghcgawnrrnqu", model.replicaDeletionOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaBasePolicyDetails model = new HyperVReplicaBasePolicyDetails().withRecoveryPoints(656606105) - .withApplicationConsistentSnapshotFrequencyInHours(287145648) - .withCompression("icghfl") - .withInitialReplicationMethod("fss") - .withOnlineReplicationStartTime("ghsfxrkbhammgmqf") - .withOfflineReplicationImportPath("fgvqcpdw") - .withOfflineReplicationExportPath("quxweyslandkd") - .withReplicationPort(27796894) - .withAllowedAuthenticationType(654444535) - .withReplicaDeletionOption("hghcgawnrrnqu"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaBasePolicyDetails.class); - Assertions.assertEquals(656606105, model.recoveryPoints()); - Assertions.assertEquals(287145648, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals("icghfl", model.compression()); - Assertions.assertEquals("fss", model.initialReplicationMethod()); - Assertions.assertEquals("ghsfxrkbhammgmqf", model.onlineReplicationStartTime()); - Assertions.assertEquals("fgvqcpdw", model.offlineReplicationImportPath()); - Assertions.assertEquals("quxweyslandkd", model.offlineReplicationExportPath()); - Assertions.assertEquals(27796894, model.replicationPort()); - Assertions.assertEquals(654444535, model.allowedAuthenticationType()); - Assertions.assertEquals("hghcgawnrrnqu", model.replicaDeletionOption()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBaseReplicationDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBaseReplicationDetailsTests.java deleted file mode 100644 index 1c7311819f58..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBaseReplicationDetailsTests.java +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaBaseReplicationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InitialReplicationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IpConfigDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMNicDetails; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaBaseReplicationDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaBaseReplicationDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaBaseReplicationDetails\",\"lastReplicatedTime\":\"2021-02-01T01:04:29Z\",\"vmNics\":[{\"nicId\":\"reimseob\",\"replicaNicId\":\"xstcyilbvzm\",\"sourceNicArmId\":\"cjzlquzexokjxebj\",\"vMNetworkName\":\"zinzabwmvogljsvl\",\"recoveryVMNetworkId\":\"idnwceha\",\"ipConfigs\":[{\"name\":\"yzltgiomqo\",\"isPrimary\":true,\"subnetName\":\"iaeapfs\",\"staticIPAddress\":\"gdtpe\",\"ipAddressType\":\"acyh\",\"isSeletedForFailover\":true,\"recoverySubnetName\":\"pqqncju\",\"recoveryStaticIPAddress\":\"hjozf\",\"recoveryIPAddressType\":\"cwmbupyvqyvli\",\"recoveryPublicIPAddressId\":\"ipsejbsvsia\",\"recoveryLBBackendAddressPoolIds\":[\"whddzydisnuepyw\",\"jlnldpxottdiiaoc\",\"ibz\",\"ihweeb\"],\"tfoSubnetName\":\"hryvcjwqwoqsra\",\"tfoStaticIPAddress\":\"hdhzybspijhfr\",\"tfoPublicIPAddressId\":\"dkkagvwukhsusmm\",\"tfoLBBackendAddressPoolIds\":[\"mzhwilzzhni\"]}],\"selectionType\":\"riprlkdneytt\",\"recoveryNetworkSecurityGroupId\":\"cxiv\",\"enableAcceleratedNetworkingOnRecovery\":false,\"tfoVMNetworkId\":\"tpumltwjfluxynb\",\"tfoNetworkSecurityGroupId\":\"zlqywauyqn\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"mocgjshg\",\"recoveryNicResourceGroupName\":\"a\",\"reuseExistingNic\":false,\"tfoRecoveryNicName\":\"ixq\",\"tfoRecoveryNicResourceGroupName\":\"gljkybsj\",\"tfoReuseExistingNic\":false,\"targetNicName\":\"vtzqnrbctbhp\"},{\"nicId\":\"xpc\",\"replicaNicId\":\"dnyeita\",\"sourceNicArmId\":\"qady\",\"vMNetworkName\":\"jahwriuomzczf\",\"recoveryVMNetworkId\":\"ceevsa\",\"ipConfigs\":[{\"name\":\"p\",\"isPrimary\":false,\"subnetName\":\"khfjqebglcxkx\",\"staticIPAddress\":\"zromvygys\",\"ipAddressType\":\"tme\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"vpinkzpatqt\",\"recoveryStaticIPAddress\":\"swxspvckojaz\",\"recoveryIPAddressType\":\"gspftesu\",\"recoveryPublicIPAddressId\":\"pvpvd\",\"recoveryLBBackendAddressPoolIds\":[\"tcovqseusrfjb\",\"xzfxn\"],\"tfoSubnetName\":\"lbmuos\",\"tfoStaticIPAddress\":\"jmdihdcyyyzlw\",\"tfoPublicIPAddressId\":\"wzjnufz\",\"tfoLBBackendAddressPoolIds\":[\"m\"]},{\"name\":\"gnnbzrtf\",\"isPrimary\":true,\"subnetName\":\"uubjtvgjsxmty\",\"staticIPAddress\":\"vavdp\",\"ipAddressType\":\"obt\",\"isSeletedForFailover\":true,\"recoverySubnetName\":\"its\",\"recoveryStaticIPAddress\":\"ofw\",\"recoveryIPAddressType\":\"m\",\"recoveryPublicIPAddressId\":\"scauwazcgwdfr\",\"recoveryLBBackendAddressPoolIds\":[\"ybjpozoks\"],\"tfoSubnetName\":\"gllixdgbyfgwew\",\"tfoStaticIPAddress\":\"j\",\"tfoPublicIPAddressId\":\"prwpxsoohu\",\"tfoLBBackendAddressPoolIds\":[\"cskltezuuggg\",\"lfb\"]},{\"name\":\"dc\",\"isPrimary\":false,\"subnetName\":\"rtmdylperpil\",\"staticIPAddress\":\"jzgc\",\"ipAddressType\":\"cmfpfbodet\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"gvtshu\",\"recoveryStaticIPAddress\":\"t\",\"recoveryIPAddressType\":\"ivmuqkevzgjyp\",\"recoveryPublicIPAddressId\":\"hxmpdxxz\",\"recoveryLBBackendAddressPoolIds\":[\"wzjwotnxlkfhg\",\"h\",\"foxqwecrsn\",\"pcs\"],\"tfoSubnetName\":\"qxovppqibukk\",\"tfoStaticIPAddress\":\"zrlrmlccmetjs\",\"tfoPublicIPAddressId\":\"ivfqbqnasdsy\",\"tfoLBBackendAddressPoolIds\":[\"sieuscpl\",\"yvdgxlyzk\",\"itdshezsvkolru\",\"jovmozsaye\"]},{\"name\":\"azwzlpzbtzuykyki\",\"isPrimary\":false,\"subnetName\":\"yepfn\",\"staticIPAddress\":\"mbezacfpztg\",\"ipAddressType\":\"wyqejgaao\",\"isSeletedForFailover\":true,\"recoverySubnetName\":\"kppgkqzkcyzm\",\"recoveryStaticIPAddress\":\"ngdyfcixrhlcq\",\"recoveryIPAddressType\":\"oejgoiutgwrmkah\",\"recoveryPublicIPAddressId\":\"hazyntacihnco\",\"recoveryLBBackendAddressPoolIds\":[\"pnmliq\",\"v\",\"bhikeaqgr\"],\"tfoSubnetName\":\"pomxpu\",\"tfoStaticIPAddress\":\"tsdfjyieso\",\"tfoPublicIPAddressId\":\"iqbuou\",\"tfoLBBackendAddressPoolIds\":[\"yzgleofjs\"]}],\"selectionType\":\"bwwzvdajf\",\"recoveryNetworkSecurityGroupId\":\"n\",\"enableAcceleratedNetworkingOnRecovery\":true,\"tfoVMNetworkId\":\"ciqgjjrlhiqlwixv\",\"tfoNetworkSecurityGroupId\":\"ougu\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"opgjttba\",\"recoveryNicResourceGroupName\":\"alapdlndbe\",\"reuseExistingNic\":true,\"tfoRecoveryNicName\":\"ixv\",\"tfoRecoveryNicResourceGroupName\":\"wy\",\"tfoReuseExistingNic\":false,\"targetNicName\":\"fqvz\"}],\"vmId\":\"msp\",\"vmProtectionState\":\"zfe\",\"vmProtectionStateDescription\":\"jljmphfkyezol\",\"initialReplicationDetails\":{\"initialReplicationType\":\"mi\",\"initialReplicationProgressPercentage\":\"ydoccnxshanzb\"},\"vMDiskDetails\":[{\"maxSizeMB\":8904392733364237803,\"vhdType\":\"tecaa\",\"vhdId\":\"dohzniucbdaombwi\",\"vhdName\":\"jdllwktle\"}]}") - .toObject(HyperVReplicaBaseReplicationDetails.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-01T01:04:29Z"), model.lastReplicatedTime()); - Assertions.assertEquals("reimseob", model.vmNics().get(0).nicId()); - Assertions.assertEquals("xstcyilbvzm", model.vmNics().get(0).replicaNicId()); - Assertions.assertEquals("cjzlquzexokjxebj", model.vmNics().get(0).sourceNicArmId()); - Assertions.assertEquals("zinzabwmvogljsvl", model.vmNics().get(0).vMNetworkName()); - Assertions.assertEquals("idnwceha", model.vmNics().get(0).recoveryVMNetworkId()); - Assertions.assertEquals("yzltgiomqo", model.vmNics().get(0).ipConfigs().get(0).name()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isPrimary()); - Assertions.assertEquals("iaeapfs", model.vmNics().get(0).ipConfigs().get(0).subnetName()); - Assertions.assertEquals("gdtpe", model.vmNics().get(0).ipConfigs().get(0).staticIpAddress()); - Assertions.assertEquals("acyh", model.vmNics().get(0).ipConfigs().get(0).ipAddressType()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("pqqncju", model.vmNics().get(0).ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("hjozf", model.vmNics().get(0).ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("cwmbupyvqyvli", model.vmNics().get(0).ipConfigs().get(0).recoveryIpAddressType()); - Assertions.assertEquals("ipsejbsvsia", model.vmNics().get(0).ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("whddzydisnuepyw", - model.vmNics().get(0).ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("hryvcjwqwoqsra", model.vmNics().get(0).ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("hdhzybspijhfr", model.vmNics().get(0).ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("dkkagvwukhsusmm", model.vmNics().get(0).ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("mzhwilzzhni", - model.vmNics().get(0).ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("riprlkdneytt", model.vmNics().get(0).selectionType()); - Assertions.assertEquals("cxiv", model.vmNics().get(0).recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("tpumltwjfluxynb", model.vmNics().get(0).tfoVMNetworkId()); - Assertions.assertEquals("zlqywauyqn", model.vmNics().get(0).tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("mocgjshg", model.vmNics().get(0).recoveryNicName()); - Assertions.assertEquals("a", model.vmNics().get(0).recoveryNicResourceGroupName()); - Assertions.assertEquals(false, model.vmNics().get(0).reuseExistingNic()); - Assertions.assertEquals("ixq", model.vmNics().get(0).tfoRecoveryNicName()); - Assertions.assertEquals("gljkybsj", model.vmNics().get(0).tfoRecoveryNicResourceGroupName()); - Assertions.assertEquals(false, model.vmNics().get(0).tfoReuseExistingNic()); - Assertions.assertEquals("vtzqnrbctbhp", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals("msp", model.vmId()); - Assertions.assertEquals("zfe", model.vmProtectionState()); - Assertions.assertEquals("jljmphfkyezol", model.vmProtectionStateDescription()); - Assertions.assertEquals("mi", model.initialReplicationDetails().initialReplicationType()); - Assertions.assertEquals("ydoccnxshanzb", - model.initialReplicationDetails().initialReplicationProgressPercentage()); - Assertions.assertEquals(8904392733364237803L, model.vMDiskDetails().get(0).maxSizeMB()); - Assertions.assertEquals("tecaa", model.vMDiskDetails().get(0).vhdType()); - Assertions.assertEquals("dohzniucbdaombwi", model.vMDiskDetails().get(0).vhdId()); - Assertions.assertEquals("jdllwktle", model.vMDiskDetails().get(0).vhdName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaBaseReplicationDetails model - = new HyperVReplicaBaseReplicationDetails() - .withLastReplicatedTime(OffsetDateTime.parse("2021-02-01T01:04:29Z")) - .withVmNics( - Arrays - .asList( - new VMNicDetails().withNicId("reimseob") - .withReplicaNicId("xstcyilbvzm") - .withSourceNicArmId("cjzlquzexokjxebj") - .withVMNetworkName("zinzabwmvogljsvl") - .withRecoveryVMNetworkId("idnwceha") - .withIpConfigs( - Arrays - .asList(new IpConfigDetails().withName("yzltgiomqo") - .withIsPrimary(true) - .withSubnetName("iaeapfs") - .withStaticIpAddress("gdtpe") - .withIpAddressType("acyh") - .withIsSeletedForFailover(true) - .withRecoverySubnetName("pqqncju") - .withRecoveryStaticIpAddress("hjozf") - .withRecoveryIpAddressType("cwmbupyvqyvli") - .withRecoveryPublicIpAddressId("ipsejbsvsia") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("whddzydisnuepyw", "jlnldpxottdiiaoc", "ibz", "ihweeb")) - .withTfoSubnetName("hryvcjwqwoqsra") - .withTfoStaticIpAddress("hdhzybspijhfr") - .withTfoPublicIpAddressId("dkkagvwukhsusmm") - .withTfoLBBackendAddressPoolIds(Arrays.asList("mzhwilzzhni")))) - .withSelectionType("riprlkdneytt") - .withRecoveryNetworkSecurityGroupId("cxiv") - .withEnableAcceleratedNetworkingOnRecovery(false) - .withTfoVMNetworkId("tpumltwjfluxynb") - .withTfoNetworkSecurityGroupId("zlqywauyqn") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("mocgjshg") - .withRecoveryNicResourceGroupName("a") - .withReuseExistingNic(false) - .withTfoRecoveryNicName("ixq") - .withTfoRecoveryNicResourceGroupName("gljkybsj") - .withTfoReuseExistingNic(false) - .withTargetNicName("vtzqnrbctbhp"), - new VMNicDetails().withNicId("xpc") - .withReplicaNicId("dnyeita") - .withSourceNicArmId("qady") - .withVMNetworkName("jahwriuomzczf") - .withRecoveryVMNetworkId("ceevsa") - .withIpConfigs( - Arrays - .asList( - new IpConfigDetails().withName("p") - .withIsPrimary(false) - .withSubnetName("khfjqebglcxkx") - .withStaticIpAddress("zromvygys") - .withIpAddressType("tme") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("vpinkzpatqt") - .withRecoveryStaticIpAddress("swxspvckojaz") - .withRecoveryIpAddressType("gspftesu") - .withRecoveryPublicIpAddressId("pvpvd") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("tcovqseusrfjb", "xzfxn")) - .withTfoSubnetName("lbmuos") - .withTfoStaticIpAddress("jmdihdcyyyzlw") - .withTfoPublicIpAddressId("wzjnufz") - .withTfoLBBackendAddressPoolIds(Arrays.asList("m")), - new IpConfigDetails().withName("gnnbzrtf") - .withIsPrimary(true) - .withSubnetName("uubjtvgjsxmty") - .withStaticIpAddress("vavdp") - .withIpAddressType("obt") - .withIsSeletedForFailover(true) - .withRecoverySubnetName("its") - .withRecoveryStaticIpAddress("ofw") - .withRecoveryIpAddressType("m") - .withRecoveryPublicIpAddressId("scauwazcgwdfr") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("ybjpozoks")) - .withTfoSubnetName("gllixdgbyfgwew") - .withTfoStaticIpAddress("j") - .withTfoPublicIpAddressId("prwpxsoohu") - .withTfoLBBackendAddressPoolIds(Arrays.asList("cskltezuuggg", "lfb")), - new IpConfigDetails().withName("dc") - .withIsPrimary(false) - .withSubnetName("rtmdylperpil") - .withStaticIpAddress("jzgc") - .withIpAddressType("cmfpfbodet") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("gvtshu") - .withRecoveryStaticIpAddress("t") - .withRecoveryIpAddressType("ivmuqkevzgjyp") - .withRecoveryPublicIpAddressId("hxmpdxxz") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("wzjwotnxlkfhg", "h", "foxqwecrsn", "pcs")) - .withTfoSubnetName("qxovppqibukk") - .withTfoStaticIpAddress("zrlrmlccmetjs") - .withTfoPublicIpAddressId("ivfqbqnasdsy") - .withTfoLBBackendAddressPoolIds(Arrays.asList("sieuscpl", "yvdgxlyzk", - "itdshezsvkolru", "jovmozsaye")), - new IpConfigDetails().withName("azwzlpzbtzuykyki") - .withIsPrimary(false) - .withSubnetName("yepfn") - .withStaticIpAddress("mbezacfpztg") - .withIpAddressType("wyqejgaao") - .withIsSeletedForFailover(true) - .withRecoverySubnetName("kppgkqzkcyzm") - .withRecoveryStaticIpAddress("ngdyfcixrhlcq") - .withRecoveryIpAddressType("oejgoiutgwrmkah") - .withRecoveryPublicIpAddressId("hazyntacihnco") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("pnmliq", "v", "bhikeaqgr")) - .withTfoSubnetName("pomxpu") - .withTfoStaticIpAddress("tsdfjyieso") - .withTfoPublicIpAddressId("iqbuou") - .withTfoLBBackendAddressPoolIds(Arrays.asList("yzgleofjs")))) - .withSelectionType("bwwzvdajf") - .withRecoveryNetworkSecurityGroupId("n") - .withEnableAcceleratedNetworkingOnRecovery(true) - .withTfoVMNetworkId("ciqgjjrlhiqlwixv") - .withTfoNetworkSecurityGroupId("ougu") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("opgjttba") - .withRecoveryNicResourceGroupName("alapdlndbe") - .withReuseExistingNic(true) - .withTfoRecoveryNicName("ixv") - .withTfoRecoveryNicResourceGroupName("wy") - .withTfoReuseExistingNic(false) - .withTargetNicName("fqvz"))) - .withVmId("msp") - .withVmProtectionState("zfe") - .withVmProtectionStateDescription("jljmphfkyezol") - .withInitialReplicationDetails(new InitialReplicationDetails().withInitialReplicationType("mi") - .withInitialReplicationProgressPercentage("ydoccnxshanzb")) - .withVMDiskDetails(Arrays.asList(new DiskDetails().withMaxSizeMB(8904392733364237803L) - .withVhdType("tecaa") - .withVhdId("dohzniucbdaombwi") - .withVhdName("jdllwktle"))); - model = BinaryData.fromObject(model).toObject(HyperVReplicaBaseReplicationDetails.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-01T01:04:29Z"), model.lastReplicatedTime()); - Assertions.assertEquals("reimseob", model.vmNics().get(0).nicId()); - Assertions.assertEquals("xstcyilbvzm", model.vmNics().get(0).replicaNicId()); - Assertions.assertEquals("cjzlquzexokjxebj", model.vmNics().get(0).sourceNicArmId()); - Assertions.assertEquals("zinzabwmvogljsvl", model.vmNics().get(0).vMNetworkName()); - Assertions.assertEquals("idnwceha", model.vmNics().get(0).recoveryVMNetworkId()); - Assertions.assertEquals("yzltgiomqo", model.vmNics().get(0).ipConfigs().get(0).name()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isPrimary()); - Assertions.assertEquals("iaeapfs", model.vmNics().get(0).ipConfigs().get(0).subnetName()); - Assertions.assertEquals("gdtpe", model.vmNics().get(0).ipConfigs().get(0).staticIpAddress()); - Assertions.assertEquals("acyh", model.vmNics().get(0).ipConfigs().get(0).ipAddressType()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("pqqncju", model.vmNics().get(0).ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("hjozf", model.vmNics().get(0).ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("cwmbupyvqyvli", model.vmNics().get(0).ipConfigs().get(0).recoveryIpAddressType()); - Assertions.assertEquals("ipsejbsvsia", model.vmNics().get(0).ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("whddzydisnuepyw", - model.vmNics().get(0).ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("hryvcjwqwoqsra", model.vmNics().get(0).ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("hdhzybspijhfr", model.vmNics().get(0).ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("dkkagvwukhsusmm", model.vmNics().get(0).ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("mzhwilzzhni", - model.vmNics().get(0).ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("riprlkdneytt", model.vmNics().get(0).selectionType()); - Assertions.assertEquals("cxiv", model.vmNics().get(0).recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("tpumltwjfluxynb", model.vmNics().get(0).tfoVMNetworkId()); - Assertions.assertEquals("zlqywauyqn", model.vmNics().get(0).tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("mocgjshg", model.vmNics().get(0).recoveryNicName()); - Assertions.assertEquals("a", model.vmNics().get(0).recoveryNicResourceGroupName()); - Assertions.assertEquals(false, model.vmNics().get(0).reuseExistingNic()); - Assertions.assertEquals("ixq", model.vmNics().get(0).tfoRecoveryNicName()); - Assertions.assertEquals("gljkybsj", model.vmNics().get(0).tfoRecoveryNicResourceGroupName()); - Assertions.assertEquals(false, model.vmNics().get(0).tfoReuseExistingNic()); - Assertions.assertEquals("vtzqnrbctbhp", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals("msp", model.vmId()); - Assertions.assertEquals("zfe", model.vmProtectionState()); - Assertions.assertEquals("jljmphfkyezol", model.vmProtectionStateDescription()); - Assertions.assertEquals("mi", model.initialReplicationDetails().initialReplicationType()); - Assertions.assertEquals("ydoccnxshanzb", - model.initialReplicationDetails().initialReplicationProgressPercentage()); - Assertions.assertEquals(8904392733364237803L, model.vMDiskDetails().get(0).maxSizeMB()); - Assertions.assertEquals("tecaa", model.vMDiskDetails().get(0).vhdType()); - Assertions.assertEquals("dohzniucbdaombwi", model.vMDiskDetails().get(0).vhdId()); - Assertions.assertEquals("jdllwktle", model.vMDiskDetails().get(0).vhdName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBluePolicyDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBluePolicyDetailsTests.java deleted file mode 100644 index 4177a4bd8d6b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBluePolicyDetailsTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaBluePolicyDetails; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaBluePolicyDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaBluePolicyDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplica2012R2\",\"replicationFrequencyInSeconds\":2136761436,\"recoveryPoints\":1535856297,\"applicationConsistentSnapshotFrequencyInHours\":834618815,\"compression\":\"uajgcqwulynk\",\"initialReplicationMethod\":\"cfdruwsikxx\",\"onlineReplicationStartTime\":\"lhuulriqb\",\"offlineReplicationImportPath\":\"kvjgbzs\",\"offlineReplicationExportPath\":\"br\",\"replicationPort\":1636269751,\"allowedAuthenticationType\":1781145950,\"replicaDeletionOption\":\"hcdjwsuoardnagt\"}") - .toObject(HyperVReplicaBluePolicyDetails.class); - Assertions.assertEquals(2136761436, model.replicationFrequencyInSeconds()); - Assertions.assertEquals(1535856297, model.recoveryPoints()); - Assertions.assertEquals(834618815, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals("uajgcqwulynk", model.compression()); - Assertions.assertEquals("cfdruwsikxx", model.initialReplicationMethod()); - Assertions.assertEquals("lhuulriqb", model.onlineReplicationStartTime()); - Assertions.assertEquals("kvjgbzs", model.offlineReplicationImportPath()); - Assertions.assertEquals("br", model.offlineReplicationExportPath()); - Assertions.assertEquals(1636269751, model.replicationPort()); - Assertions.assertEquals(1781145950, model.allowedAuthenticationType()); - Assertions.assertEquals("hcdjwsuoardnagt", model.replicaDeletionOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaBluePolicyDetails model - = new HyperVReplicaBluePolicyDetails().withReplicationFrequencyInSeconds(2136761436) - .withRecoveryPoints(1535856297) - .withApplicationConsistentSnapshotFrequencyInHours(834618815) - .withCompression("uajgcqwulynk") - .withInitialReplicationMethod("cfdruwsikxx") - .withOnlineReplicationStartTime("lhuulriqb") - .withOfflineReplicationImportPath("kvjgbzs") - .withOfflineReplicationExportPath("br") - .withReplicationPort(1636269751) - .withAllowedAuthenticationType(1781145950) - .withReplicaDeletionOption("hcdjwsuoardnagt"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaBluePolicyDetails.class); - Assertions.assertEquals(2136761436, model.replicationFrequencyInSeconds()); - Assertions.assertEquals(1535856297, model.recoveryPoints()); - Assertions.assertEquals(834618815, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals("uajgcqwulynk", model.compression()); - Assertions.assertEquals("cfdruwsikxx", model.initialReplicationMethod()); - Assertions.assertEquals("lhuulriqb", model.onlineReplicationStartTime()); - Assertions.assertEquals("kvjgbzs", model.offlineReplicationImportPath()); - Assertions.assertEquals("br", model.offlineReplicationExportPath()); - Assertions.assertEquals(1636269751, model.replicationPort()); - Assertions.assertEquals(1781145950, model.allowedAuthenticationType()); - Assertions.assertEquals("hcdjwsuoardnagt", model.replicaDeletionOption()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBluePolicyInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBluePolicyInputTests.java deleted file mode 100644 index 187fffe8d3eb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBluePolicyInputTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaBluePolicyInput; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaBluePolicyInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaBluePolicyInput model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplica2012R2\",\"replicationFrequencyInSeconds\":635322642,\"recoveryPoints\":1923596622,\"applicationConsistentSnapshotFrequencyInHours\":1537790283,\"compression\":\"nrholhujb\",\"initialReplicationMethod\":\"xiplkysolsyj\",\"onlineReplicationStartTime\":\"xslwhd\",\"offlineReplicationImportPath\":\"vhtbbzjhfvh\",\"offlineReplicationExportPath\":\"zb\",\"replicationPort\":1668972402,\"allowedAuthenticationType\":1931538005,\"replicaDeletion\":\"ihotjecohmxv\"}") - .toObject(HyperVReplicaBluePolicyInput.class); - Assertions.assertEquals(1923596622, model.recoveryPoints()); - Assertions.assertEquals(1537790283, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals("nrholhujb", model.compression()); - Assertions.assertEquals("xiplkysolsyj", model.initialReplicationMethod()); - Assertions.assertEquals("xslwhd", model.onlineReplicationStartTime()); - Assertions.assertEquals("vhtbbzjhfvh", model.offlineReplicationImportPath()); - Assertions.assertEquals("zb", model.offlineReplicationExportPath()); - Assertions.assertEquals(1668972402, model.replicationPort()); - Assertions.assertEquals(1931538005, model.allowedAuthenticationType()); - Assertions.assertEquals("ihotjecohmxv", model.replicaDeletion()); - Assertions.assertEquals(635322642, model.replicationFrequencyInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaBluePolicyInput model = new HyperVReplicaBluePolicyInput().withRecoveryPoints(1923596622) - .withApplicationConsistentSnapshotFrequencyInHours(1537790283) - .withCompression("nrholhujb") - .withInitialReplicationMethod("xiplkysolsyj") - .withOnlineReplicationStartTime("xslwhd") - .withOfflineReplicationImportPath("vhtbbzjhfvh") - .withOfflineReplicationExportPath("zb") - .withReplicationPort(1668972402) - .withAllowedAuthenticationType(1931538005) - .withReplicaDeletion("ihotjecohmxv") - .withReplicationFrequencyInSeconds(635322642); - model = BinaryData.fromObject(model).toObject(HyperVReplicaBluePolicyInput.class); - Assertions.assertEquals(1923596622, model.recoveryPoints()); - Assertions.assertEquals(1537790283, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals("nrholhujb", model.compression()); - Assertions.assertEquals("xiplkysolsyj", model.initialReplicationMethod()); - Assertions.assertEquals("xslwhd", model.onlineReplicationStartTime()); - Assertions.assertEquals("vhtbbzjhfvh", model.offlineReplicationImportPath()); - Assertions.assertEquals("zb", model.offlineReplicationExportPath()); - Assertions.assertEquals(1668972402, model.replicationPort()); - Assertions.assertEquals(1931538005, model.allowedAuthenticationType()); - Assertions.assertEquals("ihotjecohmxv", model.replicaDeletion()); - Assertions.assertEquals(635322642, model.replicationFrequencyInSeconds()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBlueReplicationDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBlueReplicationDetailsTests.java deleted file mode 100644 index f5d939b714b3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaBlueReplicationDetailsTests.java +++ /dev/null @@ -1,327 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaBlueReplicationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InitialReplicationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IpConfigDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMNicDetails; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaBlueReplicationDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaBlueReplicationDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplica2012R2\",\"lastReplicatedTime\":\"2021-05-25T03:28:24Z\",\"vmNics\":[{\"nicId\":\"guwrjm\",\"replicaNicId\":\"vbtuqkxximwg\",\"sourceNicArmId\":\"ldeko\",\"vMNetworkName\":\"gxieqfkyfhi\",\"recoveryVMNetworkId\":\"jaqupbyynvskpaj\",\"ipConfigs\":[{\"name\":\"umexmj\",\"isPrimary\":true,\"subnetName\":\"ccwkqmtx\",\"staticIPAddress\":\"eqi\",\"ipAddressType\":\"rpilgftrqrejdaah\",\"isSeletedForFailover\":true,\"recoverySubnetName\":\"ldahlfxlmu\",\"recoveryStaticIPAddress\":\"muadjnfsncski\",\"recoveryIPAddressType\":\"shjgczetybnxg\",\"recoveryPublicIPAddressId\":\"lcgctjchfjv\",\"recoveryLBBackendAddressPoolIds\":[\"j\",\"ebecuvlbefv\",\"cljkxpyl\"],\"tfoSubnetName\":\"oxz\",\"tfoStaticIPAddress\":\"psyxjije\",\"tfoPublicIPAddressId\":\"dvrbke\",\"tfoLBBackendAddressPoolIds\":[\"dkgaw\",\"wjxildfkcefeyg\",\"q\",\"jo\"]},{\"name\":\"fmn\",\"isPrimary\":false,\"subnetName\":\"jnxumentq\",\"staticIPAddress\":\"tw\",\"ipAddressType\":\"mxymulwivqtowlhl\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"ybajasqubf\",\"recoveryStaticIPAddress\":\"cywhj\",\"recoveryIPAddressType\":\"mchqoht\",\"recoveryPublicIPAddressId\":\"cpupukiy\",\"recoveryLBBackendAddressPoolIds\":[\"pwdlvwti\",\"smosaonhqnam\",\"pultas\",\"aekewnazea\"],\"tfoSubnetName\":\"kajlcyizy\",\"tfoStaticIPAddress\":\"cvxodkrvfsxxby\",\"tfoPublicIPAddressId\":\"sqlv\",\"tfoLBBackendAddressPoolIds\":[\"pwgoljt\",\"xnmxsdobygoogxqa\",\"j\",\"vaz\"]}],\"selectionType\":\"fucsaodjnosdkvi\",\"recoveryNetworkSecurityGroupId\":\"asgmatrnzpd\",\"enableAcceleratedNetworkingOnRecovery\":false,\"tfoVMNetworkId\":\"akt\",\"tfoNetworkSecurityGroupId\":\"ktz\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"yfpqd\",\"recoveryNicResourceGroupName\":\"kpp\",\"reuseExistingNic\":false,\"tfoRecoveryNicName\":\"tfvpctfjikff\",\"tfoRecoveryNicResourceGroupName\":\"g\",\"tfoReuseExistingNic\":true,\"targetNicName\":\"nwhvuldbkkejj\"},{\"nicId\":\"igaw\",\"replicaNicId\":\"zmxjqif\",\"sourceNicArmId\":\"jjsbcmlzaahzbhur\",\"vMNetworkName\":\"lkolirhhmoj\",\"recoveryVMNetworkId\":\"u\",\"ipConfigs\":[{\"name\":\"zcvaaxoialahfxwc\",\"isPrimary\":false,\"subnetName\":\"xkukm\",\"staticIPAddress\":\"zynuh\",\"ipAddressType\":\"qeq\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"ljqkxyrqolnthbb\",\"recoveryStaticIPAddress\":\"gzukw\",\"recoveryIPAddressType\":\"nzkjthfceyjn\",\"recoveryPublicIPAddressId\":\"mlfuyfjbp\",\"recoveryLBBackendAddressPoolIds\":[\"dhlrufzcqyjmq\",\"fuiocuselq\",\"rsazrhxud\"],\"tfoSubnetName\":\"mdtff\",\"tfoStaticIPAddress\":\"jmr\",\"tfoPublicIPAddressId\":\"hmwdmdlgyqixokw\",\"tfoLBBackendAddressPoolIds\":[\"whvagnqfq\",\"dlcvmyo\"]}],\"selectionType\":\"aymjchtvsnvlaq\",\"recoveryNetworkSecurityGroupId\":\"z\",\"enableAcceleratedNetworkingOnRecovery\":true,\"tfoVMNetworkId\":\"atuwqkokbc\",\"tfoNetworkSecurityGroupId\":\"thymgobl\",\"enableAcceleratedNetworkingOnTfo\":true,\"recoveryNicName\":\"wgwima\",\"recoveryNicResourceGroupName\":\"eakhtmhobcya\",\"reuseExistingNic\":true,\"tfoRecoveryNicName\":\"qtvkh\",\"tfoRecoveryNicResourceGroupName\":\"oog\",\"tfoReuseExistingNic\":false,\"targetNicName\":\"aoaqymhccto\"},{\"nicId\":\"o\",\"replicaNicId\":\"rnskby\",\"sourceNicArmId\":\"uhczy\",\"vMNetworkName\":\"vhajpxec\",\"recoveryVMNetworkId\":\"nwh\",\"ipConfigs\":[{\"name\":\"awmvgxs\",\"isPrimary\":true,\"subnetName\":\"pwirfljfewxqouo\",\"staticIPAddress\":\"dnmckap\",\"ipAddressType\":\"knq\",\"isSeletedForFailover\":true,\"recoverySubnetName\":\"encdgmoqueqihkky\",\"recoveryStaticIPAddress\":\"ltjouwhldxwh\",\"recoveryIPAddressType\":\"proqk\",\"recoveryPublicIPAddressId\":\"fxmcvprstvk\",\"recoveryLBBackendAddressPoolIds\":[\"fjtdyot\"],\"tfoSubnetName\":\"lfa\",\"tfoStaticIPAddress\":\"occqrqxw\",\"tfoPublicIPAddressId\":\"jtdrhutf\",\"tfoLBBackendAddressPoolIds\":[\"dtxopgehpadkmdzg\"]},{\"name\":\"zxvctkbbxuharls\",\"isPrimary\":true,\"subnetName\":\"clabv\",\"staticIPAddress\":\"ngsux\",\"ipAddressType\":\"zb\",\"isSeletedForFailover\":true,\"recoverySubnetName\":\"ogh\",\"recoveryStaticIPAddress\":\"a\",\"recoveryIPAddressType\":\"janormovdxxu\",\"recoveryPublicIPAddressId\":\"tujmoil\",\"recoveryLBBackendAddressPoolIds\":[\"emhdeeljslky\",\"zdsfzjuegr\"],\"tfoSubnetName\":\"htslejtvxj\",\"tfoStaticIPAddress\":\"vgjbfio\",\"tfoPublicIPAddressId\":\"njodfcbjqqwmtq\",\"tfoLBBackendAddressPoolIds\":[\"xsazuxejgw\",\"cywnfyszza\",\"zsinqbdnddb\"]},{\"name\":\"zsyvrmkjm\",\"isPrimary\":true,\"subnetName\":\"chwudlxee\",\"staticIPAddress\":\"tpmnoe\",\"ipAddressType\":\"qlfm\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"oyrfgxk\",\"recoveryStaticIPAddress\":\"pmypgfq\",\"recoveryIPAddressType\":\"tyw\",\"recoveryPublicIPAddressId\":\"a\",\"recoveryLBBackendAddressPoolIds\":[\"ejpewpyjlfxampqc\"],\"tfoSubnetName\":\"g\",\"tfoStaticIPAddress\":\"qxbpiatwfauje\",\"tfoPublicIPAddressId\":\"d\",\"tfoLBBackendAddressPoolIds\":[\"r\"]}],\"selectionType\":\"gddhjkrukizyhgs\",\"recoveryNetworkSecurityGroupId\":\"nqskt\",\"enableAcceleratedNetworkingOnRecovery\":true,\"tfoVMNetworkId\":\"jbqggweeiwdhdm\",\"tfoNetworkSecurityGroupId\":\"gbfzu\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"unmlhxdfbklcii\",\"recoveryNicResourceGroupName\":\"gjsysmvxodgwxfkz\",\"reuseExistingNic\":true,\"tfoRecoveryNicName\":\"uvbdujgcwxvec\",\"tfoRecoveryNicResourceGroupName\":\"wjtrdxriza\",\"tfoReuseExistingNic\":false,\"targetNicName\":\"iarks\"},{\"nicId\":\"pgdqxwabzrw\",\"replicaNicId\":\"rxhaclcdosqkp\",\"sourceNicArmId\":\"qgki\",\"vMNetworkName\":\"mainwhed\",\"recoveryVMNetworkId\":\"pbqwuntobu\",\"ipConfigs\":[{\"name\":\"zelwgvydjufbnkl\",\"isPrimary\":false,\"subnetName\":\"peg\",\"staticIPAddress\":\"dabalfdxaglzfytl\",\"ipAddressType\":\"lqhopxouvmrs\",\"isSeletedForFailover\":true,\"recoverySubnetName\":\"kyypzkgxfxfmy\",\"recoveryStaticIPAddress\":\"sdbpokszanmh\",\"recoveryIPAddressType\":\"pter\",\"recoveryPublicIPAddressId\":\"uwkirk\",\"recoveryLBBackendAddressPoolIds\":[\"ztsdetjygow\"],\"tfoSubnetName\":\"cq\",\"tfoStaticIPAddress\":\"lzkgysdgzyybzo\",\"tfoPublicIPAddressId\":\"v\",\"tfoLBBackendAddressPoolIds\":[\"tvdxxhe\",\"gmlilwzghjhjvmab\",\"zbwaybfmdafbgym\"]}],\"selectionType\":\"napreojxrjnbsco\",\"recoveryNetworkSecurityGroupId\":\"avip\",\"enableAcceleratedNetworkingOnRecovery\":false,\"tfoVMNetworkId\":\"hbjizqfsgnwdx\",\"tfoNetworkSecurityGroupId\":\"dpq\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"orxipmlnfyzavfr\",\"recoveryNicResourceGroupName\":\"picdbk\",\"reuseExistingNic\":true,\"tfoRecoveryNicName\":\"aq\",\"tfoRecoveryNicResourceGroupName\":\"mqazpdgonjh\",\"tfoReuseExistingNic\":false,\"targetNicName\":\"hmgpczqulpt\"}],\"vmId\":\"vcpxtzhigqqbtimp\",\"vmProtectionState\":\"blornsih\",\"vmProtectionStateDescription\":\"uds\",\"initialReplicationDetails\":{\"initialReplicationType\":\"uaawja\",\"initialReplicationProgressPercentage\":\"wj\"},\"vMDiskDetails\":[{\"maxSizeMB\":2866605353999992316,\"vhdType\":\"iixyxvqbanosj\",\"vhdId\":\"irnb\",\"vhdName\":\"gm\"},{\"maxSizeMB\":5846955284321514944,\"vhdType\":\"mynltwmpftmfoeaj\",\"vhdId\":\"syxwetamfdd\",\"vhdName\":\"lkpzwbhnrecchd\"},{\"maxSizeMB\":8883677654958515035,\"vhdType\":\"hkahmjedbiucvkh\",\"vhdId\":\"mjpjbweunxcq\",\"vhdName\":\"ihufoihp\"}]}") - .toObject(HyperVReplicaBlueReplicationDetails.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-25T03:28:24Z"), model.lastReplicatedTime()); - Assertions.assertEquals("guwrjm", model.vmNics().get(0).nicId()); - Assertions.assertEquals("vbtuqkxximwg", model.vmNics().get(0).replicaNicId()); - Assertions.assertEquals("ldeko", model.vmNics().get(0).sourceNicArmId()); - Assertions.assertEquals("gxieqfkyfhi", model.vmNics().get(0).vMNetworkName()); - Assertions.assertEquals("jaqupbyynvskpaj", model.vmNics().get(0).recoveryVMNetworkId()); - Assertions.assertEquals("umexmj", model.vmNics().get(0).ipConfigs().get(0).name()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isPrimary()); - Assertions.assertEquals("ccwkqmtx", model.vmNics().get(0).ipConfigs().get(0).subnetName()); - Assertions.assertEquals("eqi", model.vmNics().get(0).ipConfigs().get(0).staticIpAddress()); - Assertions.assertEquals("rpilgftrqrejdaah", model.vmNics().get(0).ipConfigs().get(0).ipAddressType()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("ldahlfxlmu", model.vmNics().get(0).ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("muadjnfsncski", model.vmNics().get(0).ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("shjgczetybnxg", model.vmNics().get(0).ipConfigs().get(0).recoveryIpAddressType()); - Assertions.assertEquals("lcgctjchfjv", model.vmNics().get(0).ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("j", model.vmNics().get(0).ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("oxz", model.vmNics().get(0).ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("psyxjije", model.vmNics().get(0).ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("dvrbke", model.vmNics().get(0).ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("dkgaw", model.vmNics().get(0).ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("fucsaodjnosdkvi", model.vmNics().get(0).selectionType()); - Assertions.assertEquals("asgmatrnzpd", model.vmNics().get(0).recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("akt", model.vmNics().get(0).tfoVMNetworkId()); - Assertions.assertEquals("ktz", model.vmNics().get(0).tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("yfpqd", model.vmNics().get(0).recoveryNicName()); - Assertions.assertEquals("kpp", model.vmNics().get(0).recoveryNicResourceGroupName()); - Assertions.assertEquals(false, model.vmNics().get(0).reuseExistingNic()); - Assertions.assertEquals("tfvpctfjikff", model.vmNics().get(0).tfoRecoveryNicName()); - Assertions.assertEquals("g", model.vmNics().get(0).tfoRecoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).tfoReuseExistingNic()); - Assertions.assertEquals("nwhvuldbkkejj", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals("vcpxtzhigqqbtimp", model.vmId()); - Assertions.assertEquals("blornsih", model.vmProtectionState()); - Assertions.assertEquals("uds", model.vmProtectionStateDescription()); - Assertions.assertEquals("uaawja", model.initialReplicationDetails().initialReplicationType()); - Assertions.assertEquals("wj", model.initialReplicationDetails().initialReplicationProgressPercentage()); - Assertions.assertEquals(2866605353999992316L, model.vMDiskDetails().get(0).maxSizeMB()); - Assertions.assertEquals("iixyxvqbanosj", model.vMDiskDetails().get(0).vhdType()); - Assertions.assertEquals("irnb", model.vMDiskDetails().get(0).vhdId()); - Assertions.assertEquals("gm", model.vMDiskDetails().get(0).vhdName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaBlueReplicationDetails model - = new HyperVReplicaBlueReplicationDetails() - .withLastReplicatedTime(OffsetDateTime.parse("2021-05-25T03:28:24Z")) - .withVmNics( - Arrays - .asList( - new VMNicDetails().withNicId("guwrjm") - .withReplicaNicId("vbtuqkxximwg") - .withSourceNicArmId("ldeko") - .withVMNetworkName("gxieqfkyfhi") - .withRecoveryVMNetworkId("jaqupbyynvskpaj") - .withIpConfigs( - Arrays.asList( - new IpConfigDetails().withName("umexmj") - .withIsPrimary(true) - .withSubnetName("ccwkqmtx") - .withStaticIpAddress("eqi") - .withIpAddressType("rpilgftrqrejdaah") - .withIsSeletedForFailover(true) - .withRecoverySubnetName("ldahlfxlmu") - .withRecoveryStaticIpAddress("muadjnfsncski") - .withRecoveryIpAddressType("shjgczetybnxg") - .withRecoveryPublicIpAddressId("lcgctjchfjv") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("j", "ebecuvlbefv", "cljkxpyl")) - .withTfoSubnetName("oxz") - .withTfoStaticIpAddress("psyxjije") - .withTfoPublicIpAddressId("dvrbke") - .withTfoLBBackendAddressPoolIds( - Arrays.asList("dkgaw", "wjxildfkcefeyg", "q", "jo")), - new IpConfigDetails().withName("fmn") - .withIsPrimary(false) - .withSubnetName("jnxumentq") - .withStaticIpAddress("tw") - .withIpAddressType("mxymulwivqtowlhl") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("ybajasqubf") - .withRecoveryStaticIpAddress("cywhj") - .withRecoveryIpAddressType("mchqoht") - .withRecoveryPublicIpAddressId("cpupukiy") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("pwdlvwti", "smosaonhqnam", "pultas", "aekewnazea")) - .withTfoSubnetName("kajlcyizy") - .withTfoStaticIpAddress("cvxodkrvfsxxby") - .withTfoPublicIpAddressId("sqlv") - .withTfoLBBackendAddressPoolIds( - Arrays.asList("pwgoljt", "xnmxsdobygoogxqa", "j", "vaz")))) - .withSelectionType("fucsaodjnosdkvi") - .withRecoveryNetworkSecurityGroupId("asgmatrnzpd") - .withEnableAcceleratedNetworkingOnRecovery(false) - .withTfoVMNetworkId("akt") - .withTfoNetworkSecurityGroupId("ktz") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("yfpqd") - .withRecoveryNicResourceGroupName("kpp") - .withReuseExistingNic(false) - .withTfoRecoveryNicName("tfvpctfjikff") - .withTfoRecoveryNicResourceGroupName("g") - .withTfoReuseExistingNic(true) - .withTargetNicName("nwhvuldbkkejj"), - new VMNicDetails().withNicId("igaw") - .withReplicaNicId("zmxjqif") - .withSourceNicArmId("jjsbcmlzaahzbhur") - .withVMNetworkName("lkolirhhmoj") - .withRecoveryVMNetworkId("u") - .withIpConfigs(Arrays.asList(new IpConfigDetails().withName("zcvaaxoialahfxwc") - .withIsPrimary(false) - .withSubnetName("xkukm") - .withStaticIpAddress("zynuh") - .withIpAddressType("qeq") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("ljqkxyrqolnthbb") - .withRecoveryStaticIpAddress("gzukw") - .withRecoveryIpAddressType("nzkjthfceyjn") - .withRecoveryPublicIpAddressId("mlfuyfjbp") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("dhlrufzcqyjmq", "fuiocuselq", "rsazrhxud")) - .withTfoSubnetName("mdtff") - .withTfoStaticIpAddress("jmr") - .withTfoPublicIpAddressId("hmwdmdlgyqixokw") - .withTfoLBBackendAddressPoolIds(Arrays.asList("whvagnqfq", "dlcvmyo")))) - .withSelectionType("aymjchtvsnvlaq") - .withRecoveryNetworkSecurityGroupId("z") - .withEnableAcceleratedNetworkingOnRecovery(true) - .withTfoVMNetworkId("atuwqkokbc") - .withTfoNetworkSecurityGroupId("thymgobl") - .withEnableAcceleratedNetworkingOnTfo(true) - .withRecoveryNicName("wgwima") - .withRecoveryNicResourceGroupName("eakhtmhobcya") - .withReuseExistingNic(true) - .withTfoRecoveryNicName("qtvkh") - .withTfoRecoveryNicResourceGroupName("oog") - .withTfoReuseExistingNic(false) - .withTargetNicName("aoaqymhccto"), - new VMNicDetails().withNicId("o") - .withReplicaNicId("rnskby") - .withSourceNicArmId("uhczy") - .withVMNetworkName("vhajpxec") - .withRecoveryVMNetworkId("nwh") - .withIpConfigs(Arrays.asList(new IpConfigDetails() - .withName("awmvgxs") - .withIsPrimary(true) - .withSubnetName("pwirfljfewxqouo") - .withStaticIpAddress("dnmckap") - .withIpAddressType("knq") - .withIsSeletedForFailover(true) - .withRecoverySubnetName("encdgmoqueqihkky") - .withRecoveryStaticIpAddress("ltjouwhldxwh") - .withRecoveryIpAddressType("proqk") - .withRecoveryPublicIpAddressId("fxmcvprstvk") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("fjtdyot")) - .withTfoSubnetName("lfa") - .withTfoStaticIpAddress("occqrqxw") - .withTfoPublicIpAddressId("jtdrhutf") - .withTfoLBBackendAddressPoolIds(Arrays.asList("dtxopgehpadkmdzg")), - new IpConfigDetails().withName("zxvctkbbxuharls") - .withIsPrimary(true) - .withSubnetName("clabv") - .withStaticIpAddress("ngsux") - .withIpAddressType("zb") - .withIsSeletedForFailover(true) - .withRecoverySubnetName("ogh") - .withRecoveryStaticIpAddress("a") - .withRecoveryIpAddressType("janormovdxxu") - .withRecoveryPublicIpAddressId("tujmoil") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("emhdeeljslky", "zdsfzjuegr")) - .withTfoSubnetName("htslejtvxj") - .withTfoStaticIpAddress("vgjbfio") - .withTfoPublicIpAddressId("njodfcbjqqwmtq") - .withTfoLBBackendAddressPoolIds( - Arrays.asList("xsazuxejgw", "cywnfyszza", "zsinqbdnddb")), - new IpConfigDetails().withName("zsyvrmkjm") - .withIsPrimary(true) - .withSubnetName("chwudlxee") - .withStaticIpAddress("tpmnoe") - .withIpAddressType("qlfm") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("oyrfgxk") - .withRecoveryStaticIpAddress("pmypgfq") - .withRecoveryIpAddressType("tyw") - .withRecoveryPublicIpAddressId("a") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("ejpewpyjlfxampqc")) - .withTfoSubnetName("g") - .withTfoStaticIpAddress("qxbpiatwfauje") - .withTfoPublicIpAddressId("d") - .withTfoLBBackendAddressPoolIds(Arrays.asList("r")))) - .withSelectionType("gddhjkrukizyhgs") - .withRecoveryNetworkSecurityGroupId("nqskt") - .withEnableAcceleratedNetworkingOnRecovery(true) - .withTfoVMNetworkId("jbqggweeiwdhdm") - .withTfoNetworkSecurityGroupId("gbfzu") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("unmlhxdfbklcii") - .withRecoveryNicResourceGroupName("gjsysmvxodgwxfkz") - .withReuseExistingNic(true) - .withTfoRecoveryNicName("uvbdujgcwxvec") - .withTfoRecoveryNicResourceGroupName("wjtrdxriza") - .withTfoReuseExistingNic(false) - .withTargetNicName("iarks"), - new VMNicDetails().withNicId("pgdqxwabzrw") - .withReplicaNicId("rxhaclcdosqkp") - .withSourceNicArmId("qgki") - .withVMNetworkName("mainwhed") - .withRecoveryVMNetworkId("pbqwuntobu") - .withIpConfigs(Arrays.asList(new IpConfigDetails().withName("zelwgvydjufbnkl") - .withIsPrimary(false) - .withSubnetName("peg") - .withStaticIpAddress("dabalfdxaglzfytl") - .withIpAddressType("lqhopxouvmrs") - .withIsSeletedForFailover(true) - .withRecoverySubnetName("kyypzkgxfxfmy") - .withRecoveryStaticIpAddress("sdbpokszanmh") - .withRecoveryIpAddressType("pter") - .withRecoveryPublicIpAddressId("uwkirk") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("ztsdetjygow")) - .withTfoSubnetName("cq") - .withTfoStaticIpAddress("lzkgysdgzyybzo") - .withTfoPublicIpAddressId("v") - .withTfoLBBackendAddressPoolIds( - Arrays.asList("tvdxxhe", "gmlilwzghjhjvmab", "zbwaybfmdafbgym")))) - .withSelectionType("napreojxrjnbsco") - .withRecoveryNetworkSecurityGroupId("avip") - .withEnableAcceleratedNetworkingOnRecovery(false) - .withTfoVMNetworkId("hbjizqfsgnwdx") - .withTfoNetworkSecurityGroupId("dpq") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("orxipmlnfyzavfr") - .withRecoveryNicResourceGroupName("picdbk") - .withReuseExistingNic(true) - .withTfoRecoveryNicName("aq") - .withTfoRecoveryNicResourceGroupName("mqazpdgonjh") - .withTfoReuseExistingNic(false) - .withTargetNicName("hmgpczqulpt"))) - .withVmId("vcpxtzhigqqbtimp") - .withVmProtectionState("blornsih") - .withVmProtectionStateDescription("uds") - .withInitialReplicationDetails(new InitialReplicationDetails().withInitialReplicationType("uaawja") - .withInitialReplicationProgressPercentage("wj")) - .withVMDiskDetails(Arrays.asList( - new DiskDetails().withMaxSizeMB(2866605353999992316L) - .withVhdType("iixyxvqbanosj") - .withVhdId("irnb") - .withVhdName("gm"), - new DiskDetails().withMaxSizeMB(5846955284321514944L) - .withVhdType("mynltwmpftmfoeaj") - .withVhdId("syxwetamfdd") - .withVhdName("lkpzwbhnrecchd"), - new DiskDetails().withMaxSizeMB(8883677654958515035L) - .withVhdType("hkahmjedbiucvkh") - .withVhdId("mjpjbweunxcq") - .withVhdName("ihufoihp"))); - model = BinaryData.fromObject(model).toObject(HyperVReplicaBlueReplicationDetails.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-25T03:28:24Z"), model.lastReplicatedTime()); - Assertions.assertEquals("guwrjm", model.vmNics().get(0).nicId()); - Assertions.assertEquals("vbtuqkxximwg", model.vmNics().get(0).replicaNicId()); - Assertions.assertEquals("ldeko", model.vmNics().get(0).sourceNicArmId()); - Assertions.assertEquals("gxieqfkyfhi", model.vmNics().get(0).vMNetworkName()); - Assertions.assertEquals("jaqupbyynvskpaj", model.vmNics().get(0).recoveryVMNetworkId()); - Assertions.assertEquals("umexmj", model.vmNics().get(0).ipConfigs().get(0).name()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isPrimary()); - Assertions.assertEquals("ccwkqmtx", model.vmNics().get(0).ipConfigs().get(0).subnetName()); - Assertions.assertEquals("eqi", model.vmNics().get(0).ipConfigs().get(0).staticIpAddress()); - Assertions.assertEquals("rpilgftrqrejdaah", model.vmNics().get(0).ipConfigs().get(0).ipAddressType()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("ldahlfxlmu", model.vmNics().get(0).ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("muadjnfsncski", model.vmNics().get(0).ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("shjgczetybnxg", model.vmNics().get(0).ipConfigs().get(0).recoveryIpAddressType()); - Assertions.assertEquals("lcgctjchfjv", model.vmNics().get(0).ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("j", model.vmNics().get(0).ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("oxz", model.vmNics().get(0).ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("psyxjije", model.vmNics().get(0).ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("dvrbke", model.vmNics().get(0).ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("dkgaw", model.vmNics().get(0).ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("fucsaodjnosdkvi", model.vmNics().get(0).selectionType()); - Assertions.assertEquals("asgmatrnzpd", model.vmNics().get(0).recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("akt", model.vmNics().get(0).tfoVMNetworkId()); - Assertions.assertEquals("ktz", model.vmNics().get(0).tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("yfpqd", model.vmNics().get(0).recoveryNicName()); - Assertions.assertEquals("kpp", model.vmNics().get(0).recoveryNicResourceGroupName()); - Assertions.assertEquals(false, model.vmNics().get(0).reuseExistingNic()); - Assertions.assertEquals("tfvpctfjikff", model.vmNics().get(0).tfoRecoveryNicName()); - Assertions.assertEquals("g", model.vmNics().get(0).tfoRecoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).tfoReuseExistingNic()); - Assertions.assertEquals("nwhvuldbkkejj", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals("vcpxtzhigqqbtimp", model.vmId()); - Assertions.assertEquals("blornsih", model.vmProtectionState()); - Assertions.assertEquals("uds", model.vmProtectionStateDescription()); - Assertions.assertEquals("uaawja", model.initialReplicationDetails().initialReplicationType()); - Assertions.assertEquals("wj", model.initialReplicationDetails().initialReplicationProgressPercentage()); - Assertions.assertEquals(2866605353999992316L, model.vMDiskDetails().get(0).maxSizeMB()); - Assertions.assertEquals("iixyxvqbanosj", model.vMDiskDetails().get(0).vhdType()); - Assertions.assertEquals("irnb", model.vMDiskDetails().get(0).vhdId()); - Assertions.assertEquals("gm", model.vMDiskDetails().get(0).vhdName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaPolicyDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaPolicyDetailsTests.java deleted file mode 100644 index 4573ad4c5722..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaPolicyDetailsTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaPolicyDetails; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaPolicyDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaPolicyDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplica2012\",\"recoveryPoints\":1458640473,\"applicationConsistentSnapshotFrequencyInHours\":1422455142,\"compression\":\"gnzuzpbgkzcsc\",\"initialReplicationMethod\":\"uzvkunhdimjuk\",\"onlineReplicationStartTime\":\"r\",\"offlineReplicationImportPath\":\"a\",\"offlineReplicationExportPath\":\"pucdocf\",\"replicationPort\":1596172374,\"allowedAuthenticationType\":657887640,\"replicaDeletionOption\":\"f\"}") - .toObject(HyperVReplicaPolicyDetails.class); - Assertions.assertEquals(1458640473, model.recoveryPoints()); - Assertions.assertEquals(1422455142, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals("gnzuzpbgkzcsc", model.compression()); - Assertions.assertEquals("uzvkunhdimjuk", model.initialReplicationMethod()); - Assertions.assertEquals("r", model.onlineReplicationStartTime()); - Assertions.assertEquals("a", model.offlineReplicationImportPath()); - Assertions.assertEquals("pucdocf", model.offlineReplicationExportPath()); - Assertions.assertEquals(1596172374, model.replicationPort()); - Assertions.assertEquals(657887640, model.allowedAuthenticationType()); - Assertions.assertEquals("f", model.replicaDeletionOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaPolicyDetails model = new HyperVReplicaPolicyDetails().withRecoveryPoints(1458640473) - .withApplicationConsistentSnapshotFrequencyInHours(1422455142) - .withCompression("gnzuzpbgkzcsc") - .withInitialReplicationMethod("uzvkunhdimjuk") - .withOnlineReplicationStartTime("r") - .withOfflineReplicationImportPath("a") - .withOfflineReplicationExportPath("pucdocf") - .withReplicationPort(1596172374) - .withAllowedAuthenticationType(657887640) - .withReplicaDeletionOption("f"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaPolicyDetails.class); - Assertions.assertEquals(1458640473, model.recoveryPoints()); - Assertions.assertEquals(1422455142, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals("gnzuzpbgkzcsc", model.compression()); - Assertions.assertEquals("uzvkunhdimjuk", model.initialReplicationMethod()); - Assertions.assertEquals("r", model.onlineReplicationStartTime()); - Assertions.assertEquals("a", model.offlineReplicationImportPath()); - Assertions.assertEquals("pucdocf", model.offlineReplicationExportPath()); - Assertions.assertEquals(1596172374, model.replicationPort()); - Assertions.assertEquals(657887640, model.allowedAuthenticationType()); - Assertions.assertEquals("f", model.replicaDeletionOption()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaPolicyInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaPolicyInputTests.java deleted file mode 100644 index 6a99cb533334..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaPolicyInputTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaPolicyInput; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaPolicyInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaPolicyInput model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplica2012\",\"recoveryPoints\":1848793230,\"applicationConsistentSnapshotFrequencyInHours\":60033751,\"compression\":\"apbxwieexuyade\",\"initialReplicationMethod\":\"tfo\",\"onlineReplicationStartTime\":\"k\",\"offlineReplicationImportPath\":\"imyc\",\"offlineReplicationExportPath\":\"r\",\"replicationPort\":360310908,\"allowedAuthenticationType\":1678727382,\"replicaDeletion\":\"nnuifersej\"}") - .toObject(HyperVReplicaPolicyInput.class); - Assertions.assertEquals(1848793230, model.recoveryPoints()); - Assertions.assertEquals(60033751, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals("apbxwieexuyade", model.compression()); - Assertions.assertEquals("tfo", model.initialReplicationMethod()); - Assertions.assertEquals("k", model.onlineReplicationStartTime()); - Assertions.assertEquals("imyc", model.offlineReplicationImportPath()); - Assertions.assertEquals("r", model.offlineReplicationExportPath()); - Assertions.assertEquals(360310908, model.replicationPort()); - Assertions.assertEquals(1678727382, model.allowedAuthenticationType()); - Assertions.assertEquals("nnuifersej", model.replicaDeletion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaPolicyInput model = new HyperVReplicaPolicyInput().withRecoveryPoints(1848793230) - .withApplicationConsistentSnapshotFrequencyInHours(60033751) - .withCompression("apbxwieexuyade") - .withInitialReplicationMethod("tfo") - .withOnlineReplicationStartTime("k") - .withOfflineReplicationImportPath("imyc") - .withOfflineReplicationExportPath("r") - .withReplicationPort(360310908) - .withAllowedAuthenticationType(1678727382) - .withReplicaDeletion("nnuifersej"); - model = BinaryData.fromObject(model).toObject(HyperVReplicaPolicyInput.class); - Assertions.assertEquals(1848793230, model.recoveryPoints()); - Assertions.assertEquals(60033751, model.applicationConsistentSnapshotFrequencyInHours()); - Assertions.assertEquals("apbxwieexuyade", model.compression()); - Assertions.assertEquals("tfo", model.initialReplicationMethod()); - Assertions.assertEquals("k", model.onlineReplicationStartTime()); - Assertions.assertEquals("imyc", model.offlineReplicationImportPath()); - Assertions.assertEquals("r", model.offlineReplicationExportPath()); - Assertions.assertEquals(360310908, model.replicationPort()); - Assertions.assertEquals(1678727382, model.allowedAuthenticationType()); - Assertions.assertEquals("nnuifersej", model.replicaDeletion()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaReplicationDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaReplicationDetailsTests.java deleted file mode 100644 index 35828e7aa3cb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVReplicaReplicationDetailsTests.java +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaReplicationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InitialReplicationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IpConfigDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMNicDetails; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HyperVReplicaReplicationDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVReplicaReplicationDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplica2012\",\"lastReplicatedTime\":\"2021-02-08T01:34:17Z\",\"vmNics\":[{\"nicId\":\"lvzkl\",\"replicaNicId\":\"bgikyjtkakvlbi\",\"sourceNicArmId\":\"jvpzaptuoskaoiz\",\"vMNetworkName\":\"xwfgcdiykkcx\",\"recoveryVMNetworkId\":\"ujvqynvavit\",\"ipConfigs\":[{\"name\":\"qohhihra\",\"isPrimary\":false,\"subnetName\":\"drwjcljbrhlh\",\"staticIPAddress\":\"zadbwe\",\"ipAddressType\":\"inafhxrzfrm\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"ucwviqllukhkrcq\",\"recoveryStaticIPAddress\":\"cbvzarmqcb\",\"recoveryIPAddressType\":\"kst\",\"recoveryPublicIPAddressId\":\"nvago\",\"recoveryLBBackendAddressPoolIds\":[\"hdrx\",\"rdvcehqwhit\"],\"tfoSubnetName\":\"mxgnmguzbuwv\",\"tfoStaticIPAddress\":\"balkjnbkbdhl\",\"tfoPublicIPAddressId\":\"q\",\"tfoLBBackendAddressPoolIds\":[\"kqsy\",\"xiynecovagzk\",\"eubanlxunpqcc\",\"qiawzl\"]},{\"name\":\"laslgacizux\",\"isPrimary\":false,\"subnetName\":\"wp\",\"staticIPAddress\":\"saudoejtighsx\",\"ipAddressType\":\"ytnkqb\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"ovu\",\"recoveryStaticIPAddress\":\"xhmehjnhjiotif\",\"recoveryIPAddressType\":\"bcngkegxc\",\"recoveryPublicIPAddressId\":\"xbbfetwil\",\"recoveryLBBackendAddressPoolIds\":[\"oxpdxq\"],\"tfoSubnetName\":\"r\",\"tfoStaticIPAddress\":\"qownkiuajewnahw\",\"tfoPublicIPAddressId\":\"jjmztnlmsoodtmv\",\"tfoLBBackendAddressPoolIds\":[\"hdyswcrptveajc\",\"xvl\",\"srg\",\"rfizr\"]}],\"selectionType\":\"wlp\",\"recoveryNetworkSecurityGroupId\":\"uqhrlmcskykp\",\"enableAcceleratedNetworkingOnRecovery\":false,\"tfoVMNetworkId\":\"ixcnpcf\",\"tfoNetworkSecurityGroupId\":\"kpyyc\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"pjprdpwr\",\"recoveryNicResourceGroupName\":\"fpcfjf\",\"reuseExistingNic\":true,\"tfoRecoveryNicName\":\"z\",\"tfoRecoveryNicResourceGroupName\":\"kgyepe\",\"tfoReuseExistingNic\":true,\"targetNicName\":\"nidmdiaw\"},{\"nicId\":\"xkzrn\",\"replicaNicId\":\"kctd\",\"sourceNicArmId\":\"osgwqpsqazihqo\",\"vMNetworkName\":\"qgcnbhcbmjk\",\"recoveryVMNetworkId\":\"ibniynts\",\"ipConfigs\":[{\"name\":\"mef\",\"isPrimary\":false,\"subnetName\":\"moogjrhskbwgm\",\"staticIPAddress\":\"rulcfogx\",\"ipAddressType\":\"xnwjtpfdzxcouz\",\"isSeletedForFailover\":true,\"recoverySubnetName\":\"wakukzkdtzxs\",\"recoveryStaticIPAddress\":\"dnlwglihezomuc\",\"recoveryIPAddressType\":\"g\",\"recoveryPublicIPAddressId\":\"nione\",\"recoveryLBBackendAddressPoolIds\":[\"dr\"],\"tfoSubnetName\":\"uenxkgtlzlmt\",\"tfoStaticIPAddress\":\"xcznnhzkb\",\"tfoPublicIPAddressId\":\"mxlxmwtygeq\",\"tfoLBBackendAddressPoolIds\":[\"itoqcahfsg\"]},{\"name\":\"mlree\",\"isPrimary\":true,\"subnetName\":\"sszvlcw\",\"staticIPAddress\":\"solntfxxcrqmipf\",\"ipAddressType\":\"foygizmshxxba\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"ulnvgskj\",\"recoveryStaticIPAddress\":\"xjdzjs\",\"recoveryIPAddressType\":\"nvhxqqmqip\",\"recoveryPublicIPAddressId\":\"dhfnzocxmtfshksn\",\"recoveryLBBackendAddressPoolIds\":[\"spamwbwmbnls\",\"cefiqdkt\",\"tkvi\",\"lpfliwoyn\"],\"tfoSubnetName\":\"uzhwvladpcmhjhau\",\"tfoStaticIPAddress\":\"b\",\"tfoPublicIPAddressId\":\"kymffztsils\",\"tfoLBBackendAddressPoolIds\":[\"syeiih\"]},{\"name\":\"mkouihyeseuugci\",\"isPrimary\":true,\"subnetName\":\"gsmgb\",\"staticIPAddress\":\"tdwrqbebjnfve\",\"ipAddressType\":\"abtvkbi\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"tfgfic\",\"recoveryStaticIPAddress\":\"yhizpaczmu\",\"recoveryIPAddressType\":\"cakznhokhoitwhrj\",\"recoveryPublicIPAddressId\":\"mmazdnckid\",\"recoveryLBBackendAddressPoolIds\":[\"glhzqp\",\"zbawkikcdgfh\"],\"tfoSubnetName\":\"sd\",\"tfoStaticIPAddress\":\"ey\",\"tfoPublicIPAddressId\":\"xdede\",\"tfoLBBackendAddressPoolIds\":[\"wh\",\"gxsur\",\"jqrshz\"]}],\"selectionType\":\"g\",\"recoveryNetworkSecurityGroupId\":\"lcxiqqzjko\",\"enableAcceleratedNetworkingOnRecovery\":true,\"tfoVMNetworkId\":\"n\",\"tfoNetworkSecurityGroupId\":\"gl\",\"enableAcceleratedNetworkingOnTfo\":true,\"recoveryNicName\":\"gd\",\"recoveryNicResourceGroupName\":\"ivj\",\"reuseExistingNic\":false,\"tfoRecoveryNicName\":\"dqqigdydkghpc\",\"tfoRecoveryNicResourceGroupName\":\"wqirvtktyhhm\",\"tfoReuseExistingNic\":true,\"targetNicName\":\"apj\"},{\"nicId\":\"odmkrrwepgqv\",\"replicaNicId\":\"kqlujqgira\",\"sourceNicArmId\":\"lyvxchp\",\"vMNetworkName\":\"ctsfaeuhwwsknst\",\"recoveryVMNetworkId\":\"uzhasupmlppdpgz\",\"ipConfigs\":[{\"name\":\"z\",\"isPrimary\":false,\"subnetName\":\"rkptgongruats\",\"staticIPAddress\":\"y\",\"ipAddressType\":\"qheni\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"ngu\",\"recoveryStaticIPAddress\":\"byjdeayscse\",\"recoveryIPAddressType\":\"zjemexmnvkvm\",\"recoveryPublicIPAddressId\":\"rxl\",\"recoveryLBBackendAddressPoolIds\":[\"m\",\"pm\",\"rdlhvdvmiphbe\",\"eqjzm\"],\"tfoSubnetName\":\"dclacroczfmun\",\"tfoStaticIPAddress\":\"keluxz\",\"tfoPublicIPAddressId\":\"xzezbzuzudlevzs\",\"tfoLBBackendAddressPoolIds\":[\"cgwfsgqkstyecu\",\"yu\",\"jparda\"]},{\"name\":\"jcfmazpzdqw\",\"isPrimary\":false,\"subnetName\":\"mcokxizeku\",\"staticIPAddress\":\"rjwuca\",\"ipAddressType\":\"zvajbvbnkrdem\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"ckzidgzwdydami\",\"recoveryStaticIPAddress\":\"pztdivyk\",\"recoveryIPAddressType\":\"kqejtpjfojiunr\",\"recoveryPublicIPAddressId\":\"hxuk\",\"recoveryLBBackendAddressPoolIds\":[\"kdtoiboancdr\"],\"tfoSubnetName\":\"anvxuldxonckb\",\"tfoStaticIPAddress\":\"blfxlupibaqzi\",\"tfoPublicIPAddressId\":\"zpzwegh\",\"tfoLBBackendAddressPoolIds\":[\"bogvgfklqiy\",\"dve\",\"elsbfvd\"]},{\"name\":\"rk\",\"isPrimary\":false,\"subnetName\":\"tznsvl\",\"staticIPAddress\":\"smovpi\",\"ipAddressType\":\"ndnoxaxnrqaq\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"dxolousdv\",\"recoveryStaticIPAddress\":\"ptqmawzjdrpiz\",\"recoveryIPAddressType\":\"l\",\"recoveryPublicIPAddressId\":\"ctsdbtqgkujds\",\"recoveryLBBackendAddressPoolIds\":[\"r\",\"w\"],\"tfoSubnetName\":\"urbti\",\"tfoStaticIPAddress\":\"pdyarikeejdpd\",\"tfoPublicIPAddressId\":\"twmmkfqbriqu\",\"tfoLBBackendAddressPoolIds\":[\"trj\",\"eqkvyhzokpoyu\",\"h\",\"ensnaa\"]},{\"name\":\"hmpoe\",\"isPrimary\":false,\"subnetName\":\"pwsadaxjsumxpe\",\"staticIPAddress\":\"oio\",\"ipAddressType\":\"rmfqzwq\",\"isSeletedForFailover\":true,\"recoverySubnetName\":\"eedcnwmywx\",\"recoveryStaticIPAddress\":\"zkvemy\",\"recoveryIPAddressType\":\"pczaqpqif\",\"recoveryPublicIPAddressId\":\"m\",\"recoveryLBBackendAddressPoolIds\":[\"wtxzuisam\"],\"tfoSubnetName\":\"at\",\"tfoStaticIPAddress\":\"zexroqsqjgh\",\"tfoPublicIPAddressId\":\"thsplwsttxsr\",\"tfoLBBackendAddressPoolIds\":[\"qpaniceovxgzwhs\"]}],\"selectionType\":\"rujmti\",\"recoveryNetworkSecurityGroupId\":\"s\",\"enableAcceleratedNetworkingOnRecovery\":false,\"tfoVMNetworkId\":\"ohzixyqhfnkvycqq\",\"tfoNetworkSecurityGroupId\":\"seip\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"zxhrptyodlhkfktl\",\"recoveryNicResourceGroupName\":\"dsobjopnouhbq\",\"reuseExistingNic\":false,\"tfoRecoveryNicName\":\"xs\",\"tfoRecoveryNicResourceGroupName\":\"uzyigfcvcewbwqhd\",\"tfoReuseExistingNic\":false,\"targetNicName\":\"atm\"}],\"vmId\":\"c\",\"vmProtectionState\":\"zdfsqxhyqmr\",\"vmProtectionStateDescription\":\"parn\",\"initialReplicationDetails\":{\"initialReplicationType\":\"rsz\",\"initialReplicationProgressPercentage\":\"wtdrcwg\"},\"vMDiskDetails\":[{\"maxSizeMB\":4300016577167436223,\"vhdType\":\"hhfi\",\"vhdId\":\"cfculzj\",\"vhdName\":\"hp\"}]}") - .toObject(HyperVReplicaReplicationDetails.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T01:34:17Z"), model.lastReplicatedTime()); - Assertions.assertEquals("lvzkl", model.vmNics().get(0).nicId()); - Assertions.assertEquals("bgikyjtkakvlbi", model.vmNics().get(0).replicaNicId()); - Assertions.assertEquals("jvpzaptuoskaoiz", model.vmNics().get(0).sourceNicArmId()); - Assertions.assertEquals("xwfgcdiykkcx", model.vmNics().get(0).vMNetworkName()); - Assertions.assertEquals("ujvqynvavit", model.vmNics().get(0).recoveryVMNetworkId()); - Assertions.assertEquals("qohhihra", model.vmNics().get(0).ipConfigs().get(0).name()); - Assertions.assertEquals(false, model.vmNics().get(0).ipConfigs().get(0).isPrimary()); - Assertions.assertEquals("drwjcljbrhlh", model.vmNics().get(0).ipConfigs().get(0).subnetName()); - Assertions.assertEquals("zadbwe", model.vmNics().get(0).ipConfigs().get(0).staticIpAddress()); - Assertions.assertEquals("inafhxrzfrm", model.vmNics().get(0).ipConfigs().get(0).ipAddressType()); - Assertions.assertEquals(false, model.vmNics().get(0).ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("ucwviqllukhkrcq", model.vmNics().get(0).ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("cbvzarmqcb", model.vmNics().get(0).ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("kst", model.vmNics().get(0).ipConfigs().get(0).recoveryIpAddressType()); - Assertions.assertEquals("nvago", model.vmNics().get(0).ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("hdrx", - model.vmNics().get(0).ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("mxgnmguzbuwv", model.vmNics().get(0).ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("balkjnbkbdhl", model.vmNics().get(0).ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("q", model.vmNics().get(0).ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("kqsy", model.vmNics().get(0).ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("wlp", model.vmNics().get(0).selectionType()); - Assertions.assertEquals("uqhrlmcskykp", model.vmNics().get(0).recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("ixcnpcf", model.vmNics().get(0).tfoVMNetworkId()); - Assertions.assertEquals("kpyyc", model.vmNics().get(0).tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("pjprdpwr", model.vmNics().get(0).recoveryNicName()); - Assertions.assertEquals("fpcfjf", model.vmNics().get(0).recoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).reuseExistingNic()); - Assertions.assertEquals("z", model.vmNics().get(0).tfoRecoveryNicName()); - Assertions.assertEquals("kgyepe", model.vmNics().get(0).tfoRecoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).tfoReuseExistingNic()); - Assertions.assertEquals("nidmdiaw", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals("c", model.vmId()); - Assertions.assertEquals("zdfsqxhyqmr", model.vmProtectionState()); - Assertions.assertEquals("parn", model.vmProtectionStateDescription()); - Assertions.assertEquals("rsz", model.initialReplicationDetails().initialReplicationType()); - Assertions.assertEquals("wtdrcwg", model.initialReplicationDetails().initialReplicationProgressPercentage()); - Assertions.assertEquals(4300016577167436223L, model.vMDiskDetails().get(0).maxSizeMB()); - Assertions.assertEquals("hhfi", model.vMDiskDetails().get(0).vhdType()); - Assertions.assertEquals("cfculzj", model.vMDiskDetails().get(0).vhdId()); - Assertions.assertEquals("hp", model.vMDiskDetails().get(0).vhdName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVReplicaReplicationDetails model - = new HyperVReplicaReplicationDetails().withLastReplicatedTime(OffsetDateTime.parse("2021-02-08T01:34:17Z")) - .withVmNics( - Arrays - .asList( - new VMNicDetails().withNicId("lvzkl") - .withReplicaNicId("bgikyjtkakvlbi") - .withSourceNicArmId("jvpzaptuoskaoiz") - .withVMNetworkName("xwfgcdiykkcx") - .withRecoveryVMNetworkId("ujvqynvavit") - .withIpConfigs( - Arrays - .asList( - new IpConfigDetails().withName("qohhihra") - .withIsPrimary(false) - .withSubnetName("drwjcljbrhlh") - .withStaticIpAddress("zadbwe") - .withIpAddressType("inafhxrzfrm") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("ucwviqllukhkrcq") - .withRecoveryStaticIpAddress("cbvzarmqcb") - .withRecoveryIpAddressType("kst") - .withRecoveryPublicIpAddressId("nvago") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("hdrx", "rdvcehqwhit")) - .withTfoSubnetName("mxgnmguzbuwv") - .withTfoStaticIpAddress("balkjnbkbdhl") - .withTfoPublicIpAddressId("q") - .withTfoLBBackendAddressPoolIds( - Arrays.asList("kqsy", "xiynecovagzk", "eubanlxunpqcc", "qiawzl")), - new IpConfigDetails().withName("laslgacizux") - .withIsPrimary(false) - .withSubnetName("wp") - .withStaticIpAddress("saudoejtighsx") - .withIpAddressType("ytnkqb") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("ovu") - .withRecoveryStaticIpAddress("xhmehjnhjiotif") - .withRecoveryIpAddressType("bcngkegxc") - .withRecoveryPublicIpAddressId("xbbfetwil") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("oxpdxq")) - .withTfoSubnetName("r") - .withTfoStaticIpAddress("qownkiuajewnahw") - .withTfoPublicIpAddressId("jjmztnlmsoodtmv") - .withTfoLBBackendAddressPoolIds( - Arrays.asList("hdyswcrptveajc", "xvl", "srg", "rfizr")))) - .withSelectionType("wlp") - .withRecoveryNetworkSecurityGroupId("uqhrlmcskykp") - .withEnableAcceleratedNetworkingOnRecovery(false) - .withTfoVMNetworkId("ixcnpcf") - .withTfoNetworkSecurityGroupId("kpyyc") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("pjprdpwr") - .withRecoveryNicResourceGroupName("fpcfjf") - .withReuseExistingNic(true) - .withTfoRecoveryNicName("z") - .withTfoRecoveryNicResourceGroupName("kgyepe") - .withTfoReuseExistingNic(true) - .withTargetNicName("nidmdiaw"), - new VMNicDetails().withNicId("xkzrn") - .withReplicaNicId("kctd") - .withSourceNicArmId("osgwqpsqazihqo") - .withVMNetworkName("qgcnbhcbmjk") - .withRecoveryVMNetworkId("ibniynts") - .withIpConfigs(Arrays.asList( - new IpConfigDetails().withName("mef") - .withIsPrimary(false) - .withSubnetName("moogjrhskbwgm") - .withStaticIpAddress("rulcfogx") - .withIpAddressType("xnwjtpfdzxcouz") - .withIsSeletedForFailover(true) - .withRecoverySubnetName("wakukzkdtzxs") - .withRecoveryStaticIpAddress("dnlwglihezomuc") - .withRecoveryIpAddressType("g") - .withRecoveryPublicIpAddressId("nione") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("dr")) - .withTfoSubnetName("uenxkgtlzlmt") - .withTfoStaticIpAddress("xcznnhzkb") - .withTfoPublicIpAddressId("mxlxmwtygeq") - .withTfoLBBackendAddressPoolIds(Arrays.asList("itoqcahfsg")), - new IpConfigDetails().withName("mlree") - .withIsPrimary(true) - .withSubnetName("sszvlcw") - .withStaticIpAddress("solntfxxcrqmipf") - .withIpAddressType("foygizmshxxba") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("ulnvgskj") - .withRecoveryStaticIpAddress("xjdzjs") - .withRecoveryIpAddressType("nvhxqqmqip") - .withRecoveryPublicIpAddressId("dhfnzocxmtfshksn") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("spamwbwmbnls", "cefiqdkt", "tkvi", "lpfliwoyn")) - .withTfoSubnetName("uzhwvladpcmhjhau") - .withTfoStaticIpAddress("b") - .withTfoPublicIpAddressId("kymffztsils") - .withTfoLBBackendAddressPoolIds(Arrays.asList("syeiih")), - new IpConfigDetails().withName("mkouihyeseuugci") - .withIsPrimary(true) - .withSubnetName("gsmgb") - .withStaticIpAddress("tdwrqbebjnfve") - .withIpAddressType("abtvkbi") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("tfgfic") - .withRecoveryStaticIpAddress("yhizpaczmu") - .withRecoveryIpAddressType("cakznhokhoitwhrj") - .withRecoveryPublicIpAddressId("mmazdnckid") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("glhzqp", "zbawkikcdgfh")) - .withTfoSubnetName("sd") - .withTfoStaticIpAddress("ey") - .withTfoPublicIpAddressId("xdede") - .withTfoLBBackendAddressPoolIds(Arrays.asList("wh", "gxsur", "jqrshz")))) - .withSelectionType("g") - .withRecoveryNetworkSecurityGroupId("lcxiqqzjko") - .withEnableAcceleratedNetworkingOnRecovery(true) - .withTfoVMNetworkId("n") - .withTfoNetworkSecurityGroupId("gl") - .withEnableAcceleratedNetworkingOnTfo(true) - .withRecoveryNicName("gd") - .withRecoveryNicResourceGroupName("ivj") - .withReuseExistingNic(false) - .withTfoRecoveryNicName("dqqigdydkghpc") - .withTfoRecoveryNicResourceGroupName("wqirvtktyhhm") - .withTfoReuseExistingNic(true) - .withTargetNicName("apj"), - new VMNicDetails().withNicId("odmkrrwepgqv") - .withReplicaNicId("kqlujqgira") - .withSourceNicArmId("lyvxchp") - .withVMNetworkName("ctsfaeuhwwsknst") - .withRecoveryVMNetworkId("uzhasupmlppdpgz") - .withIpConfigs(Arrays.asList( - new IpConfigDetails().withName("z") - .withIsPrimary(false) - .withSubnetName("rkptgongruats") - .withStaticIpAddress("y") - .withIpAddressType("qheni") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("ngu") - .withRecoveryStaticIpAddress("byjdeayscse") - .withRecoveryIpAddressType("zjemexmnvkvm") - .withRecoveryPublicIpAddressId("rxl") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("m", "pm", "rdlhvdvmiphbe", "eqjzm")) - .withTfoSubnetName("dclacroczfmun") - .withTfoStaticIpAddress("keluxz") - .withTfoPublicIpAddressId("xzezbzuzudlevzs") - .withTfoLBBackendAddressPoolIds( - Arrays.asList("cgwfsgqkstyecu", "yu", "jparda")), - new IpConfigDetails().withName("jcfmazpzdqw") - .withIsPrimary(false) - .withSubnetName("mcokxizeku") - .withStaticIpAddress("rjwuca") - .withIpAddressType("zvajbvbnkrdem") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("ckzidgzwdydami") - .withRecoveryStaticIpAddress("pztdivyk") - .withRecoveryIpAddressType("kqejtpjfojiunr") - .withRecoveryPublicIpAddressId("hxuk") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("kdtoiboancdr")) - .withTfoSubnetName("anvxuldxonckb") - .withTfoStaticIpAddress("blfxlupibaqzi") - .withTfoPublicIpAddressId("zpzwegh") - .withTfoLBBackendAddressPoolIds(Arrays.asList("bogvgfklqiy", "dve", "elsbfvd")), - new IpConfigDetails().withName("rk") - .withIsPrimary(false) - .withSubnetName("tznsvl") - .withStaticIpAddress("smovpi") - .withIpAddressType("ndnoxaxnrqaq") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("dxolousdv") - .withRecoveryStaticIpAddress("ptqmawzjdrpiz") - .withRecoveryIpAddressType("l") - .withRecoveryPublicIpAddressId("ctsdbtqgkujds") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("r", "w")) - .withTfoSubnetName("urbti") - .withTfoStaticIpAddress("pdyarikeejdpd") - .withTfoPublicIpAddressId("twmmkfqbriqu") - .withTfoLBBackendAddressPoolIds( - Arrays.asList("trj", "eqkvyhzokpoyu", "h", "ensnaa")), - new IpConfigDetails().withName("hmpoe") - .withIsPrimary(false) - .withSubnetName("pwsadaxjsumxpe") - .withStaticIpAddress("oio") - .withIpAddressType("rmfqzwq") - .withIsSeletedForFailover(true) - .withRecoverySubnetName("eedcnwmywx") - .withRecoveryStaticIpAddress("zkvemy") - .withRecoveryIpAddressType("pczaqpqif") - .withRecoveryPublicIpAddressId("m") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("wtxzuisam")) - .withTfoSubnetName("at") - .withTfoStaticIpAddress("zexroqsqjgh") - .withTfoPublicIpAddressId("thsplwsttxsr") - .withTfoLBBackendAddressPoolIds(Arrays.asList("qpaniceovxgzwhs")))) - .withSelectionType("rujmti") - .withRecoveryNetworkSecurityGroupId("s") - .withEnableAcceleratedNetworkingOnRecovery(false) - .withTfoVMNetworkId("ohzixyqhfnkvycqq") - .withTfoNetworkSecurityGroupId("seip") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("zxhrptyodlhkfktl") - .withRecoveryNicResourceGroupName("dsobjopnouhbq") - .withReuseExistingNic(false) - .withTfoRecoveryNicName("xs") - .withTfoRecoveryNicResourceGroupName("uzyigfcvcewbwqhd") - .withTfoReuseExistingNic(false) - .withTargetNicName("atm"))) - .withVmId("c") - .withVmProtectionState("zdfsqxhyqmr") - .withVmProtectionStateDescription("parn") - .withInitialReplicationDetails(new InitialReplicationDetails().withInitialReplicationType("rsz") - .withInitialReplicationProgressPercentage("wtdrcwg")) - .withVMDiskDetails(Arrays.asList(new DiskDetails().withMaxSizeMB(4300016577167436223L) - .withVhdType("hhfi") - .withVhdId("cfculzj") - .withVhdName("hp"))); - model = BinaryData.fromObject(model).toObject(HyperVReplicaReplicationDetails.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T01:34:17Z"), model.lastReplicatedTime()); - Assertions.assertEquals("lvzkl", model.vmNics().get(0).nicId()); - Assertions.assertEquals("bgikyjtkakvlbi", model.vmNics().get(0).replicaNicId()); - Assertions.assertEquals("jvpzaptuoskaoiz", model.vmNics().get(0).sourceNicArmId()); - Assertions.assertEquals("xwfgcdiykkcx", model.vmNics().get(0).vMNetworkName()); - Assertions.assertEquals("ujvqynvavit", model.vmNics().get(0).recoveryVMNetworkId()); - Assertions.assertEquals("qohhihra", model.vmNics().get(0).ipConfigs().get(0).name()); - Assertions.assertEquals(false, model.vmNics().get(0).ipConfigs().get(0).isPrimary()); - Assertions.assertEquals("drwjcljbrhlh", model.vmNics().get(0).ipConfigs().get(0).subnetName()); - Assertions.assertEquals("zadbwe", model.vmNics().get(0).ipConfigs().get(0).staticIpAddress()); - Assertions.assertEquals("inafhxrzfrm", model.vmNics().get(0).ipConfigs().get(0).ipAddressType()); - Assertions.assertEquals(false, model.vmNics().get(0).ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("ucwviqllukhkrcq", model.vmNics().get(0).ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("cbvzarmqcb", model.vmNics().get(0).ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("kst", model.vmNics().get(0).ipConfigs().get(0).recoveryIpAddressType()); - Assertions.assertEquals("nvago", model.vmNics().get(0).ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("hdrx", - model.vmNics().get(0).ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("mxgnmguzbuwv", model.vmNics().get(0).ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("balkjnbkbdhl", model.vmNics().get(0).ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("q", model.vmNics().get(0).ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("kqsy", model.vmNics().get(0).ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("wlp", model.vmNics().get(0).selectionType()); - Assertions.assertEquals("uqhrlmcskykp", model.vmNics().get(0).recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("ixcnpcf", model.vmNics().get(0).tfoVMNetworkId()); - Assertions.assertEquals("kpyyc", model.vmNics().get(0).tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("pjprdpwr", model.vmNics().get(0).recoveryNicName()); - Assertions.assertEquals("fpcfjf", model.vmNics().get(0).recoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).reuseExistingNic()); - Assertions.assertEquals("z", model.vmNics().get(0).tfoRecoveryNicName()); - Assertions.assertEquals("kgyepe", model.vmNics().get(0).tfoRecoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).tfoReuseExistingNic()); - Assertions.assertEquals("nidmdiaw", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals("c", model.vmId()); - Assertions.assertEquals("zdfsqxhyqmr", model.vmProtectionState()); - Assertions.assertEquals("parn", model.vmProtectionStateDescription()); - Assertions.assertEquals("rsz", model.initialReplicationDetails().initialReplicationType()); - Assertions.assertEquals("wtdrcwg", model.initialReplicationDetails().initialReplicationProgressPercentage()); - Assertions.assertEquals(4300016577167436223L, model.vMDiskDetails().get(0).maxSizeMB()); - Assertions.assertEquals("hhfi", model.vMDiskDetails().get(0).vhdType()); - Assertions.assertEquals("cfculzj", model.vMDiskDetails().get(0).vhdId()); - Assertions.assertEquals("hp", model.vMDiskDetails().get(0).vhdName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVSiteDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVSiteDetailsTests.java deleted file mode 100644 index 58750eb16eb6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVSiteDetailsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVHostDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVSiteDetails; -import java.util.Arrays; - -public final class HyperVSiteDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVSiteDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVSite\",\"hyperVHosts\":[{\"id\":\"yldqpzfzxsox\",\"name\":\"unjlzkdrocq\",\"marsAgentVersion\":\"ytqqtcmi\"},{\"id\":\"w\",\"name\":\"vn\",\"marsAgentVersion\":\"ylajam\"},{\"id\":\"jyh\",\"name\":\"p\",\"marsAgentVersion\":\"rryklleynqan\"}]}") - .toObject(HyperVSiteDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVSiteDetails model = new HyperVSiteDetails() - .withHyperVHosts(Arrays.asList(new HyperVHostDetails(), new HyperVHostDetails(), new HyperVHostDetails())); - model = BinaryData.fromObject(model).toObject(HyperVSiteDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVVirtualMachineDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVVirtualMachineDetailsTests.java deleted file mode 100644 index e5142fe6b016..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/HyperVVirtualMachineDetailsTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVVirtualMachineDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OSDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PresenceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HyperVVirtualMachineDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HyperVVirtualMachineDetails model = BinaryData.fromString( - "{\"instanceType\":\"HyperVVirtualMachine\",\"sourceItemId\":\"igglclwalhvub\",\"generation\":\"zphetxdqcm\",\"osDetails\":{\"osType\":\"ajqzj\",\"productType\":\"lecxbibiwks\",\"osEdition\":\"gyxs\",\"oSVersion\":\"pzvoikv\",\"oSMajorVersion\":\"wczfzwushlcx\",\"oSMinorVersion\":\"lalhhezpfkiss\"},\"diskDetails\":[{\"maxSizeMB\":8933439553335588786,\"vhdType\":\"aoq\",\"vhdId\":\"gpto\",\"vhdName\":\"jq\"},{\"maxSizeMB\":8153507398057204968,\"vhdType\":\"nlrtbfijzz\",\"vhdId\":\"o\",\"vhdName\":\"olbuauktwieope\"},{\"maxSizeMB\":6227229278544049294,\"vhdType\":\"dwrswyiljpi\",\"vhdId\":\"gxyxyauxredd\",\"vhdName\":\"mcnltmwytkujsqyc\"}],\"hasPhysicalDisk\":\"NotPresent\",\"hasFibreChannelAdapter\":\"Present\",\"hasSharedVhd\":\"Present\",\"hyperVHostId\":\"qgpwbmwhr\"}") - .toObject(HyperVVirtualMachineDetails.class); - Assertions.assertEquals("igglclwalhvub", model.sourceItemId()); - Assertions.assertEquals("zphetxdqcm", model.generation()); - Assertions.assertEquals("ajqzj", model.osDetails().osType()); - Assertions.assertEquals("lecxbibiwks", model.osDetails().productType()); - Assertions.assertEquals("gyxs", model.osDetails().osEdition()); - Assertions.assertEquals("pzvoikv", model.osDetails().oSVersion()); - Assertions.assertEquals("wczfzwushlcx", model.osDetails().oSMajorVersion()); - Assertions.assertEquals("lalhhezpfkiss", model.osDetails().oSMinorVersion()); - Assertions.assertEquals(8933439553335588786L, model.diskDetails().get(0).maxSizeMB()); - Assertions.assertEquals("aoq", model.diskDetails().get(0).vhdType()); - Assertions.assertEquals("gpto", model.diskDetails().get(0).vhdId()); - Assertions.assertEquals("jq", model.diskDetails().get(0).vhdName()); - Assertions.assertEquals(PresenceStatus.NOT_PRESENT, model.hasPhysicalDisk()); - Assertions.assertEquals(PresenceStatus.PRESENT, model.hasFibreChannelAdapter()); - Assertions.assertEquals(PresenceStatus.PRESENT, model.hasSharedVhd()); - Assertions.assertEquals("qgpwbmwhr", model.hyperVHostId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HyperVVirtualMachineDetails model = new HyperVVirtualMachineDetails().withSourceItemId("igglclwalhvub") - .withGeneration("zphetxdqcm") - .withOsDetails(new OSDetails().withOsType("ajqzj") - .withProductType("lecxbibiwks") - .withOsEdition("gyxs") - .withOSVersion("pzvoikv") - .withOSMajorVersion("wczfzwushlcx") - .withOSMinorVersion("lalhhezpfkiss")) - .withDiskDetails(Arrays.asList( - new DiskDetails().withMaxSizeMB(8933439553335588786L) - .withVhdType("aoq") - .withVhdId("gpto") - .withVhdName("jq"), - new DiskDetails().withMaxSizeMB(8153507398057204968L) - .withVhdType("nlrtbfijzz") - .withVhdId("o") - .withVhdName("olbuauktwieope"), - new DiskDetails().withMaxSizeMB(6227229278544049294L) - .withVhdType("dwrswyiljpi") - .withVhdId("gxyxyauxredd") - .withVhdName("mcnltmwytkujsqyc"))) - .withHasPhysicalDisk(PresenceStatus.NOT_PRESENT) - .withHasFibreChannelAdapter(PresenceStatus.PRESENT) - .withHasSharedVhd(PresenceStatus.PRESENT) - .withHyperVHostId("qgpwbmwhr"); - model = BinaryData.fromObject(model).toObject(HyperVVirtualMachineDetails.class); - Assertions.assertEquals("igglclwalhvub", model.sourceItemId()); - Assertions.assertEquals("zphetxdqcm", model.generation()); - Assertions.assertEquals("ajqzj", model.osDetails().osType()); - Assertions.assertEquals("lecxbibiwks", model.osDetails().productType()); - Assertions.assertEquals("gyxs", model.osDetails().osEdition()); - Assertions.assertEquals("pzvoikv", model.osDetails().oSVersion()); - Assertions.assertEquals("wczfzwushlcx", model.osDetails().oSMajorVersion()); - Assertions.assertEquals("lalhhezpfkiss", model.osDetails().oSMinorVersion()); - Assertions.assertEquals(8933439553335588786L, model.diskDetails().get(0).maxSizeMB()); - Assertions.assertEquals("aoq", model.diskDetails().get(0).vhdType()); - Assertions.assertEquals("gpto", model.diskDetails().get(0).vhdId()); - Assertions.assertEquals("jq", model.diskDetails().get(0).vhdName()); - Assertions.assertEquals(PresenceStatus.NOT_PRESENT, model.hasPhysicalDisk()); - Assertions.assertEquals(PresenceStatus.PRESENT, model.hasFibreChannelAdapter()); - Assertions.assertEquals(PresenceStatus.PRESENT, model.hasSharedVhd()); - Assertions.assertEquals("qgpwbmwhr", model.hyperVHostId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/IdentityProviderDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/IdentityProviderDetailsTests.java deleted file mode 100644 index 62375cdf7767..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/IdentityProviderDetailsTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IdentityProviderDetails; -import org.junit.jupiter.api.Assertions; - -public final class IdentityProviderDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityProviderDetails model = BinaryData.fromString( - "{\"tenantId\":\"brn\",\"applicationId\":\"u\",\"objectId\":\"prafwgckhoc\",\"audience\":\"d\",\"aadAuthority\":\"fwafqrouda\"}") - .toObject(IdentityProviderDetails.class); - Assertions.assertEquals("brn", model.tenantId()); - Assertions.assertEquals("u", model.applicationId()); - Assertions.assertEquals("prafwgckhoc", model.objectId()); - Assertions.assertEquals("d", model.audience()); - Assertions.assertEquals("fwafqrouda", model.aadAuthority()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityProviderDetails model = new IdentityProviderDetails().withTenantId("brn") - .withApplicationId("u") - .withObjectId("prafwgckhoc") - .withAudience("d") - .withAadAuthority("fwafqrouda"); - model = BinaryData.fromObject(model).toObject(IdentityProviderDetails.class); - Assertions.assertEquals("brn", model.tenantId()); - Assertions.assertEquals("u", model.applicationId()); - Assertions.assertEquals("prafwgckhoc", model.objectId()); - Assertions.assertEquals("d", model.audience()); - Assertions.assertEquals("fwafqrouda", model.aadAuthority()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/IdentityProviderInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/IdentityProviderInputTests.java deleted file mode 100644 index 7b192f27cd0b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/IdentityProviderInputTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IdentityProviderInput; -import org.junit.jupiter.api.Assertions; - -public final class IdentityProviderInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityProviderInput model = BinaryData.fromString( - "{\"tenantId\":\"lqxihhrmooiz\",\"applicationId\":\"seypxiutcxapz\",\"objectId\":\"y\",\"audience\":\"petogebjox\",\"aadAuthority\":\"lhvnhlab\"}") - .toObject(IdentityProviderInput.class); - Assertions.assertEquals("lqxihhrmooiz", model.tenantId()); - Assertions.assertEquals("seypxiutcxapz", model.applicationId()); - Assertions.assertEquals("y", model.objectId()); - Assertions.assertEquals("petogebjox", model.audience()); - Assertions.assertEquals("lhvnhlab", model.aadAuthority()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityProviderInput model = new IdentityProviderInput().withTenantId("lqxihhrmooiz") - .withApplicationId("seypxiutcxapz") - .withObjectId("y") - .withAudience("petogebjox") - .withAadAuthority("lhvnhlab"); - model = BinaryData.fromObject(model).toObject(IdentityProviderInput.class); - Assertions.assertEquals("lqxihhrmooiz", model.tenantId()); - Assertions.assertEquals("seypxiutcxapz", model.applicationId()); - Assertions.assertEquals("y", model.objectId()); - Assertions.assertEquals("petogebjox", model.audience()); - Assertions.assertEquals("lhvnhlab", model.aadAuthority()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAgentDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAgentDetailsTests.java deleted file mode 100644 index 4dadff2b3ea4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAgentDetailsTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAgentDetails; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class InMageAgentDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAgentDetails model = BinaryData.fromString( - "{\"agentVersion\":\"wyambhba\",\"agentUpdateStatus\":\"bz\",\"postUpdateRebootStatus\":\"k\",\"agentExpiryDate\":\"2021-01-13T18:27:32Z\"}") - .toObject(InMageAgentDetails.class); - Assertions.assertEquals("wyambhba", model.agentVersion()); - Assertions.assertEquals("bz", model.agentUpdateStatus()); - Assertions.assertEquals("k", model.postUpdateRebootStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-13T18:27:32Z"), model.agentExpiryDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAgentDetails model = new InMageAgentDetails().withAgentVersion("wyambhba") - .withAgentUpdateStatus("bz") - .withPostUpdateRebootStatus("k") - .withAgentExpiryDate(OffsetDateTime.parse("2021-01-13T18:27:32Z")); - model = BinaryData.fromObject(model).toObject(InMageAgentDetails.class); - Assertions.assertEquals("wyambhba", model.agentVersion()); - Assertions.assertEquals("bz", model.agentUpdateStatus()); - Assertions.assertEquals("k", model.postUpdateRebootStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-13T18:27:32Z"), model.agentExpiryDate()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2ApplyRecoveryPointInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2ApplyRecoveryPointInputTests.java deleted file mode 100644 index 1cda7d027471..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2ApplyRecoveryPointInputTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2ApplyRecoveryPointInput; - -public final class InMageAzureV2ApplyRecoveryPointInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2ApplyRecoveryPointInput model = BinaryData.fromString("{\"instanceType\":\"InMageAzureV2\"}") - .toObject(InMageAzureV2ApplyRecoveryPointInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2ApplyRecoveryPointInput model = new InMageAzureV2ApplyRecoveryPointInput(); - model = BinaryData.fromObject(model).toObject(InMageAzureV2ApplyRecoveryPointInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2DiskInputDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2DiskInputDetailsTests.java deleted file mode 100644 index 2694271b1275..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2DiskInputDetailsTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskAccountType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2DiskInputDetails; -import org.junit.jupiter.api.Assertions; - -public final class InMageAzureV2DiskInputDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2DiskInputDetails model = BinaryData.fromString( - "{\"diskId\":\"ibhlenntrv\",\"logStorageAccountId\":\"psabdu\",\"diskType\":\"Premium_LRS\",\"diskEncryptionSetId\":\"lghnysvlp\"}") - .toObject(InMageAzureV2DiskInputDetails.class); - Assertions.assertEquals("ibhlenntrv", model.diskId()); - Assertions.assertEquals("psabdu", model.logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.PREMIUM_LRS, model.diskType()); - Assertions.assertEquals("lghnysvlp", model.diskEncryptionSetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2DiskInputDetails model = new InMageAzureV2DiskInputDetails().withDiskId("ibhlenntrv") - .withLogStorageAccountId("psabdu") - .withDiskType(DiskAccountType.PREMIUM_LRS) - .withDiskEncryptionSetId("lghnysvlp"); - model = BinaryData.fromObject(model).toObject(InMageAzureV2DiskInputDetails.class); - Assertions.assertEquals("ibhlenntrv", model.diskId()); - Assertions.assertEquals("psabdu", model.logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.PREMIUM_LRS, model.diskType()); - Assertions.assertEquals("lghnysvlp", model.diskEncryptionSetId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2EnableProtectionInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2EnableProtectionInputTests.java deleted file mode 100644 index 625030b0de2b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2EnableProtectionInputTests.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskAccountType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2DiskInputDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2EnableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LicenseType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SqlServerLicenseType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class InMageAzureV2EnableProtectionInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2EnableProtectionInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageAzureV2\",\"masterTargetId\":\"uukppdixqb\",\"processServerId\":\"xvhhyqq\",\"storageAccountId\":\"at\",\"runAsAccountId\":\"rznmginmtsdixc\",\"multiVmGroupId\":\"kibmgjymn\",\"multiVmGroupName\":\"cag\",\"disksToInclude\":[{\"diskId\":\"cqzoofjnqjsve\",\"logStorageAccountId\":\"bhtleberpy\",\"diskType\":\"StandardSSD_LRS\",\"diskEncryptionSetId\":\"nfqnwj\"},{\"diskId\":\"xowkdnj\",\"logStorageAccountId\":\"gkr\",\"diskType\":\"StandardSSD_LRS\",\"diskEncryptionSetId\":\"hycpnowawonoe\"}],\"targetAzureNetworkId\":\"guqlhfwa\",\"targetAzureSubnetId\":\"jzmpy\",\"enableRdpOnTargetOption\":\"uyfazbkoc\",\"targetAzureVmName\":\"gvthrmxkbcjww\",\"logStorageAccountId\":\"omraw\",\"targetAzureV1ResourceGroupId\":\"keboo\",\"targetAzureV2ResourceGroupId\":\"l\",\"diskType\":\"StandardSSD_LRS\",\"targetAvailabilitySetId\":\"gaedaoiq\",\"targetAvailabilityZone\":\"mgd\",\"targetProximityPlacementGroupId\":\"gabdxfkuzbwjeco\",\"licenseType\":\"NoLicenseType\",\"sqlServerLicenseType\":\"NotSpecified\",\"targetVmSize\":\"qbpel\",\"diskEncryptionSetId\":\"ibncgagdvcd\",\"targetVmTags\":{\"df\":\"tzbpyfao\"},\"seedManagedDiskTags\":{\"rf\":\"ncwmhjob\",\"dc\":\"ri\",\"f\":\"h\",\"oorssatfy\":\"cvbzwgwhgkgsoa\"},\"targetManagedDiskTags\":{\"dqn\":\"ufdmxuq\",\"fqayopbtsix\":\"sttuxv\",\"jay\":\"gvbhxmndztgs\"},\"targetNicTags\":{\"q\":\"rxneibpgbrhbj\",\"nmotpuwnnoh\":\"nh\",\"wyiulaynosu\":\"mzngocfrjuy\"}}") - .toObject(InMageAzureV2EnableProtectionInput.class); - Assertions.assertEquals("uukppdixqb", model.masterTargetId()); - Assertions.assertEquals("xvhhyqq", model.processServerId()); - Assertions.assertEquals("at", model.storageAccountId()); - Assertions.assertEquals("rznmginmtsdixc", model.runAsAccountId()); - Assertions.assertEquals("kibmgjymn", model.multiVmGroupId()); - Assertions.assertEquals("cag", model.multiVmGroupName()); - Assertions.assertEquals("cqzoofjnqjsve", model.disksToInclude().get(0).diskId()); - Assertions.assertEquals("bhtleberpy", model.disksToInclude().get(0).logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_SSD_LRS, model.disksToInclude().get(0).diskType()); - Assertions.assertEquals("nfqnwj", model.disksToInclude().get(0).diskEncryptionSetId()); - Assertions.assertEquals("guqlhfwa", model.targetAzureNetworkId()); - Assertions.assertEquals("jzmpy", model.targetAzureSubnetId()); - Assertions.assertEquals("uyfazbkoc", model.enableRdpOnTargetOption()); - Assertions.assertEquals("gvthrmxkbcjww", model.targetAzureVmName()); - Assertions.assertEquals("omraw", model.logStorageAccountId()); - Assertions.assertEquals("keboo", model.targetAzureV1ResourceGroupId()); - Assertions.assertEquals("l", model.targetAzureV2ResourceGroupId()); - Assertions.assertEquals(DiskAccountType.STANDARD_SSD_LRS, model.diskType()); - Assertions.assertEquals("gaedaoiq", model.targetAvailabilitySetId()); - Assertions.assertEquals("mgd", model.targetAvailabilityZone()); - Assertions.assertEquals("gabdxfkuzbwjeco", model.targetProximityPlacementGroupId()); - Assertions.assertEquals(LicenseType.NO_LICENSE_TYPE, model.licenseType()); - Assertions.assertEquals(SqlServerLicenseType.NOT_SPECIFIED, model.sqlServerLicenseType()); - Assertions.assertEquals("qbpel", model.targetVmSize()); - Assertions.assertEquals("ibncgagdvcd", model.diskEncryptionSetId()); - Assertions.assertEquals("tzbpyfao", model.targetVmTags().get("df")); - Assertions.assertEquals("ncwmhjob", model.seedManagedDiskTags().get("rf")); - Assertions.assertEquals("ufdmxuq", model.targetManagedDiskTags().get("dqn")); - Assertions.assertEquals("rxneibpgbrhbj", model.targetNicTags().get("q")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2EnableProtectionInput model - = new InMageAzureV2EnableProtectionInput().withMasterTargetId("uukppdixqb") - .withProcessServerId("xvhhyqq") - .withStorageAccountId("at") - .withRunAsAccountId("rznmginmtsdixc") - .withMultiVmGroupId("kibmgjymn") - .withMultiVmGroupName("cag") - .withDisksToInclude(Arrays.asList( - new InMageAzureV2DiskInputDetails().withDiskId("cqzoofjnqjsve") - .withLogStorageAccountId("bhtleberpy") - .withDiskType(DiskAccountType.STANDARD_SSD_LRS) - .withDiskEncryptionSetId("nfqnwj"), - new InMageAzureV2DiskInputDetails().withDiskId("xowkdnj") - .withLogStorageAccountId("gkr") - .withDiskType(DiskAccountType.STANDARD_SSD_LRS) - .withDiskEncryptionSetId("hycpnowawonoe"))) - .withTargetAzureNetworkId("guqlhfwa") - .withTargetAzureSubnetId("jzmpy") - .withEnableRdpOnTargetOption("uyfazbkoc") - .withTargetAzureVmName("gvthrmxkbcjww") - .withLogStorageAccountId("omraw") - .withTargetAzureV1ResourceGroupId("keboo") - .withTargetAzureV2ResourceGroupId("l") - .withDiskType(DiskAccountType.STANDARD_SSD_LRS) - .withTargetAvailabilitySetId("gaedaoiq") - .withTargetAvailabilityZone("mgd") - .withTargetProximityPlacementGroupId("gabdxfkuzbwjeco") - .withLicenseType(LicenseType.NO_LICENSE_TYPE) - .withSqlServerLicenseType(SqlServerLicenseType.NOT_SPECIFIED) - .withTargetVmSize("qbpel") - .withDiskEncryptionSetId("ibncgagdvcd") - .withTargetVmTags(mapOf("df", "tzbpyfao")) - .withSeedManagedDiskTags(mapOf("rf", "ncwmhjob", "dc", "ri", "f", "h", "oorssatfy", "cvbzwgwhgkgsoa")) - .withTargetManagedDiskTags(mapOf("dqn", "ufdmxuq", "fqayopbtsix", "sttuxv", "jay", "gvbhxmndztgs")) - .withTargetNicTags(mapOf("q", "rxneibpgbrhbj", "nmotpuwnnoh", "nh", "wyiulaynosu", "mzngocfrjuy")); - model = BinaryData.fromObject(model).toObject(InMageAzureV2EnableProtectionInput.class); - Assertions.assertEquals("uukppdixqb", model.masterTargetId()); - Assertions.assertEquals("xvhhyqq", model.processServerId()); - Assertions.assertEquals("at", model.storageAccountId()); - Assertions.assertEquals("rznmginmtsdixc", model.runAsAccountId()); - Assertions.assertEquals("kibmgjymn", model.multiVmGroupId()); - Assertions.assertEquals("cag", model.multiVmGroupName()); - Assertions.assertEquals("cqzoofjnqjsve", model.disksToInclude().get(0).diskId()); - Assertions.assertEquals("bhtleberpy", model.disksToInclude().get(0).logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_SSD_LRS, model.disksToInclude().get(0).diskType()); - Assertions.assertEquals("nfqnwj", model.disksToInclude().get(0).diskEncryptionSetId()); - Assertions.assertEquals("guqlhfwa", model.targetAzureNetworkId()); - Assertions.assertEquals("jzmpy", model.targetAzureSubnetId()); - Assertions.assertEquals("uyfazbkoc", model.enableRdpOnTargetOption()); - Assertions.assertEquals("gvthrmxkbcjww", model.targetAzureVmName()); - Assertions.assertEquals("omraw", model.logStorageAccountId()); - Assertions.assertEquals("keboo", model.targetAzureV1ResourceGroupId()); - Assertions.assertEquals("l", model.targetAzureV2ResourceGroupId()); - Assertions.assertEquals(DiskAccountType.STANDARD_SSD_LRS, model.diskType()); - Assertions.assertEquals("gaedaoiq", model.targetAvailabilitySetId()); - Assertions.assertEquals("mgd", model.targetAvailabilityZone()); - Assertions.assertEquals("gabdxfkuzbwjeco", model.targetProximityPlacementGroupId()); - Assertions.assertEquals(LicenseType.NO_LICENSE_TYPE, model.licenseType()); - Assertions.assertEquals(SqlServerLicenseType.NOT_SPECIFIED, model.sqlServerLicenseType()); - Assertions.assertEquals("qbpel", model.targetVmSize()); - Assertions.assertEquals("ibncgagdvcd", model.diskEncryptionSetId()); - Assertions.assertEquals("tzbpyfao", model.targetVmTags().get("df")); - Assertions.assertEquals("ncwmhjob", model.seedManagedDiskTags().get("rf")); - Assertions.assertEquals("ufdmxuq", model.targetManagedDiskTags().get("dqn")); - Assertions.assertEquals("rxneibpgbrhbj", model.targetNicTags().get("q")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2EventDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2EventDetailsTests.java deleted file mode 100644 index 121b6ece170d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2EventDetailsTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2EventDetails; -import org.junit.jupiter.api.Assertions; - -public final class InMageAzureV2EventDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2EventDetails model = BinaryData.fromString( - "{\"instanceType\":\"InMageAzureV2\",\"eventType\":\"fhaxttpf\",\"category\":\"wgsghqucumldd\",\"component\":\"qm\",\"correctiveAction\":\"feothxu\",\"details\":\"igrjdljlkqhvkrbz\",\"summary\":\"astax\",\"siteName\":\"pruulhg\"}") - .toObject(InMageAzureV2EventDetails.class); - Assertions.assertEquals("fhaxttpf", model.eventType()); - Assertions.assertEquals("wgsghqucumldd", model.category()); - Assertions.assertEquals("qm", model.component()); - Assertions.assertEquals("feothxu", model.correctiveAction()); - Assertions.assertEquals("igrjdljlkqhvkrbz", model.details()); - Assertions.assertEquals("astax", model.summary()); - Assertions.assertEquals("pruulhg", model.siteName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2EventDetails model = new InMageAzureV2EventDetails().withEventType("fhaxttpf") - .withCategory("wgsghqucumldd") - .withComponent("qm") - .withCorrectiveAction("feothxu") - .withDetails("igrjdljlkqhvkrbz") - .withSummary("astax") - .withSiteName("pruulhg"); - model = BinaryData.fromObject(model).toObject(InMageAzureV2EventDetails.class); - Assertions.assertEquals("fhaxttpf", model.eventType()); - Assertions.assertEquals("wgsghqucumldd", model.category()); - Assertions.assertEquals("qm", model.component()); - Assertions.assertEquals("feothxu", model.correctiveAction()); - Assertions.assertEquals("igrjdljlkqhvkrbz", model.details()); - Assertions.assertEquals("astax", model.summary()); - Assertions.assertEquals("pruulhg", model.siteName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2ManagedDiskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2ManagedDiskDetailsTests.java deleted file mode 100644 index 29ae4b009a24..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2ManagedDiskDetailsTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2ManagedDiskDetails; -import org.junit.jupiter.api.Assertions; - -public final class InMageAzureV2ManagedDiskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2ManagedDiskDetails model = BinaryData.fromString( - "{\"diskId\":\"oizwxvs\",\"seedManagedDiskId\":\"sgfy\",\"replicaDiskType\":\"ky\",\"diskEncryptionSetId\":\"gafxczvf\",\"targetDiskName\":\"kwrt\"}") - .toObject(InMageAzureV2ManagedDiskDetails.class); - Assertions.assertEquals("oizwxvs", model.diskId()); - Assertions.assertEquals("sgfy", model.seedManagedDiskId()); - Assertions.assertEquals("ky", model.replicaDiskType()); - Assertions.assertEquals("gafxczvf", model.diskEncryptionSetId()); - Assertions.assertEquals("kwrt", model.targetDiskName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2ManagedDiskDetails model = new InMageAzureV2ManagedDiskDetails().withDiskId("oizwxvs") - .withSeedManagedDiskId("sgfy") - .withReplicaDiskType("ky") - .withDiskEncryptionSetId("gafxczvf") - .withTargetDiskName("kwrt"); - model = BinaryData.fromObject(model).toObject(InMageAzureV2ManagedDiskDetails.class); - Assertions.assertEquals("oizwxvs", model.diskId()); - Assertions.assertEquals("sgfy", model.seedManagedDiskId()); - Assertions.assertEquals("ky", model.replicaDiskType()); - Assertions.assertEquals("gafxczvf", model.diskEncryptionSetId()); - Assertions.assertEquals("kwrt", model.targetDiskName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2PolicyDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2PolicyDetailsTests.java deleted file mode 100644 index be8539af7b6a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2PolicyDetailsTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2PolicyDetails; -import org.junit.jupiter.api.Assertions; - -public final class InMageAzureV2PolicyDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2PolicyDetails model = BinaryData.fromString( - "{\"instanceType\":\"InMageAzureV2\",\"crashConsistentFrequencyInMinutes\":699440843,\"recoveryPointThresholdInMinutes\":1580992750,\"recoveryPointHistory\":893679063,\"appConsistentFrequencyInMinutes\":710111101,\"multiVmSyncStatus\":\"tlh\"}") - .toObject(InMageAzureV2PolicyDetails.class); - Assertions.assertEquals(699440843, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(1580992750, model.recoveryPointThresholdInMinutes()); - Assertions.assertEquals(893679063, model.recoveryPointHistory()); - Assertions.assertEquals(710111101, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals("tlh", model.multiVmSyncStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2PolicyDetails model - = new InMageAzureV2PolicyDetails().withCrashConsistentFrequencyInMinutes(699440843) - .withRecoveryPointThresholdInMinutes(1580992750) - .withRecoveryPointHistory(893679063) - .withAppConsistentFrequencyInMinutes(710111101) - .withMultiVmSyncStatus("tlh"); - model = BinaryData.fromObject(model).toObject(InMageAzureV2PolicyDetails.class); - Assertions.assertEquals(699440843, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(1580992750, model.recoveryPointThresholdInMinutes()); - Assertions.assertEquals(893679063, model.recoveryPointHistory()); - Assertions.assertEquals(710111101, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals("tlh", model.multiVmSyncStatus()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2PolicyInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2PolicyInputTests.java deleted file mode 100644 index 86ac2febd779..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2PolicyInputTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2PolicyInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SetMultiVmSyncStatus; -import org.junit.jupiter.api.Assertions; - -public final class InMageAzureV2PolicyInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2PolicyInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageAzureV2\",\"recoveryPointThresholdInMinutes\":1444761559,\"recoveryPointHistory\":2116742025,\"crashConsistentFrequencyInMinutes\":852718126,\"appConsistentFrequencyInMinutes\":1922243610,\"multiVmSyncStatus\":\"Enable\"}") - .toObject(InMageAzureV2PolicyInput.class); - Assertions.assertEquals(1444761559, model.recoveryPointThresholdInMinutes()); - Assertions.assertEquals(2116742025, model.recoveryPointHistory()); - Assertions.assertEquals(852718126, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(1922243610, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(SetMultiVmSyncStatus.ENABLE, model.multiVmSyncStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2PolicyInput model = new InMageAzureV2PolicyInput().withRecoveryPointThresholdInMinutes(1444761559) - .withRecoveryPointHistory(2116742025) - .withCrashConsistentFrequencyInMinutes(852718126) - .withAppConsistentFrequencyInMinutes(1922243610) - .withMultiVmSyncStatus(SetMultiVmSyncStatus.ENABLE); - model = BinaryData.fromObject(model).toObject(InMageAzureV2PolicyInput.class); - Assertions.assertEquals(1444761559, model.recoveryPointThresholdInMinutes()); - Assertions.assertEquals(2116742025, model.recoveryPointHistory()); - Assertions.assertEquals(852718126, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(1922243610, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(SetMultiVmSyncStatus.ENABLE, model.multiVmSyncStatus()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2RecoveryPointDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2RecoveryPointDetailsTests.java deleted file mode 100644 index 910272801405..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2RecoveryPointDetailsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2RecoveryPointDetails; -import org.junit.jupiter.api.Assertions; - -public final class InMageAzureV2RecoveryPointDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2RecoveryPointDetails model - = BinaryData.fromString("{\"instanceType\":\"InMageAzureV2\",\"isMultiVmSyncPoint\":\"ihqlcoqks\"}") - .toObject(InMageAzureV2RecoveryPointDetails.class); - Assertions.assertEquals("ihqlcoqks", model.isMultiVmSyncPoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2RecoveryPointDetails model - = new InMageAzureV2RecoveryPointDetails().withIsMultiVmSyncPoint("ihqlcoqks"); - model = BinaryData.fromObject(model).toObject(InMageAzureV2RecoveryPointDetails.class); - Assertions.assertEquals("ihqlcoqks", model.isMultiVmSyncPoint()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2ReprotectInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2ReprotectInputTests.java deleted file mode 100644 index 030042693515..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2ReprotectInputTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2ReprotectInput; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InMageAzureV2ReprotectInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2ReprotectInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageAzureV2\",\"masterTargetId\":\"sqsqkpdmioyjpnml\",\"processServerId\":\"qcpszp\",\"storageAccountId\":\"vqdvrdmvxyrxdhg\",\"runAsAccountId\":\"oj\",\"policyId\":\"aotcgbzxmbtp\",\"logStorageAccountId\":\"foioyidoxzn\",\"disksToInclude\":[\"dtmuuvd\",\"wsxmrszb\"]}") - .toObject(InMageAzureV2ReprotectInput.class); - Assertions.assertEquals("sqsqkpdmioyjpnml", model.masterTargetId()); - Assertions.assertEquals("qcpszp", model.processServerId()); - Assertions.assertEquals("vqdvrdmvxyrxdhg", model.storageAccountId()); - Assertions.assertEquals("oj", model.runAsAccountId()); - Assertions.assertEquals("aotcgbzxmbtp", model.policyId()); - Assertions.assertEquals("foioyidoxzn", model.logStorageAccountId()); - Assertions.assertEquals("dtmuuvd", model.disksToInclude().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2ReprotectInput model = new InMageAzureV2ReprotectInput().withMasterTargetId("sqsqkpdmioyjpnml") - .withProcessServerId("qcpszp") - .withStorageAccountId("vqdvrdmvxyrxdhg") - .withRunAsAccountId("oj") - .withPolicyId("aotcgbzxmbtp") - .withLogStorageAccountId("foioyidoxzn") - .withDisksToInclude(Arrays.asList("dtmuuvd", "wsxmrszb")); - model = BinaryData.fromObject(model).toObject(InMageAzureV2ReprotectInput.class); - Assertions.assertEquals("sqsqkpdmioyjpnml", model.masterTargetId()); - Assertions.assertEquals("qcpszp", model.processServerId()); - Assertions.assertEquals("vqdvrdmvxyrxdhg", model.storageAccountId()); - Assertions.assertEquals("oj", model.runAsAccountId()); - Assertions.assertEquals("aotcgbzxmbtp", model.policyId()); - Assertions.assertEquals("foioyidoxzn", model.logStorageAccountId()); - Assertions.assertEquals("dtmuuvd", model.disksToInclude().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2SwitchProviderDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2SwitchProviderDetailsTests.java deleted file mode 100644 index 70650f6a381b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2SwitchProviderDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2SwitchProviderDetails; - -public final class InMageAzureV2SwitchProviderDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2SwitchProviderDetails model = BinaryData.fromString( - "{\"targetVaultId\":\"asmcolmugpyvaos\",\"targetResourceId\":\"l\",\"targetFabricId\":\"zxeygzvtye\",\"targetApplianceId\":\"hubnobgu\"}") - .toObject(InMageAzureV2SwitchProviderDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2SwitchProviderDetails model = new InMageAzureV2SwitchProviderDetails(); - model = BinaryData.fromObject(model).toObject(InMageAzureV2SwitchProviderDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2SwitchProviderInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2SwitchProviderInputTests.java deleted file mode 100644 index aca6bb328e8c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2SwitchProviderInputTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2SwitchProviderInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageAzureV2SwitchProviderInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2SwitchProviderInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageAzureV2\",\"targetVaultID\":\"nimx\",\"targetFabricID\":\"pnerxrzut\",\"targetApplianceID\":\"lcurzaqmnbx\"}") - .toObject(InMageAzureV2SwitchProviderInput.class); - Assertions.assertEquals("nimx", model.targetVaultId()); - Assertions.assertEquals("pnerxrzut", model.targetFabricId()); - Assertions.assertEquals("lcurzaqmnbx", model.targetApplianceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2SwitchProviderInput model = new InMageAzureV2SwitchProviderInput().withTargetVaultId("nimx") - .withTargetFabricId("pnerxrzut") - .withTargetApplianceId("lcurzaqmnbx"); - model = BinaryData.fromObject(model).toObject(InMageAzureV2SwitchProviderInput.class); - Assertions.assertEquals("nimx", model.targetVaultId()); - Assertions.assertEquals("pnerxrzut", model.targetFabricId()); - Assertions.assertEquals("lcurzaqmnbx", model.targetApplianceId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2TestFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2TestFailoverInputTests.java deleted file mode 100644 index 7c94e579fedc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2TestFailoverInputTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2TestFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageAzureV2TestFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2TestFailoverInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageAzureV2\",\"recoveryPointId\":\"ehtd\",\"osUpgradeVersion\":\"mbnvynfaooeacted\"}") - .toObject(InMageAzureV2TestFailoverInput.class); - Assertions.assertEquals("ehtd", model.recoveryPointId()); - Assertions.assertEquals("mbnvynfaooeacted", model.osUpgradeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2TestFailoverInput model - = new InMageAzureV2TestFailoverInput().withRecoveryPointId("ehtd").withOsUpgradeVersion("mbnvynfaooeacted"); - model = BinaryData.fromObject(model).toObject(InMageAzureV2TestFailoverInput.class); - Assertions.assertEquals("ehtd", model.recoveryPointId()); - Assertions.assertEquals("mbnvynfaooeacted", model.osUpgradeVersion()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2UnplannedFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2UnplannedFailoverInputTests.java deleted file mode 100644 index 3955e1f571a3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2UnplannedFailoverInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2UnplannedFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageAzureV2UnplannedFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2UnplannedFailoverInput model = BinaryData - .fromString( - "{\"instanceType\":\"InMageAzureV2\",\"recoveryPointId\":\"lsk\",\"osUpgradeVersion\":\"ddida\"}") - .toObject(InMageAzureV2UnplannedFailoverInput.class); - Assertions.assertEquals("lsk", model.recoveryPointId()); - Assertions.assertEquals("ddida", model.osUpgradeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2UnplannedFailoverInput model - = new InMageAzureV2UnplannedFailoverInput().withRecoveryPointId("lsk").withOsUpgradeVersion("ddida"); - model = BinaryData.fromObject(model).toObject(InMageAzureV2UnplannedFailoverInput.class); - Assertions.assertEquals("lsk", model.recoveryPointId()); - Assertions.assertEquals("ddida", model.osUpgradeVersion()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2UpdateReplicationProtectedItemInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2UpdateReplicationProtectedItemInputTests.java deleted file mode 100644 index a852a6ea0f14..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageAzureV2UpdateReplicationProtectedItemInputTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageAzureV2UpdateReplicationProtectedItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SqlServerLicenseType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateDiskInput; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class InMageAzureV2UpdateReplicationProtectedItemInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageAzureV2UpdateReplicationProtectedItemInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageAzureV2\",\"recoveryAzureV1ResourceGroupId\":\"llrqmtlpbyxro\",\"recoveryAzureV2ResourceGroupId\":\"uyqyp\",\"useManagedDisks\":\"mnoiicsudy\",\"targetProximityPlacementGroupId\":\"rjjtalxrdsjrho\",\"targetAvailabilityZone\":\"qwgusxxhdo\",\"targetVmTags\":{\"bdmvsby\":\"wyblv\",\"kmkwjfbo\":\"daelqpv\",\"v\":\"loggdusxursu\",\"qrizfwihvaan\":\"xcjkcoqwczsy\"},\"targetManagedDiskTags\":{\"bbaex\":\"nhjrfdmfd\",\"vmuafmc\":\"jfwtgdfkkaui\",\"vpltidajjvy\":\"fedyuep\"},\"targetNicTags\":{\"yelsyasvfnk\":\"cfkumcfjxo\",\"jekrknfd\":\"myg\",\"lcr\":\"ugjqyckgtxkrdt\",\"tcsubmzoo\":\"jdkl\"},\"sqlServerLicenseType\":\"NotSpecified\",\"vmDisks\":[{\"diskId\":\"chkxfpwhdysl\",\"targetDiskName\":\"lglmnnkkwayqsh\"}]}") - .toObject(InMageAzureV2UpdateReplicationProtectedItemInput.class); - Assertions.assertEquals("llrqmtlpbyxro", model.recoveryAzureV1ResourceGroupId()); - Assertions.assertEquals("uyqyp", model.recoveryAzureV2ResourceGroupId()); - Assertions.assertEquals("mnoiicsudy", model.useManagedDisks()); - Assertions.assertEquals("rjjtalxrdsjrho", model.targetProximityPlacementGroupId()); - Assertions.assertEquals("qwgusxxhdo", model.targetAvailabilityZone()); - Assertions.assertEquals("wyblv", model.targetVmTags().get("bdmvsby")); - Assertions.assertEquals("nhjrfdmfd", model.targetManagedDiskTags().get("bbaex")); - Assertions.assertEquals("cfkumcfjxo", model.targetNicTags().get("yelsyasvfnk")); - Assertions.assertEquals(SqlServerLicenseType.NOT_SPECIFIED, model.sqlServerLicenseType()); - Assertions.assertEquals("chkxfpwhdysl", model.vmDisks().get(0).diskId()); - Assertions.assertEquals("lglmnnkkwayqsh", model.vmDisks().get(0).targetDiskName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageAzureV2UpdateReplicationProtectedItemInput model = new InMageAzureV2UpdateReplicationProtectedItemInput() - .withRecoveryAzureV1ResourceGroupId("llrqmtlpbyxro") - .withRecoveryAzureV2ResourceGroupId("uyqyp") - .withUseManagedDisks("mnoiicsudy") - .withTargetProximityPlacementGroupId("rjjtalxrdsjrho") - .withTargetAvailabilityZone("qwgusxxhdo") - .withTargetVmTags( - mapOf("bdmvsby", "wyblv", "kmkwjfbo", "daelqpv", "v", "loggdusxursu", "qrizfwihvaan", "xcjkcoqwczsy")) - .withTargetManagedDiskTags(mapOf("bbaex", "nhjrfdmfd", "vmuafmc", "jfwtgdfkkaui", "vpltidajjvy", "fedyuep")) - .withTargetNicTags( - mapOf("yelsyasvfnk", "cfkumcfjxo", "jekrknfd", "myg", "lcr", "ugjqyckgtxkrdt", "tcsubmzoo", "jdkl")) - .withSqlServerLicenseType(SqlServerLicenseType.NOT_SPECIFIED) - .withVmDisks( - Arrays.asList(new UpdateDiskInput().withDiskId("chkxfpwhdysl").withTargetDiskName("lglmnnkkwayqsh"))); - model = BinaryData.fromObject(model).toObject(InMageAzureV2UpdateReplicationProtectedItemInput.class); - Assertions.assertEquals("llrqmtlpbyxro", model.recoveryAzureV1ResourceGroupId()); - Assertions.assertEquals("uyqyp", model.recoveryAzureV2ResourceGroupId()); - Assertions.assertEquals("mnoiicsudy", model.useManagedDisks()); - Assertions.assertEquals("rjjtalxrdsjrho", model.targetProximityPlacementGroupId()); - Assertions.assertEquals("qwgusxxhdo", model.targetAvailabilityZone()); - Assertions.assertEquals("wyblv", model.targetVmTags().get("bdmvsby")); - Assertions.assertEquals("nhjrfdmfd", model.targetManagedDiskTags().get("bbaex")); - Assertions.assertEquals("cfkumcfjxo", model.targetNicTags().get("yelsyasvfnk")); - Assertions.assertEquals(SqlServerLicenseType.NOT_SPECIFIED, model.sqlServerLicenseType()); - Assertions.assertEquals("chkxfpwhdysl", model.vmDisks().get(0).diskId()); - Assertions.assertEquals("lglmnnkkwayqsh", model.vmDisks().get(0).targetDiskName()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageBasePolicyDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageBasePolicyDetailsTests.java deleted file mode 100644 index 77d24401c7a8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageBasePolicyDetailsTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageBasePolicyDetails; -import org.junit.jupiter.api.Assertions; - -public final class InMageBasePolicyDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageBasePolicyDetails model = BinaryData.fromString( - "{\"instanceType\":\"InMageBasePolicyDetails\",\"recoveryPointThresholdInMinutes\":1501835760,\"recoveryPointHistory\":1196368599,\"appConsistentFrequencyInMinutes\":612698857,\"multiVmSyncStatus\":\"tb\"}") - .toObject(InMageBasePolicyDetails.class); - Assertions.assertEquals(1501835760, model.recoveryPointThresholdInMinutes()); - Assertions.assertEquals(1196368599, model.recoveryPointHistory()); - Assertions.assertEquals(612698857, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals("tb", model.multiVmSyncStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageBasePolicyDetails model = new InMageBasePolicyDetails().withRecoveryPointThresholdInMinutes(1501835760) - .withRecoveryPointHistory(1196368599) - .withAppConsistentFrequencyInMinutes(612698857) - .withMultiVmSyncStatus("tb"); - model = BinaryData.fromObject(model).toObject(InMageBasePolicyDetails.class); - Assertions.assertEquals(1501835760, model.recoveryPointThresholdInMinutes()); - Assertions.assertEquals(1196368599, model.recoveryPointHistory()); - Assertions.assertEquals(612698857, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals("tb", model.multiVmSyncStatus()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageDisableProtectionProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageDisableProtectionProviderSpecificInputTests.java deleted file mode 100644 index 1463a5e79fb1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageDisableProtectionProviderSpecificInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageDisableProtectionProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageDisableProtectionProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageDisableProtectionProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"InMage\",\"replicaVmDeletionStatus\":\"q\"}") - .toObject(InMageDisableProtectionProviderSpecificInput.class); - Assertions.assertEquals("q", model.replicaVmDeletionStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageDisableProtectionProviderSpecificInput model - = new InMageDisableProtectionProviderSpecificInput().withReplicaVmDeletionStatus("q"); - model = BinaryData.fromObject(model).toObject(InMageDisableProtectionProviderSpecificInput.class); - Assertions.assertEquals("q", model.replicaVmDeletionStatus()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageDiskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageDiskDetailsTests.java deleted file mode 100644 index 041a189a1d39..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageDiskDetailsTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskVolumeDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageDiskDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InMageDiskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageDiskDetails model = BinaryData.fromString( - "{\"diskId\":\"kgxqwqueuuylztpz\",\"diskName\":\"zevjykofve\",\"diskSizeInMB\":\"fkhkqtwqlep\",\"diskType\":\"zkca\",\"diskConfiguration\":\"wz\",\"volumeList\":[{\"label\":\"gffjw\",\"name\":\"nrtwz\"},{\"label\":\"qkifmxawostfz\",\"name\":\"hrkmjqncfv\"},{\"label\":\"cnhemvwfnq\",\"name\":\"ypvndrw\"},{\"label\":\"od\",\"name\":\"grssgw\"}]}") - .toObject(InMageDiskDetails.class); - Assertions.assertEquals("kgxqwqueuuylztpz", model.diskId()); - Assertions.assertEquals("zevjykofve", model.diskName()); - Assertions.assertEquals("fkhkqtwqlep", model.diskSizeInMB()); - Assertions.assertEquals("zkca", model.diskType()); - Assertions.assertEquals("wz", model.diskConfiguration()); - Assertions.assertEquals("gffjw", model.volumeList().get(0).label()); - Assertions.assertEquals("nrtwz", model.volumeList().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageDiskDetails model = new InMageDiskDetails().withDiskId("kgxqwqueuuylztpz") - .withDiskName("zevjykofve") - .withDiskSizeInMB("fkhkqtwqlep") - .withDiskType("zkca") - .withDiskConfiguration("wz") - .withVolumeList(Arrays.asList(new DiskVolumeDetails().withLabel("gffjw").withName("nrtwz"), - new DiskVolumeDetails().withLabel("qkifmxawostfz").withName("hrkmjqncfv"), - new DiskVolumeDetails().withLabel("cnhemvwfnq").withName("ypvndrw"), - new DiskVolumeDetails().withLabel("od").withName("grssgw"))); - model = BinaryData.fromObject(model).toObject(InMageDiskDetails.class); - Assertions.assertEquals("kgxqwqueuuylztpz", model.diskId()); - Assertions.assertEquals("zevjykofve", model.diskName()); - Assertions.assertEquals("fkhkqtwqlep", model.diskSizeInMB()); - Assertions.assertEquals("zkca", model.diskType()); - Assertions.assertEquals("wz", model.diskConfiguration()); - Assertions.assertEquals("gffjw", model.volumeList().get(0).label()); - Assertions.assertEquals("nrtwz", model.volumeList().get(0).name()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageDiskExclusionInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageDiskExclusionInputTests.java deleted file mode 100644 index e496f2eddac0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageDiskExclusionInputTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageDiskExclusionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageDiskSignatureExclusionOptions; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageVolumeExclusionOptions; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InMageDiskExclusionInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageDiskExclusionInput model = BinaryData.fromString( - "{\"volumeOptions\":[{\"volumeLabel\":\"injmuymve\",\"onlyExcludeIfSingleVolume\":\"ztscbgmusaictds\"},{\"volumeLabel\":\"kzzohnrddc\",\"onlyExcludeIfSingleVolume\":\"eqozrehlbz\"},{\"volumeLabel\":\"xbnjrqvzyuexoz\",\"onlyExcludeIfSingleVolume\":\"ynp\"},{\"volumeLabel\":\"eudpab\",\"onlyExcludeIfSingleVolume\":\"euwzosgyjxvc\"}],\"diskSignatureOptions\":[{\"diskSignature\":\"rmrexzvdube\"},{\"diskSignature\":\"zygba\"}]}") - .toObject(InMageDiskExclusionInput.class); - Assertions.assertEquals("injmuymve", model.volumeOptions().get(0).volumeLabel()); - Assertions.assertEquals("ztscbgmusaictds", model.volumeOptions().get(0).onlyExcludeIfSingleVolume()); - Assertions.assertEquals("rmrexzvdube", model.diskSignatureOptions().get(0).diskSignature()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageDiskExclusionInput model = new InMageDiskExclusionInput().withVolumeOptions(Arrays.asList( - new InMageVolumeExclusionOptions().withVolumeLabel("injmuymve") - .withOnlyExcludeIfSingleVolume("ztscbgmusaictds"), - new InMageVolumeExclusionOptions().withVolumeLabel("kzzohnrddc") - .withOnlyExcludeIfSingleVolume("eqozrehlbz"), - new InMageVolumeExclusionOptions().withVolumeLabel("xbnjrqvzyuexoz").withOnlyExcludeIfSingleVolume("ynp"), - new InMageVolumeExclusionOptions().withVolumeLabel("eudpab").withOnlyExcludeIfSingleVolume("euwzosgyjxvc"))) - .withDiskSignatureOptions( - Arrays.asList(new InMageDiskSignatureExclusionOptions().withDiskSignature("rmrexzvdube"), - new InMageDiskSignatureExclusionOptions().withDiskSignature("zygba"))); - model = BinaryData.fromObject(model).toObject(InMageDiskExclusionInput.class); - Assertions.assertEquals("injmuymve", model.volumeOptions().get(0).volumeLabel()); - Assertions.assertEquals("ztscbgmusaictds", model.volumeOptions().get(0).onlyExcludeIfSingleVolume()); - Assertions.assertEquals("rmrexzvdube", model.diskSignatureOptions().get(0).diskSignature()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageDiskSignatureExclusionOptionsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageDiskSignatureExclusionOptionsTests.java deleted file mode 100644 index f2a5f0055ad6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageDiskSignatureExclusionOptionsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageDiskSignatureExclusionOptions; -import org.junit.jupiter.api.Assertions; - -public final class InMageDiskSignatureExclusionOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageDiskSignatureExclusionOptions model = BinaryData.fromString("{\"diskSignature\":\"fvppkeqsifj\"}") - .toObject(InMageDiskSignatureExclusionOptions.class); - Assertions.assertEquals("fvppkeqsifj", model.diskSignature()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageDiskSignatureExclusionOptions model - = new InMageDiskSignatureExclusionOptions().withDiskSignature("fvppkeqsifj"); - model = BinaryData.fromObject(model).toObject(InMageDiskSignatureExclusionOptions.class); - Assertions.assertEquals("fvppkeqsifj", model.diskSignature()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageEnableProtectionInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageEnableProtectionInputTests.java deleted file mode 100644 index 4ffb2a9e55a7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageEnableProtectionInputTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageDiskExclusionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageDiskSignatureExclusionOptions; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageEnableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageVolumeExclusionOptions; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InMageEnableProtectionInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageEnableProtectionInput model = BinaryData.fromString( - "{\"instanceType\":\"InMage\",\"vmFriendlyName\":\"lng\",\"masterTargetId\":\"gnhrkombcdtajdo\",\"processServerId\":\"ggorwjoqt\",\"retentionDrive\":\"otpvclp\",\"runAsAccountId\":\"yrlmwkptsk\",\"multiVmGroupId\":\"xjgvh\",\"multiVmGroupName\":\"ccbmkakm\",\"datastoreName\":\"okbputm\",\"diskExclusionInput\":{\"volumeOptions\":[{\"volumeLabel\":\"akmlwktfowzkroyr\",\"onlyExcludeIfSingleVolume\":\"r\"},{\"volumeLabel\":\"lzqjimejtgzjxx\",\"onlyExcludeIfSingleVolume\":\"e\"}],\"diskSignatureOptions\":[{\"diskSignature\":\"qloiwyayyziv\"},{\"diskSignature\":\"itcdqlhchwhrk\"},{\"diskSignature\":\"l\"},{\"diskSignature\":\"fibfiplhx\"}]},\"disksToInclude\":[\"mycjowlyey\"]}") - .toObject(InMageEnableProtectionInput.class); - Assertions.assertEquals("lng", model.vmFriendlyName()); - Assertions.assertEquals("gnhrkombcdtajdo", model.masterTargetId()); - Assertions.assertEquals("ggorwjoqt", model.processServerId()); - Assertions.assertEquals("otpvclp", model.retentionDrive()); - Assertions.assertEquals("yrlmwkptsk", model.runAsAccountId()); - Assertions.assertEquals("xjgvh", model.multiVmGroupId()); - Assertions.assertEquals("ccbmkakm", model.multiVmGroupName()); - Assertions.assertEquals("okbputm", model.datastoreName()); - Assertions.assertEquals("akmlwktfowzkroyr", model.diskExclusionInput().volumeOptions().get(0).volumeLabel()); - Assertions.assertEquals("r", model.diskExclusionInput().volumeOptions().get(0).onlyExcludeIfSingleVolume()); - Assertions.assertEquals("qloiwyayyziv", - model.diskExclusionInput().diskSignatureOptions().get(0).diskSignature()); - Assertions.assertEquals("mycjowlyey", model.disksToInclude().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageEnableProtectionInput model = new InMageEnableProtectionInput().withVmFriendlyName("lng") - .withMasterTargetId("gnhrkombcdtajdo") - .withProcessServerId("ggorwjoqt") - .withRetentionDrive("otpvclp") - .withRunAsAccountId("yrlmwkptsk") - .withMultiVmGroupId("xjgvh") - .withMultiVmGroupName("ccbmkakm") - .withDatastoreName("okbputm") - .withDiskExclusionInput(new InMageDiskExclusionInput() - .withVolumeOptions(Arrays.asList( - new InMageVolumeExclusionOptions().withVolumeLabel("akmlwktfowzkroyr") - .withOnlyExcludeIfSingleVolume("r"), - new InMageVolumeExclusionOptions().withVolumeLabel("lzqjimejtgzjxx") - .withOnlyExcludeIfSingleVolume("e"))) - .withDiskSignatureOptions( - Arrays.asList(new InMageDiskSignatureExclusionOptions().withDiskSignature("qloiwyayyziv"), - new InMageDiskSignatureExclusionOptions().withDiskSignature("itcdqlhchwhrk"), - new InMageDiskSignatureExclusionOptions().withDiskSignature("l"), - new InMageDiskSignatureExclusionOptions().withDiskSignature("fibfiplhx")))) - .withDisksToInclude(Arrays.asList("mycjowlyey")); - model = BinaryData.fromObject(model).toObject(InMageEnableProtectionInput.class); - Assertions.assertEquals("lng", model.vmFriendlyName()); - Assertions.assertEquals("gnhrkombcdtajdo", model.masterTargetId()); - Assertions.assertEquals("ggorwjoqt", model.processServerId()); - Assertions.assertEquals("otpvclp", model.retentionDrive()); - Assertions.assertEquals("yrlmwkptsk", model.runAsAccountId()); - Assertions.assertEquals("xjgvh", model.multiVmGroupId()); - Assertions.assertEquals("ccbmkakm", model.multiVmGroupName()); - Assertions.assertEquals("okbputm", model.datastoreName()); - Assertions.assertEquals("akmlwktfowzkroyr", model.diskExclusionInput().volumeOptions().get(0).volumeLabel()); - Assertions.assertEquals("r", model.diskExclusionInput().volumeOptions().get(0).onlyExcludeIfSingleVolume()); - Assertions.assertEquals("qloiwyayyziv", - model.diskExclusionInput().diskSignatureOptions().get(0).diskSignature()); - Assertions.assertEquals("mycjowlyey", model.disksToInclude().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMagePolicyDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMagePolicyDetailsTests.java deleted file mode 100644 index f36bc6d55a1a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMagePolicyDetailsTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMagePolicyDetails; -import org.junit.jupiter.api.Assertions; - -public final class InMagePolicyDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMagePolicyDetails model = BinaryData.fromString( - "{\"instanceType\":\"InMage\",\"recoveryPointThresholdInMinutes\":841361482,\"recoveryPointHistory\":1070639613,\"appConsistentFrequencyInMinutes\":977949832,\"multiVmSyncStatus\":\"ac\"}") - .toObject(InMagePolicyDetails.class); - Assertions.assertEquals(841361482, model.recoveryPointThresholdInMinutes()); - Assertions.assertEquals(1070639613, model.recoveryPointHistory()); - Assertions.assertEquals(977949832, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals("ac", model.multiVmSyncStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMagePolicyDetails model = new InMagePolicyDetails().withRecoveryPointThresholdInMinutes(841361482) - .withRecoveryPointHistory(1070639613) - .withAppConsistentFrequencyInMinutes(977949832) - .withMultiVmSyncStatus("ac"); - model = BinaryData.fromObject(model).toObject(InMagePolicyDetails.class); - Assertions.assertEquals(841361482, model.recoveryPointThresholdInMinutes()); - Assertions.assertEquals(1070639613, model.recoveryPointHistory()); - Assertions.assertEquals(977949832, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals("ac", model.multiVmSyncStatus()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMagePolicyInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMagePolicyInputTests.java deleted file mode 100644 index a7c67c1ce1fb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMagePolicyInputTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMagePolicyInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SetMultiVmSyncStatus; -import org.junit.jupiter.api.Assertions; - -public final class InMagePolicyInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMagePolicyInput model = BinaryData.fromString( - "{\"instanceType\":\"InMage\",\"recoveryPointThresholdInMinutes\":1710079987,\"recoveryPointHistory\":902786810,\"appConsistentFrequencyInMinutes\":1471706402,\"multiVmSyncStatus\":\"Enable\"}") - .toObject(InMagePolicyInput.class); - Assertions.assertEquals(1710079987, model.recoveryPointThresholdInMinutes()); - Assertions.assertEquals(902786810, model.recoveryPointHistory()); - Assertions.assertEquals(1471706402, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(SetMultiVmSyncStatus.ENABLE, model.multiVmSyncStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMagePolicyInput model = new InMagePolicyInput().withRecoveryPointThresholdInMinutes(1710079987) - .withRecoveryPointHistory(902786810) - .withAppConsistentFrequencyInMinutes(1471706402) - .withMultiVmSyncStatus(SetMultiVmSyncStatus.ENABLE); - model = BinaryData.fromObject(model).toObject(InMagePolicyInput.class); - Assertions.assertEquals(1710079987, model.recoveryPointThresholdInMinutes()); - Assertions.assertEquals(902786810, model.recoveryPointHistory()); - Assertions.assertEquals(1471706402, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(SetMultiVmSyncStatus.ENABLE, model.multiVmSyncStatus()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmApplyRecoveryPointInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmApplyRecoveryPointInputTests.java deleted file mode 100644 index cd82bee21998..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmApplyRecoveryPointInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmApplyRecoveryPointInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmApplyRecoveryPointInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmApplyRecoveryPointInput model - = BinaryData.fromString("{\"instanceType\":\"InMageRcm\",\"recoveryPointId\":\"mvhzfovanyrvaprt\"}") - .toObject(InMageRcmApplyRecoveryPointInput.class); - Assertions.assertEquals("mvhzfovanyrvaprt", model.recoveryPointId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmApplyRecoveryPointInput model - = new InMageRcmApplyRecoveryPointInput().withRecoveryPointId("mvhzfovanyrvaprt"); - model = BinaryData.fromObject(model).toObject(InMageRcmApplyRecoveryPointInput.class); - Assertions.assertEquals("mvhzfovanyrvaprt", model.recoveryPointId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmDiscoveredProtectedVmDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmDiscoveredProtectedVmDetailsTests.java deleted file mode 100644 index 68f46428cd31..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmDiscoveredProtectedVmDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmDiscoveredProtectedVmDetails; - -public final class InMageRcmDiscoveredProtectedVmDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmDiscoveredProtectedVmDetails model = BinaryData.fromString( - "{\"vCenterId\":\"l\",\"vCenterFqdn\":\"ewikfyaqandmym\",\"datastores\":[\"qjumovs\",\"bpbvzopaxmf\"],\"ipAddresses\":[\"mcwoxfaxd\",\"nqifb\",\"atroiaue\"],\"vmwareToolsStatus\":\"gmocpcjycboelrgt\",\"powerStatus\":\"fldsiuorin\",\"vmFqdn\":\"cedpksriwmmtmqrx\",\"osName\":\"qvvyczyay\",\"createdTimestamp\":\"2021-05-28T18:44:37Z\",\"updatedTimestamp\":\"2021-06-17T16:30:32Z\",\"isDeleted\":false,\"lastDiscoveryTimeInUtc\":\"2020-12-27T23:56:34Z\"}") - .toObject(InMageRcmDiscoveredProtectedVmDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmDiscoveredProtectedVmDetails model = new InMageRcmDiscoveredProtectedVmDetails(); - model = BinaryData.fromObject(model).toObject(InMageRcmDiscoveredProtectedVmDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmDiskInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmDiskInputTests.java deleted file mode 100644 index 6dd07dba1636..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmDiskInputTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskAccountType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmDiskInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmDiskInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmDiskInput model = BinaryData.fromString( - "{\"diskId\":\"ahr\",\"logStorageAccountId\":\"gpx\",\"diskType\":\"Standard_LRS\",\"diskEncryptionSetId\":\"plnupoyryef\"}") - .toObject(InMageRcmDiskInput.class); - Assertions.assertEquals("ahr", model.diskId()); - Assertions.assertEquals("gpx", model.logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_LRS, model.diskType()); - Assertions.assertEquals("plnupoyryef", model.diskEncryptionSetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmDiskInput model = new InMageRcmDiskInput().withDiskId("ahr") - .withLogStorageAccountId("gpx") - .withDiskType(DiskAccountType.STANDARD_LRS) - .withDiskEncryptionSetId("plnupoyryef"); - model = BinaryData.fromObject(model).toObject(InMageRcmDiskInput.class); - Assertions.assertEquals("ahr", model.diskId()); - Assertions.assertEquals("gpx", model.logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_LRS, model.diskType()); - Assertions.assertEquals("plnupoyryef", model.diskEncryptionSetId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmDisksDefaultInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmDisksDefaultInputTests.java deleted file mode 100644 index a730cc5be3a8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmDisksDefaultInputTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskAccountType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmDisksDefaultInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmDisksDefaultInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmDisksDefaultInput model = BinaryData.fromString( - "{\"logStorageAccountId\":\"mwovyztxlnomfpb\",\"diskType\":\"StandardSSD_LRS\",\"diskEncryptionSetId\":\"egvyieztkutnj\"}") - .toObject(InMageRcmDisksDefaultInput.class); - Assertions.assertEquals("mwovyztxlnomfpb", model.logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_SSD_LRS, model.diskType()); - Assertions.assertEquals("egvyieztkutnj", model.diskEncryptionSetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmDisksDefaultInput model = new InMageRcmDisksDefaultInput().withLogStorageAccountId("mwovyztxlnomfpb") - .withDiskType(DiskAccountType.STANDARD_SSD_LRS) - .withDiskEncryptionSetId("egvyieztkutnj"); - model = BinaryData.fromObject(model).toObject(InMageRcmDisksDefaultInput.class); - Assertions.assertEquals("mwovyztxlnomfpb", model.logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_SSD_LRS, model.diskType()); - Assertions.assertEquals("egvyieztkutnj", model.diskEncryptionSetId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmEnableProtectionInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmEnableProtectionInputTests.java deleted file mode 100644 index 62bd6327d93c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmEnableProtectionInputTests.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskAccountType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmDiskInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmDisksDefaultInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmEnableProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LicenseType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmEnableProtectionInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmEnableProtectionInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcm\",\"fabricDiscoveryMachineId\":\"llukkreh\",\"disksToInclude\":[{\"diskId\":\"mjodu\",\"logStorageAccountId\":\"fvulxfaryr\",\"diskType\":\"Standard_LRS\",\"diskEncryptionSetId\":\"gdezvjqwahoy\"},{\"diskId\":\"yaxqvjweiwtczkd\",\"logStorageAccountId\":\"nvovbooqbmdqrxy\",\"diskType\":\"StandardSSD_LRS\",\"diskEncryptionSetId\":\"et\"},{\"diskId\":\"cflwtjdtlr\",\"logStorageAccountId\":\"e\",\"diskType\":\"Premium_LRS\",\"diskEncryptionSetId\":\"y\"}],\"disksDefault\":{\"logStorageAccountId\":\"uxdtzcq\",\"diskType\":\"Standard_LRS\",\"diskEncryptionSetId\":\"dudgcozzomeh\"},\"targetResourceGroupId\":\"lantolamlb\",\"targetNetworkId\":\"uxkqllczipvwdt\",\"testNetworkId\":\"kzdqiqdlratrkwxo\",\"targetSubnetName\":\"wxsuy\",\"testSubnetName\":\"nhrfgslgl\",\"targetVmName\":\"ry\",\"targetVmSize\":\"zihuioaeo\",\"licenseType\":\"NoLicenseType\",\"targetAvailabilitySetId\":\"tfeyvk\",\"targetAvailabilityZone\":\"gdd\",\"targetProximityPlacementGroupId\":\"hdccxb\",\"targetBootDiagnosticsStorageAccountId\":\"uqutkzwtjww\",\"runAsAccountId\":\"zytijcx\",\"processServerId\":\"nondegjdyd\",\"multiVmGroupName\":\"kkkbjuckcatuqbh\"}") - .toObject(InMageRcmEnableProtectionInput.class); - Assertions.assertEquals("llukkreh", model.fabricDiscoveryMachineId()); - Assertions.assertEquals("mjodu", model.disksToInclude().get(0).diskId()); - Assertions.assertEquals("fvulxfaryr", model.disksToInclude().get(0).logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_LRS, model.disksToInclude().get(0).diskType()); - Assertions.assertEquals("gdezvjqwahoy", model.disksToInclude().get(0).diskEncryptionSetId()); - Assertions.assertEquals("uxdtzcq", model.disksDefault().logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_LRS, model.disksDefault().diskType()); - Assertions.assertEquals("dudgcozzomeh", model.disksDefault().diskEncryptionSetId()); - Assertions.assertEquals("lantolamlb", model.targetResourceGroupId()); - Assertions.assertEquals("uxkqllczipvwdt", model.targetNetworkId()); - Assertions.assertEquals("kzdqiqdlratrkwxo", model.testNetworkId()); - Assertions.assertEquals("wxsuy", model.targetSubnetName()); - Assertions.assertEquals("nhrfgslgl", model.testSubnetName()); - Assertions.assertEquals("ry", model.targetVmName()); - Assertions.assertEquals("zihuioaeo", model.targetVmSize()); - Assertions.assertEquals(LicenseType.NO_LICENSE_TYPE, model.licenseType()); - Assertions.assertEquals("tfeyvk", model.targetAvailabilitySetId()); - Assertions.assertEquals("gdd", model.targetAvailabilityZone()); - Assertions.assertEquals("hdccxb", model.targetProximityPlacementGroupId()); - Assertions.assertEquals("uqutkzwtjww", model.targetBootDiagnosticsStorageAccountId()); - Assertions.assertEquals("zytijcx", model.runAsAccountId()); - Assertions.assertEquals("nondegjdyd", model.processServerId()); - Assertions.assertEquals("kkkbjuckcatuqbh", model.multiVmGroupName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmEnableProtectionInput model - = new InMageRcmEnableProtectionInput().withFabricDiscoveryMachineId("llukkreh") - .withDisksToInclude(Arrays.asList( - new InMageRcmDiskInput().withDiskId("mjodu") - .withLogStorageAccountId("fvulxfaryr") - .withDiskType(DiskAccountType.STANDARD_LRS) - .withDiskEncryptionSetId("gdezvjqwahoy"), - new InMageRcmDiskInput().withDiskId("yaxqvjweiwtczkd") - .withLogStorageAccountId("nvovbooqbmdqrxy") - .withDiskType(DiskAccountType.STANDARD_SSD_LRS) - .withDiskEncryptionSetId("et"), - new InMageRcmDiskInput().withDiskId("cflwtjdtlr") - .withLogStorageAccountId("e") - .withDiskType(DiskAccountType.PREMIUM_LRS) - .withDiskEncryptionSetId("y"))) - .withDisksDefault(new InMageRcmDisksDefaultInput().withLogStorageAccountId("uxdtzcq") - .withDiskType(DiskAccountType.STANDARD_LRS) - .withDiskEncryptionSetId("dudgcozzomeh")) - .withTargetResourceGroupId("lantolamlb") - .withTargetNetworkId("uxkqllczipvwdt") - .withTestNetworkId("kzdqiqdlratrkwxo") - .withTargetSubnetName("wxsuy") - .withTestSubnetName("nhrfgslgl") - .withTargetVmName("ry") - .withTargetVmSize("zihuioaeo") - .withLicenseType(LicenseType.NO_LICENSE_TYPE) - .withTargetAvailabilitySetId("tfeyvk") - .withTargetAvailabilityZone("gdd") - .withTargetProximityPlacementGroupId("hdccxb") - .withTargetBootDiagnosticsStorageAccountId("uqutkzwtjww") - .withRunAsAccountId("zytijcx") - .withProcessServerId("nondegjdyd") - .withMultiVmGroupName("kkkbjuckcatuqbh"); - model = BinaryData.fromObject(model).toObject(InMageRcmEnableProtectionInput.class); - Assertions.assertEquals("llukkreh", model.fabricDiscoveryMachineId()); - Assertions.assertEquals("mjodu", model.disksToInclude().get(0).diskId()); - Assertions.assertEquals("fvulxfaryr", model.disksToInclude().get(0).logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_LRS, model.disksToInclude().get(0).diskType()); - Assertions.assertEquals("gdezvjqwahoy", model.disksToInclude().get(0).diskEncryptionSetId()); - Assertions.assertEquals("uxdtzcq", model.disksDefault().logStorageAccountId()); - Assertions.assertEquals(DiskAccountType.STANDARD_LRS, model.disksDefault().diskType()); - Assertions.assertEquals("dudgcozzomeh", model.disksDefault().diskEncryptionSetId()); - Assertions.assertEquals("lantolamlb", model.targetResourceGroupId()); - Assertions.assertEquals("uxkqllczipvwdt", model.targetNetworkId()); - Assertions.assertEquals("kzdqiqdlratrkwxo", model.testNetworkId()); - Assertions.assertEquals("wxsuy", model.targetSubnetName()); - Assertions.assertEquals("nhrfgslgl", model.testSubnetName()); - Assertions.assertEquals("ry", model.targetVmName()); - Assertions.assertEquals("zihuioaeo", model.targetVmSize()); - Assertions.assertEquals(LicenseType.NO_LICENSE_TYPE, model.licenseType()); - Assertions.assertEquals("tfeyvk", model.targetAvailabilitySetId()); - Assertions.assertEquals("gdd", model.targetAvailabilityZone()); - Assertions.assertEquals("hdccxb", model.targetProximityPlacementGroupId()); - Assertions.assertEquals("uqutkzwtjww", model.targetBootDiagnosticsStorageAccountId()); - Assertions.assertEquals("zytijcx", model.runAsAccountId()); - Assertions.assertEquals("nondegjdyd", model.processServerId()); - Assertions.assertEquals("kkkbjuckcatuqbh", model.multiVmGroupName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmEventDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmEventDetailsTests.java deleted file mode 100644 index 2b75c47e1e20..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmEventDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmEventDetails; - -public final class InMageRcmEventDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmEventDetails model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcm\",\"protectedItemName\":\"wcnxtpzdlyseid\",\"vmName\":\"akatprytg\",\"latestAgentVersion\":\"zbqfdpfawrptvcsh\",\"jobId\":\"utzcttbqgdirda\",\"fabricName\":\"tzjgcfjfxtbwj\",\"applianceName\":\"rmuydgfttmdofg\",\"serverType\":\"agfuoftnxod\",\"componentDisplayName\":\"m\"}") - .toObject(InMageRcmEventDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmEventDetails model = new InMageRcmEventDetails(); - model = BinaryData.fromObject(model).toObject(InMageRcmEventDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFabricCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFabricCreationInputTests.java deleted file mode 100644 index 1d07dd8d9ec6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFabricCreationInputTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IdentityProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFabricCreationInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmFabricCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmFabricCreationInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcm\",\"vmwareSiteId\":\"aj\",\"physicalSiteId\":\"iygmgs\",\"sourceAgentIdentity\":{\"tenantId\":\"vmdmzenlr\",\"applicationId\":\"tgfczljdncidtjva\",\"objectId\":\"yyznmrgcdogcvuc\",\"audience\":\"ytoxuwhttnzq\",\"aadAuthority\":\"aqm\"}}") - .toObject(InMageRcmFabricCreationInput.class); - Assertions.assertEquals("aj", model.vmwareSiteId()); - Assertions.assertEquals("iygmgs", model.physicalSiteId()); - Assertions.assertEquals("vmdmzenlr", model.sourceAgentIdentity().tenantId()); - Assertions.assertEquals("tgfczljdncidtjva", model.sourceAgentIdentity().applicationId()); - Assertions.assertEquals("yyznmrgcdogcvuc", model.sourceAgentIdentity().objectId()); - Assertions.assertEquals("ytoxuwhttnzq", model.sourceAgentIdentity().audience()); - Assertions.assertEquals("aqm", model.sourceAgentIdentity().aadAuthority()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmFabricCreationInput model = new InMageRcmFabricCreationInput().withVmwareSiteId("aj") - .withPhysicalSiteId("iygmgs") - .withSourceAgentIdentity(new IdentityProviderInput().withTenantId("vmdmzenlr") - .withApplicationId("tgfczljdncidtjva") - .withObjectId("yyznmrgcdogcvuc") - .withAudience("ytoxuwhttnzq") - .withAadAuthority("aqm")); - model = BinaryData.fromObject(model).toObject(InMageRcmFabricCreationInput.class); - Assertions.assertEquals("aj", model.vmwareSiteId()); - Assertions.assertEquals("iygmgs", model.physicalSiteId()); - Assertions.assertEquals("vmdmzenlr", model.sourceAgentIdentity().tenantId()); - Assertions.assertEquals("tgfczljdncidtjva", model.sourceAgentIdentity().applicationId()); - Assertions.assertEquals("yyznmrgcdogcvuc", model.sourceAgentIdentity().objectId()); - Assertions.assertEquals("ytoxuwhttnzq", model.sourceAgentIdentity().audience()); - Assertions.assertEquals("aqm", model.sourceAgentIdentity().aadAuthority()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackDiscoveredProtectedVmDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackDiscoveredProtectedVmDetailsTests.java deleted file mode 100644 index 2a2fff902f03..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackDiscoveredProtectedVmDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackDiscoveredProtectedVmDetails; - -public final class InMageRcmFailbackDiscoveredProtectedVmDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmFailbackDiscoveredProtectedVmDetails model = BinaryData.fromString( - "{\"vCenterId\":\"zkdolrndwdbvxvza\",\"vCenterFqdn\":\"doyqx\",\"datastores\":[\"kft\",\"mcxqqxmyzklao\",\"n\",\"ohrvmz\"],\"ipAddresses\":[\"azad\",\"vznllaslkskhjqj\",\"vbaihxjt\",\"zgtai\"],\"vmwareToolsStatus\":\"b\",\"powerStatus\":\"roigbsfsgsaenwld\",\"vmFqdn\":\"hljqlxsp\",\"osName\":\"jc\",\"createdTimestamp\":\"2021-06-14T00:46:05Z\",\"updatedTimestamp\":\"2021-03-22T03:50:23Z\",\"isDeleted\":true,\"lastDiscoveryTimeInUtc\":\"2021-08-20T07:36Z\"}") - .toObject(InMageRcmFailbackDiscoveredProtectedVmDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmFailbackDiscoveredProtectedVmDetails model = new InMageRcmFailbackDiscoveredProtectedVmDetails(); - model = BinaryData.fromObject(model).toObject(InMageRcmFailbackDiscoveredProtectedVmDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackEventDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackEventDetailsTests.java deleted file mode 100644 index d15e3bd89b7e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackEventDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackEventDetails; - -public final class InMageRcmFailbackEventDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmFailbackEventDetails model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcmFailback\",\"protectedItemName\":\"hsxrznmgsdaluyc\",\"vmName\":\"efrbhseuerbg\",\"applianceName\":\"ebjludc\",\"serverType\":\"tujraxdtpryjm\",\"componentDisplayName\":\"nsewouxl\"}") - .toObject(InMageRcmFailbackEventDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmFailbackEventDetails model = new InMageRcmFailbackEventDetails(); - model = BinaryData.fromObject(model).toObject(InMageRcmFailbackEventDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackMobilityAgentDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackMobilityAgentDetailsTests.java deleted file mode 100644 index 46f3a0f37531..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackMobilityAgentDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackMobilityAgentDetails; - -public final class InMageRcmFailbackMobilityAgentDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmFailbackMobilityAgentDetails model = BinaryData.fromString( - "{\"version\":\"s\",\"latestVersion\":\"yljurkeposehqqyl\",\"driverVersion\":\"ctwjwdsdlzm\",\"latestUpgradableVersionWithoutReboot\":\"erxxxoteehkhowgo\",\"agentVersionExpiryDate\":\"2021-04-11T20:48:45Z\",\"driverVersionExpiryDate\":\"2021-03-02T05:47:55Z\",\"lastHeartbeatUtc\":\"2021-02-03T22:17:50Z\",\"reasonsBlockingUpgrade\":[\"AgentNoHeartbeat\"],\"isUpgradeable\":\"pnp\"}") - .toObject(InMageRcmFailbackMobilityAgentDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmFailbackMobilityAgentDetails model = new InMageRcmFailbackMobilityAgentDetails(); - model = BinaryData.fromObject(model).toObject(InMageRcmFailbackMobilityAgentDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackNicDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackNicDetailsTests.java deleted file mode 100644 index 7ea85621f91b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackNicDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackNicDetails; - -public final class InMageRcmFailbackNicDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmFailbackNicDetails model = BinaryData.fromString( - "{\"macAddress\":\"aqawbmpspfeylql\",\"networkName\":\"vvujex\",\"adapterType\":\"glxrkgjnm\",\"sourceIpAddress\":\"aslavxj\"}") - .toObject(InMageRcmFailbackNicDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmFailbackNicDetails model = new InMageRcmFailbackNicDetails(); - model = BinaryData.fromObject(model).toObject(InMageRcmFailbackNicDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackPlannedFailoverProviderInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackPlannedFailoverProviderInputTests.java deleted file mode 100644 index 1114198d4bbc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackPlannedFailoverProviderInputTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackPlannedFailoverProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackRecoveryPointType; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmFailbackPlannedFailoverProviderInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmFailbackPlannedFailoverProviderInput model = BinaryData - .fromString("{\"instanceType\":\"InMageRcmFailback\",\"recoveryPointType\":\"CrashConsistent\"}") - .toObject(InMageRcmFailbackPlannedFailoverProviderInput.class); - Assertions.assertEquals(InMageRcmFailbackRecoveryPointType.CRASH_CONSISTENT, model.recoveryPointType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmFailbackPlannedFailoverProviderInput model = new InMageRcmFailbackPlannedFailoverProviderInput() - .withRecoveryPointType(InMageRcmFailbackRecoveryPointType.CRASH_CONSISTENT); - model = BinaryData.fromObject(model).toObject(InMageRcmFailbackPlannedFailoverProviderInput.class); - Assertions.assertEquals(InMageRcmFailbackRecoveryPointType.CRASH_CONSISTENT, model.recoveryPointType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackPolicyCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackPolicyCreationInputTests.java deleted file mode 100644 index d7cb82781a2b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackPolicyCreationInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackPolicyCreationInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmFailbackPolicyCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmFailbackPolicyCreationInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcmFailback\",\"crashConsistentFrequencyInMinutes\":10286473,\"appConsistentFrequencyInMinutes\":875885958}") - .toObject(InMageRcmFailbackPolicyCreationInput.class); - Assertions.assertEquals(10286473, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(875885958, model.appConsistentFrequencyInMinutes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmFailbackPolicyCreationInput model - = new InMageRcmFailbackPolicyCreationInput().withCrashConsistentFrequencyInMinutes(10286473) - .withAppConsistentFrequencyInMinutes(875885958); - model = BinaryData.fromObject(model).toObject(InMageRcmFailbackPolicyCreationInput.class); - Assertions.assertEquals(10286473, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(875885958, model.appConsistentFrequencyInMinutes()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackPolicyDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackPolicyDetailsTests.java deleted file mode 100644 index f0d8a8e35b79..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackPolicyDetailsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackPolicyDetails; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmFailbackPolicyDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmFailbackPolicyDetails model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcmFailback\",\"appConsistentFrequencyInMinutes\":1741536205,\"crashConsistentFrequencyInMinutes\":516106077}") - .toObject(InMageRcmFailbackPolicyDetails.class); - Assertions.assertEquals(1741536205, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(516106077, model.crashConsistentFrequencyInMinutes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmFailbackPolicyDetails model - = new InMageRcmFailbackPolicyDetails().withAppConsistentFrequencyInMinutes(1741536205) - .withCrashConsistentFrequencyInMinutes(516106077); - model = BinaryData.fromObject(model).toObject(InMageRcmFailbackPolicyDetails.class); - Assertions.assertEquals(1741536205, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(516106077, model.crashConsistentFrequencyInMinutes()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackProtectedDiskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackProtectedDiskDetailsTests.java deleted file mode 100644 index 04be6f2fa0d3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackProtectedDiskDetailsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackProtectedDiskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackSyncDetails; - -public final class InMageRcmFailbackProtectedDiskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmFailbackProtectedDiskDetails model = BinaryData.fromString( - "{\"diskId\":\"lvs\",\"diskName\":\"ywjopac\",\"isOSDisk\":\"hydv\",\"capacityInBytes\":7196910522233474156,\"diskUuid\":\"gpmillxgjs\",\"dataPendingInLogDataStoreInMB\":70.24965275674056,\"dataPendingAtSourceAgentInMB\":88.82129123990158,\"isInitialReplicationComplete\":\"iobijeiydyeuynhb\",\"irDetails\":{\"progressHealth\":\"InProgress\",\"transferredBytes\":8991689761064995996,\"last15MinutesTransferredBytes\":870519523900353978,\"lastDataTransferTimeUtc\":\"opdweoft\",\"processedBytes\":6885598853699298526,\"startTime\":\"igsioctqkm\",\"lastRefreshTime\":\"a\",\"progressPercentage\":1045792223},\"resyncDetails\":{\"progressHealth\":\"NoProgress\",\"transferredBytes\":5944613768997801995,\"last15MinutesTransferredBytes\":8824443803915143462,\"lastDataTransferTimeUtc\":\"sstfjxtvlxx\",\"processedBytes\":5911202779481860995,\"startTime\":\"rr\",\"lastRefreshTime\":\"mxeezwyh\",\"progressPercentage\":1081801760},\"lastSyncTime\":\"2021-10-30T12:38:01Z\"}") - .toObject(InMageRcmFailbackProtectedDiskDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmFailbackProtectedDiskDetails model - = new InMageRcmFailbackProtectedDiskDetails().withIrDetails(new InMageRcmFailbackSyncDetails()) - .withResyncDetails(new InMageRcmFailbackSyncDetails()); - model = BinaryData.fromObject(model).toObject(InMageRcmFailbackProtectedDiskDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackReplicationDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackReplicationDetailsTests.java deleted file mode 100644 index 6fe6801ac128..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackReplicationDetailsTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackDiscoveredProtectedVmDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackMobilityAgentDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackNicDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackProtectedDiskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackReplicationDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackSyncDetails; -import java.util.Arrays; - -public final class InMageRcmFailbackReplicationDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmFailbackReplicationDetails model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcmFailback\",\"internalIdentifier\":\"kwuyck\",\"azureVirtualMachineId\":\"nensmuffi\",\"multiVmGroupName\":\"bctvbpzuj\",\"reprotectAgentId\":\"totdxposcslh\",\"reprotectAgentName\":\"usiecktybhjuxid\",\"osType\":\"xomi\",\"logStorageAccountId\":\"dxjxdu\",\"targetvCenterId\":\"wjwi\",\"targetDataStoreName\":\"qrslaate\",\"targetVmName\":\"wuj\",\"initialReplicationProgressPercentage\":1719572322,\"initialReplicationProcessedBytes\":2452628822919259817,\"initialReplicationTransferredBytes\":7089184561517940356,\"initialReplicationProgressHealth\":\"InProgress\",\"resyncProgressPercentage\":863933371,\"resyncProcessedBytes\":5368716982368064306,\"resyncTransferredBytes\":9053528371962850431,\"resyncProgressHealth\":\"NoProgress\",\"resyncRequired\":\"bkkteo\",\"resyncState\":\"None\",\"protectedDisks\":[{\"diskId\":\"korvvm\",\"diskName\":\"cof\",\"isOSDisk\":\"h\",\"capacityInBytes\":8046745281500152828,\"diskUuid\":\"snqliwkmzojfe\",\"dataPendingInLogDataStoreInMB\":62.18165218206391,\"dataPendingAtSourceAgentInMB\":10.8838970496698,\"isInitialReplicationComplete\":\"knazgbjbhrpgiqst\",\"irDetails\":{\"progressHealth\":\"NoProgress\",\"transferredBytes\":2601716801597782877,\"last15MinutesTransferredBytes\":6484962639003043577,\"lastDataTransferTimeUtc\":\"p\",\"processedBytes\":7215078064868025353,\"startTime\":\"f\",\"lastRefreshTime\":\"ksldttohqclnaih\",\"progressPercentage\":670450081},\"resyncDetails\":{\"progressHealth\":\"InProgress\",\"transferredBytes\":4232005255626679607,\"last15MinutesTransferredBytes\":8113305415938188854,\"lastDataTransferTimeUtc\":\"p\",\"processedBytes\":5677806131765604590,\"startTime\":\"oi\",\"lastRefreshTime\":\"trawrqkza\",\"progressPercentage\":505721663},\"lastSyncTime\":\"2021-11-01T13:53:11Z\"}],\"mobilityAgentDetails\":{\"version\":\"klwzlw\",\"latestVersion\":\"prnejzltkaszf\",\"driverVersion\":\"xscbduxapgrcqe\",\"latestUpgradableVersionWithoutReboot\":\"vrdjomln\",\"agentVersionExpiryDate\":\"2021-01-15T20:00:26Z\",\"driverVersionExpiryDate\":\"2021-01-31T05:26:55Z\",\"lastHeartbeatUtc\":\"2021-02-13T00:13:07Z\",\"reasonsBlockingUpgrade\":[\"RebootRequired\",\"RcmProxyNoHeartbeat\",\"InvalidAgentVersion\"],\"isUpgradeable\":\"esdfedsb\"},\"vmNics\":[{\"macAddress\":\"coinmphymcqi\",\"networkName\":\"ltvdhqnufbx\",\"adapterType\":\"iibntojo\",\"sourceIpAddress\":\"nybydhuihaouwud\"},{\"macAddress\":\"aorhjkehwvumo\",\"networkName\":\"ircamqprlo\",\"adapterType\":\"ugejcvjkjyczcmt\",\"sourceIpAddress\":\"elajdyol\"},{\"macAddress\":\"qy\",\"networkName\":\"fmzsizzhravr\",\"adapterType\":\"kjymgqbgcxh\",\"sourceIpAddress\":\"xgzxlermkmer\"},{\"macAddress\":\"skirhn\",\"networkName\":\"pkcbkfukdljq\",\"adapterType\":\"tsdyds\",\"sourceIpAddress\":\"pafyalo\"}],\"lastPlannedFailoverStartTime\":\"2021-03-06T00:52:24Z\",\"lastPlannedFailoverStatus\":\"Succeeded\",\"discoveredVmDetails\":{\"vCenterId\":\"nyufpqzstif\",\"vCenterFqdn\":\"fyjfd\",\"datastores\":[\"yvndjokgwesym\",\"qh\",\"qpfzlpejtznxlue\"],\"ipAddresses\":[\"q\",\"bgsimwejlwbkbp\",\"zobdwbcp\",\"aswkuhydtnaczkf\"],\"vmwareToolsStatus\":\"atgawphnsk\",\"powerStatus\":\"dwgtqcumecsaa\",\"vmFqdn\":\"oqbd\",\"osName\":\"ycsbskowkrbhzhr\",\"createdTimestamp\":\"2021-05-08T23:12:06Z\",\"updatedTimestamp\":\"2021-03-04T08:22:41Z\",\"isDeleted\":true,\"lastDiscoveryTimeInUtc\":\"2020-12-21T04:50:26Z\"},\"lastUsedPolicyId\":\"asfgqgucyhfaimqv\",\"lastUsedPolicyFriendlyName\":\"uozkgyf\",\"isAgentRegistrationSuccessfulAfterFailover\":true}") - .toObject(InMageRcmFailbackReplicationDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmFailbackReplicationDetails model = new InMageRcmFailbackReplicationDetails() - .withProtectedDisks(Arrays - .asList(new InMageRcmFailbackProtectedDiskDetails().withIrDetails(new InMageRcmFailbackSyncDetails()) - .withResyncDetails(new InMageRcmFailbackSyncDetails()))) - .withMobilityAgentDetails(new InMageRcmFailbackMobilityAgentDetails()) - .withVmNics(Arrays.asList(new InMageRcmFailbackNicDetails(), new InMageRcmFailbackNicDetails(), - new InMageRcmFailbackNicDetails(), new InMageRcmFailbackNicDetails())) - .withDiscoveredVmDetails(new InMageRcmFailbackDiscoveredProtectedVmDetails()); - model = BinaryData.fromObject(model).toObject(InMageRcmFailbackReplicationDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackReprotectInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackReprotectInputTests.java deleted file mode 100644 index a0ca62dba8ea..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackReprotectInputTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackReprotectInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmFailbackReprotectInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmFailbackReprotectInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcmFailback\",\"processServerId\":\"e\",\"runAsAccountId\":\"fm\",\"policyId\":\"mskkixvlzjxplhpe\"}") - .toObject(InMageRcmFailbackReprotectInput.class); - Assertions.assertEquals("e", model.processServerId()); - Assertions.assertEquals("fm", model.runAsAccountId()); - Assertions.assertEquals("mskkixvlzjxplhpe", model.policyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmFailbackReprotectInput model = new InMageRcmFailbackReprotectInput().withProcessServerId("e") - .withRunAsAccountId("fm") - .withPolicyId("mskkixvlzjxplhpe"); - model = BinaryData.fromObject(model).toObject(InMageRcmFailbackReprotectInput.class); - Assertions.assertEquals("e", model.processServerId()); - Assertions.assertEquals("fm", model.runAsAccountId()); - Assertions.assertEquals("mskkixvlzjxplhpe", model.policyId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackSyncDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackSyncDetailsTests.java deleted file mode 100644 index a8e1ba6366cd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmFailbackSyncDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackSyncDetails; - -public final class InMageRcmFailbackSyncDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmFailbackSyncDetails model = BinaryData.fromString( - "{\"progressHealth\":\"SlowProgress\",\"transferredBytes\":1904677758535173364,\"last15MinutesTransferredBytes\":8784333877422486679,\"lastDataTransferTimeUtc\":\"hc\",\"processedBytes\":2105673643027071231,\"startTime\":\"dkgd\",\"lastRefreshTime\":\"szwcan\",\"progressPercentage\":830454539}") - .toObject(InMageRcmFailbackSyncDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmFailbackSyncDetails model = new InMageRcmFailbackSyncDetails(); - model = BinaryData.fromObject(model).toObject(InMageRcmFailbackSyncDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmMobilityAgentDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmMobilityAgentDetailsTests.java deleted file mode 100644 index ce8c95964177..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmMobilityAgentDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmMobilityAgentDetails; - -public final class InMageRcmMobilityAgentDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmMobilityAgentDetails model = BinaryData.fromString( - "{\"version\":\"ielbqrv\",\"latestVersion\":\"qvknmpecqxgiq\",\"latestAgentReleaseDate\":\"ifubnsnstlpwqp\",\"driverVersion\":\"xjkhtupsv\",\"latestUpgradableVersionWithoutReboot\":\"uweuiy\",\"agentVersionExpiryDate\":\"2021-02-16T23:45:49Z\",\"driverVersionExpiryDate\":\"2021-01-05T18:40:56Z\",\"lastHeartbeatUtc\":\"2021-09-02T16:14:15Z\",\"reasonsBlockingUpgrade\":[\"DistroIsNotReported\"],\"isUpgradeable\":\"evyllznfhkqyt\"}") - .toObject(InMageRcmMobilityAgentDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmMobilityAgentDetails model = new InMageRcmMobilityAgentDetails(); - model = BinaryData.fromObject(model).toObject(InMageRcmMobilityAgentDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmNicDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmNicDetailsTests.java deleted file mode 100644 index 8cd2c04a3ef5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmNicDetailsTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EthernetAddressType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmNicDetails; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmNicDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmNicDetails model = BinaryData.fromString( - "{\"nicId\":\"tadopgfzdg\",\"isPrimaryNic\":\"c\",\"isSelectedForFailover\":\"rsvloy\",\"sourceIPAddress\":\"igqkzjuqwqa\",\"sourceIPAddressType\":\"Dynamic\",\"sourceNetworkId\":\"x\",\"sourceSubnetName\":\"xhyoip\",\"targetIPAddress\":\"dbgsosc\",\"targetIPAddressType\":\"Static\",\"targetSubnetName\":\"zfvbennmfkbpj\",\"testSubnetName\":\"tekwwnthropm\",\"testIPAddress\":\"d\",\"testIPAddressType\":\"Dynamic\"}") - .toObject(InMageRcmNicDetails.class); - Assertions.assertEquals("c", model.isPrimaryNic()); - Assertions.assertEquals("rsvloy", model.isSelectedForFailover()); - Assertions.assertEquals("dbgsosc", model.targetIpAddress()); - Assertions.assertEquals(EthernetAddressType.STATIC, model.targetIpAddressType()); - Assertions.assertEquals("zfvbennmfkbpj", model.targetSubnetName()); - Assertions.assertEquals("tekwwnthropm", model.testSubnetName()); - Assertions.assertEquals("d", model.testIpAddress()); - Assertions.assertEquals(EthernetAddressType.DYNAMIC, model.testIpAddressType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmNicDetails model = new InMageRcmNicDetails().withIsPrimaryNic("c") - .withIsSelectedForFailover("rsvloy") - .withTargetIpAddress("dbgsosc") - .withTargetIpAddressType(EthernetAddressType.STATIC) - .withTargetSubnetName("zfvbennmfkbpj") - .withTestSubnetName("tekwwnthropm") - .withTestIpAddress("d") - .withTestIpAddressType(EthernetAddressType.DYNAMIC); - model = BinaryData.fromObject(model).toObject(InMageRcmNicDetails.class); - Assertions.assertEquals("c", model.isPrimaryNic()); - Assertions.assertEquals("rsvloy", model.isSelectedForFailover()); - Assertions.assertEquals("dbgsosc", model.targetIpAddress()); - Assertions.assertEquals(EthernetAddressType.STATIC, model.targetIpAddressType()); - Assertions.assertEquals("zfvbennmfkbpj", model.targetSubnetName()); - Assertions.assertEquals("tekwwnthropm", model.testSubnetName()); - Assertions.assertEquals("d", model.testIpAddress()); - Assertions.assertEquals(EthernetAddressType.DYNAMIC, model.testIpAddressType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmNicInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmNicInputTests.java deleted file mode 100644 index 575c88235a41..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmNicInputTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmNicInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmNicInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmNicInput model = BinaryData.fromString( - "{\"nicId\":\"urz\",\"isPrimaryNic\":\"vktjhffecqkoq\",\"isSelectedForFailover\":\"uergaghpuzxkpye\",\"targetSubnetName\":\"fdyldhgyed\",\"targetStaticIPAddress\":\"zqiyuqhtder\",\"testSubnetName\":\"n\",\"testStaticIPAddress\":\"a\"}") - .toObject(InMageRcmNicInput.class); - Assertions.assertEquals("urz", model.nicId()); - Assertions.assertEquals("vktjhffecqkoq", model.isPrimaryNic()); - Assertions.assertEquals("uergaghpuzxkpye", model.isSelectedForFailover()); - Assertions.assertEquals("fdyldhgyed", model.targetSubnetName()); - Assertions.assertEquals("zqiyuqhtder", model.targetStaticIpAddress()); - Assertions.assertEquals("n", model.testSubnetName()); - Assertions.assertEquals("a", model.testStaticIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmNicInput model = new InMageRcmNicInput().withNicId("urz") - .withIsPrimaryNic("vktjhffecqkoq") - .withIsSelectedForFailover("uergaghpuzxkpye") - .withTargetSubnetName("fdyldhgyed") - .withTargetStaticIpAddress("zqiyuqhtder") - .withTestSubnetName("n") - .withTestStaticIpAddress("a"); - model = BinaryData.fromObject(model).toObject(InMageRcmNicInput.class); - Assertions.assertEquals("urz", model.nicId()); - Assertions.assertEquals("vktjhffecqkoq", model.isPrimaryNic()); - Assertions.assertEquals("uergaghpuzxkpye", model.isSelectedForFailover()); - Assertions.assertEquals("fdyldhgyed", model.targetSubnetName()); - Assertions.assertEquals("zqiyuqhtder", model.targetStaticIpAddress()); - Assertions.assertEquals("n", model.testSubnetName()); - Assertions.assertEquals("a", model.testStaticIpAddress()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmPolicyCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmPolicyCreationInputTests.java deleted file mode 100644 index 1620746f46ee..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmPolicyCreationInputTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmPolicyCreationInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmPolicyCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmPolicyCreationInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcm\",\"recoveryPointHistoryInMinutes\":1480236782,\"crashConsistentFrequencyInMinutes\":1722632251,\"appConsistentFrequencyInMinutes\":2131568654,\"enableMultiVmSync\":\"yxedznmx\"}") - .toObject(InMageRcmPolicyCreationInput.class); - Assertions.assertEquals(1480236782, model.recoveryPointHistoryInMinutes()); - Assertions.assertEquals(1722632251, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(2131568654, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals("yxedznmx", model.enableMultiVmSync()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmPolicyCreationInput model - = new InMageRcmPolicyCreationInput().withRecoveryPointHistoryInMinutes(1480236782) - .withCrashConsistentFrequencyInMinutes(1722632251) - .withAppConsistentFrequencyInMinutes(2131568654) - .withEnableMultiVmSync("yxedznmx"); - model = BinaryData.fromObject(model).toObject(InMageRcmPolicyCreationInput.class); - Assertions.assertEquals(1480236782, model.recoveryPointHistoryInMinutes()); - Assertions.assertEquals(1722632251, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(2131568654, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals("yxedznmx", model.enableMultiVmSync()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmPolicyDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmPolicyDetailsTests.java deleted file mode 100644 index 6651adce0567..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmPolicyDetailsTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmPolicyDetails; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmPolicyDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmPolicyDetails model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcm\",\"recoveryPointHistoryInMinutes\":1469596791,\"appConsistentFrequencyInMinutes\":1577824897,\"crashConsistentFrequencyInMinutes\":2133269081,\"enableMultiVmSync\":\"vmyifopxf\"}") - .toObject(InMageRcmPolicyDetails.class); - Assertions.assertEquals(1469596791, model.recoveryPointHistoryInMinutes()); - Assertions.assertEquals(1577824897, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(2133269081, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals("vmyifopxf", model.enableMultiVmSync()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmPolicyDetails model = new InMageRcmPolicyDetails().withRecoveryPointHistoryInMinutes(1469596791) - .withAppConsistentFrequencyInMinutes(1577824897) - .withCrashConsistentFrequencyInMinutes(2133269081) - .withEnableMultiVmSync("vmyifopxf"); - model = BinaryData.fromObject(model).toObject(InMageRcmPolicyDetails.class); - Assertions.assertEquals(1469596791, model.recoveryPointHistoryInMinutes()); - Assertions.assertEquals(1577824897, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(2133269081, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals("vmyifopxf", model.enableMultiVmSync()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmProtectedDiskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmProtectedDiskDetailsTests.java deleted file mode 100644 index 53391cef89d7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmProtectedDiskDetailsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskAccountType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmProtectedDiskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmSyncDetails; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmProtectedDiskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmProtectedDiskDetails model = BinaryData.fromString( - "{\"diskId\":\"tpdyzoutxfptof\",\"diskName\":\"nuywe\",\"isOSDisk\":\"gvad\",\"capacityInBytes\":9185978745071534533,\"logStorageAccountId\":\"vkgjpytpmpvd\",\"diskEncryptionSetId\":\"gehlufbortbnu\",\"seedManagedDiskId\":\"faxzsvbxxyjissk\",\"seedBlobUri\":\"qocl\",\"targetManagedDiskId\":\"ioewyhxes\",\"diskType\":\"StandardSSD_LRS\",\"dataPendingInLogDataStoreInMB\":56.49629137496913,\"dataPendingAtSourceAgentInMB\":18.951668101900808,\"isInitialReplicationComplete\":\"qfbdxmdses\",\"irDetails\":{\"progressHealth\":\"NoProgress\",\"transferredBytes\":3596991969048751162,\"last15MinutesTransferredBytes\":4059127042163303518,\"lastDataTransferTimeUtc\":\"lpdib\",\"processedBytes\":1471676215734551835,\"startTime\":\"eatnejrnminzq\",\"lastRefreshTime\":\"gtkihonikzsr\",\"progressPercentage\":785240806},\"resyncDetails\":{\"progressHealth\":\"Queued\",\"transferredBytes\":778176165721909518,\"last15MinutesTransferredBytes\":3766908090253531975,\"lastDataTransferTimeUtc\":\"ogkensckhbmcar\",\"processedBytes\":5626892338199425573,\"startTime\":\"xkwyk\",\"lastRefreshTime\":\"dndx\",\"progressPercentage\":470451433}}") - .toObject(InMageRcmProtectedDiskDetails.class); - Assertions.assertEquals(DiskAccountType.STANDARD_SSD_LRS, model.diskType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmProtectedDiskDetails model - = new InMageRcmProtectedDiskDetails().withDiskType(DiskAccountType.STANDARD_SSD_LRS) - .withIrDetails(new InMageRcmSyncDetails()) - .withResyncDetails(new InMageRcmSyncDetails()); - model = BinaryData.fromObject(model).toObject(InMageRcmProtectedDiskDetails.class); - Assertions.assertEquals(DiskAccountType.STANDARD_SSD_LRS, model.diskType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmProtectionContainerMappingDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmProtectionContainerMappingDetailsTests.java deleted file mode 100644 index f1dcffe882d8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmProtectionContainerMappingDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmProtectionContainerMappingDetails; - -public final class InMageRcmProtectionContainerMappingDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmProtectionContainerMappingDetails model - = BinaryData.fromString("{\"instanceType\":\"InMageRcm\",\"enableAgentAutoUpgrade\":\"bgacnr\"}") - .toObject(InMageRcmProtectionContainerMappingDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmProtectionContainerMappingDetails model = new InMageRcmProtectionContainerMappingDetails(); - model = BinaryData.fromObject(model).toObject(InMageRcmProtectionContainerMappingDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmRecoveryPointDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmRecoveryPointDetailsTests.java deleted file mode 100644 index 3d61c8898469..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmRecoveryPointDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmRecoveryPointDetails; - -public final class InMageRcmRecoveryPointDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmRecoveryPointDetails model - = BinaryData.fromString("{\"instanceType\":\"InMageRcm\",\"isMultiVmSyncPoint\":\"dtncmsps\"}") - .toObject(InMageRcmRecoveryPointDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmRecoveryPointDetails model = new InMageRcmRecoveryPointDetails(); - model = BinaryData.fromObject(model).toObject(InMageRcmRecoveryPointDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmReprotectInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmReprotectInputTests.java deleted file mode 100644 index e57d09dcf8ed..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmReprotectInputTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmReprotectInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmReprotectInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmReprotectInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcm\",\"reprotectAgentId\":\"cwwtzqzclo\",\"datastoreName\":\"hy\",\"logStorageAccountId\":\"pgidhzgyresgzsdt\",\"policyId\":\"byorjplb\"}") - .toObject(InMageRcmReprotectInput.class); - Assertions.assertEquals("cwwtzqzclo", model.reprotectAgentId()); - Assertions.assertEquals("hy", model.datastoreName()); - Assertions.assertEquals("pgidhzgyresgzsdt", model.logStorageAccountId()); - Assertions.assertEquals("byorjplb", model.policyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmReprotectInput model = new InMageRcmReprotectInput().withReprotectAgentId("cwwtzqzclo") - .withDatastoreName("hy") - .withLogStorageAccountId("pgidhzgyresgzsdt") - .withPolicyId("byorjplb"); - model = BinaryData.fromObject(model).toObject(InMageRcmReprotectInput.class); - Assertions.assertEquals("cwwtzqzclo", model.reprotectAgentId()); - Assertions.assertEquals("hy", model.datastoreName()); - Assertions.assertEquals("pgidhzgyresgzsdt", model.logStorageAccountId()); - Assertions.assertEquals("byorjplb", model.policyId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmSyncDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmSyncDetailsTests.java deleted file mode 100644 index ea16c18304e9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmSyncDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmSyncDetails; - -public final class InMageRcmSyncDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmSyncDetails model = BinaryData.fromString( - "{\"progressHealth\":\"SlowProgress\",\"transferredBytes\":8514603100054710213,\"last15MinutesTransferredBytes\":468712523679187650,\"lastDataTransferTimeUtc\":\"t\",\"processedBytes\":7769561351472935025,\"startTime\":\"scdx\",\"lastRefreshTime\":\"rnjr\",\"progressPercentage\":1625515673}") - .toObject(InMageRcmSyncDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmSyncDetails model = new InMageRcmSyncDetails(); - model = BinaryData.fromObject(model).toObject(InMageRcmSyncDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmTestFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmTestFailoverInputTests.java deleted file mode 100644 index 5122b9674601..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmTestFailoverInputTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmTestFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmTestFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmTestFailoverInput model = BinaryData - .fromString("{\"instanceType\":\"InMageRcm\",\"networkId\":\"ychakvy\",\"recoveryPointId\":\"bqvum\"}") - .toObject(InMageRcmTestFailoverInput.class); - Assertions.assertEquals("ychakvy", model.networkId()); - Assertions.assertEquals("bqvum", model.recoveryPointId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmTestFailoverInput model - = new InMageRcmTestFailoverInput().withNetworkId("ychakvy").withRecoveryPointId("bqvum"); - model = BinaryData.fromObject(model).toObject(InMageRcmTestFailoverInput.class); - Assertions.assertEquals("ychakvy", model.networkId()); - Assertions.assertEquals("bqvum", model.recoveryPointId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmUnplannedFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmUnplannedFailoverInputTests.java deleted file mode 100644 index 175b0f3ab435..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmUnplannedFailoverInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmUnplannedFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmUnplannedFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmUnplannedFailoverInput model = BinaryData - .fromString( - "{\"instanceType\":\"InMageRcm\",\"performShutdown\":\"xqjsiuepm\",\"recoveryPointId\":\"fnzlpqmp\"}") - .toObject(InMageRcmUnplannedFailoverInput.class); - Assertions.assertEquals("xqjsiuepm", model.performShutdown()); - Assertions.assertEquals("fnzlpqmp", model.recoveryPointId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmUnplannedFailoverInput model - = new InMageRcmUnplannedFailoverInput().withPerformShutdown("xqjsiuepm").withRecoveryPointId("fnzlpqmp"); - model = BinaryData.fromObject(model).toObject(InMageRcmUnplannedFailoverInput.class); - Assertions.assertEquals("xqjsiuepm", model.performShutdown()); - Assertions.assertEquals("fnzlpqmp", model.recoveryPointId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmUpdateContainerMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmUpdateContainerMappingInputTests.java deleted file mode 100644 index 5ee9e2bf2274..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmUpdateContainerMappingInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmUpdateContainerMappingInput; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmUpdateContainerMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmUpdateContainerMappingInput model - = BinaryData.fromString("{\"instanceType\":\"InMageRcm\",\"enableAgentAutoUpgrade\":\"ulbl\"}") - .toObject(InMageRcmUpdateContainerMappingInput.class); - Assertions.assertEquals("ulbl", model.enableAgentAutoUpgrade()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmUpdateContainerMappingInput model - = new InMageRcmUpdateContainerMappingInput().withEnableAgentAutoUpgrade("ulbl"); - model = BinaryData.fromObject(model).toObject(InMageRcmUpdateContainerMappingInput.class); - Assertions.assertEquals("ulbl", model.enableAgentAutoUpgrade()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmUpdateReplicationProtectedItemInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmUpdateReplicationProtectedItemInputTests.java deleted file mode 100644 index 2fc9a912640f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageRcmUpdateReplicationProtectedItemInputTests.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmNicInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmUpdateReplicationProtectedItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LicenseType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InMageRcmUpdateReplicationProtectedItemInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageRcmUpdateReplicationProtectedItemInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcm\",\"targetVmName\":\"tuxy\",\"targetVmSize\":\"hfcaeo\",\"targetResourceGroupId\":\"fqd\",\"targetAvailabilitySetId\":\"jflobhahqmomf\",\"targetAvailabilityZone\":\"o\",\"targetProximityPlacementGroupId\":\"fr\",\"targetBootDiagnosticsStorageAccountId\":\"gbmxldjmz\",\"targetNetworkId\":\"bjesylslur\",\"testNetworkId\":\"fygpnyhgd\",\"vmNics\":[{\"nicId\":\"sc\",\"isPrimaryNic\":\"gqyvouprsytqzss\",\"isSelectedForFailover\":\"mgw\",\"targetSubnetName\":\"ivrxpfduiol\",\"targetStaticIPAddress\":\"yqvpbfjpo\",\"testSubnetName\":\"ucfzluczdquu\",\"testStaticIPAddress\":\"ormvh\"},{\"nicId\":\"zielbprnq\",\"isPrimaryNic\":\"jywzcqyg\",\"isSelectedForFailover\":\"nwsvhbngqiwye\",\"targetSubnetName\":\"ob\",\"targetStaticIPAddress\":\"rpnrehkunsbfjh\",\"testSubnetName\":\"w\",\"testStaticIPAddress\":\"kvegeattbzkgtzq\"}],\"licenseType\":\"NoLicenseType\"}") - .toObject(InMageRcmUpdateReplicationProtectedItemInput.class); - Assertions.assertEquals("tuxy", model.targetVmName()); - Assertions.assertEquals("hfcaeo", model.targetVmSize()); - Assertions.assertEquals("fqd", model.targetResourceGroupId()); - Assertions.assertEquals("jflobhahqmomf", model.targetAvailabilitySetId()); - Assertions.assertEquals("o", model.targetAvailabilityZone()); - Assertions.assertEquals("fr", model.targetProximityPlacementGroupId()); - Assertions.assertEquals("gbmxldjmz", model.targetBootDiagnosticsStorageAccountId()); - Assertions.assertEquals("bjesylslur", model.targetNetworkId()); - Assertions.assertEquals("fygpnyhgd", model.testNetworkId()); - Assertions.assertEquals("sc", model.vmNics().get(0).nicId()); - Assertions.assertEquals("gqyvouprsytqzss", model.vmNics().get(0).isPrimaryNic()); - Assertions.assertEquals("mgw", model.vmNics().get(0).isSelectedForFailover()); - Assertions.assertEquals("ivrxpfduiol", model.vmNics().get(0).targetSubnetName()); - Assertions.assertEquals("yqvpbfjpo", model.vmNics().get(0).targetStaticIpAddress()); - Assertions.assertEquals("ucfzluczdquu", model.vmNics().get(0).testSubnetName()); - Assertions.assertEquals("ormvh", model.vmNics().get(0).testStaticIpAddress()); - Assertions.assertEquals(LicenseType.NO_LICENSE_TYPE, model.licenseType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageRcmUpdateReplicationProtectedItemInput model - = new InMageRcmUpdateReplicationProtectedItemInput().withTargetVmName("tuxy") - .withTargetVmSize("hfcaeo") - .withTargetResourceGroupId("fqd") - .withTargetAvailabilitySetId("jflobhahqmomf") - .withTargetAvailabilityZone("o") - .withTargetProximityPlacementGroupId("fr") - .withTargetBootDiagnosticsStorageAccountId("gbmxldjmz") - .withTargetNetworkId("bjesylslur") - .withTestNetworkId("fygpnyhgd") - .withVmNics(Arrays.asList( - new InMageRcmNicInput().withNicId("sc") - .withIsPrimaryNic("gqyvouprsytqzss") - .withIsSelectedForFailover("mgw") - .withTargetSubnetName("ivrxpfduiol") - .withTargetStaticIpAddress("yqvpbfjpo") - .withTestSubnetName("ucfzluczdquu") - .withTestStaticIpAddress("ormvh"), - new InMageRcmNicInput().withNicId("zielbprnq") - .withIsPrimaryNic("jywzcqyg") - .withIsSelectedForFailover("nwsvhbngqiwye") - .withTargetSubnetName("ob") - .withTargetStaticIpAddress("rpnrehkunsbfjh") - .withTestSubnetName("w") - .withTestStaticIpAddress("kvegeattbzkgtzq"))) - .withLicenseType(LicenseType.NO_LICENSE_TYPE); - model = BinaryData.fromObject(model).toObject(InMageRcmUpdateReplicationProtectedItemInput.class); - Assertions.assertEquals("tuxy", model.targetVmName()); - Assertions.assertEquals("hfcaeo", model.targetVmSize()); - Assertions.assertEquals("fqd", model.targetResourceGroupId()); - Assertions.assertEquals("jflobhahqmomf", model.targetAvailabilitySetId()); - Assertions.assertEquals("o", model.targetAvailabilityZone()); - Assertions.assertEquals("fr", model.targetProximityPlacementGroupId()); - Assertions.assertEquals("gbmxldjmz", model.targetBootDiagnosticsStorageAccountId()); - Assertions.assertEquals("bjesylslur", model.targetNetworkId()); - Assertions.assertEquals("fygpnyhgd", model.testNetworkId()); - Assertions.assertEquals("sc", model.vmNics().get(0).nicId()); - Assertions.assertEquals("gqyvouprsytqzss", model.vmNics().get(0).isPrimaryNic()); - Assertions.assertEquals("mgw", model.vmNics().get(0).isSelectedForFailover()); - Assertions.assertEquals("ivrxpfduiol", model.vmNics().get(0).targetSubnetName()); - Assertions.assertEquals("yqvpbfjpo", model.vmNics().get(0).targetStaticIpAddress()); - Assertions.assertEquals("ucfzluczdquu", model.vmNics().get(0).testSubnetName()); - Assertions.assertEquals("ormvh", model.vmNics().get(0).testStaticIpAddress()); - Assertions.assertEquals(LicenseType.NO_LICENSE_TYPE, model.licenseType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageReprotectInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageReprotectInputTests.java deleted file mode 100644 index fee198eaac1f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageReprotectInputTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageDiskExclusionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageDiskSignatureExclusionOptions; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageReprotectInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageVolumeExclusionOptions; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InMageReprotectInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageReprotectInput model = BinaryData.fromString( - "{\"instanceType\":\"InMage\",\"masterTargetId\":\"ujjgnfgrzxbarc\",\"processServerId\":\"paefzqsy\",\"retentionDrive\":\"jwenjcytesmf\",\"runAsAccountId\":\"r\",\"datastoreName\":\"odqhuauzmzivrt\",\"diskExclusionInput\":{\"volumeOptions\":[{\"volumeLabel\":\"ezvhj\",\"onlyExcludeIfSingleVolume\":\"xdyyrud\"},{\"volumeLabel\":\"hswtvdkxbqssgfe\",\"onlyExcludeIfSingleVolume\":\"fdxbvwfqjchiv\"},{\"volumeLabel\":\"ija\",\"onlyExcludeIfSingleVolume\":\"ndmuvardlmz\"}],\"diskSignatureOptions\":[{\"diskSignature\":\"r\"}]},\"profileId\":\"muhcuhtuzl\",\"disksToInclude\":[\"yo\",\"garp\",\"ctwrapcz\",\"ojqyvzes\"]}") - .toObject(InMageReprotectInput.class); - Assertions.assertEquals("ujjgnfgrzxbarc", model.masterTargetId()); - Assertions.assertEquals("paefzqsy", model.processServerId()); - Assertions.assertEquals("jwenjcytesmf", model.retentionDrive()); - Assertions.assertEquals("r", model.runAsAccountId()); - Assertions.assertEquals("odqhuauzmzivrt", model.datastoreName()); - Assertions.assertEquals("ezvhj", model.diskExclusionInput().volumeOptions().get(0).volumeLabel()); - Assertions.assertEquals("xdyyrud", - model.diskExclusionInput().volumeOptions().get(0).onlyExcludeIfSingleVolume()); - Assertions.assertEquals("r", model.diskExclusionInput().diskSignatureOptions().get(0).diskSignature()); - Assertions.assertEquals("muhcuhtuzl", model.profileId()); - Assertions.assertEquals("yo", model.disksToInclude().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageReprotectInput model = new InMageReprotectInput().withMasterTargetId("ujjgnfgrzxbarc") - .withProcessServerId("paefzqsy") - .withRetentionDrive("jwenjcytesmf") - .withRunAsAccountId("r") - .withDatastoreName("odqhuauzmzivrt") - .withDiskExclusionInput(new InMageDiskExclusionInput().withVolumeOptions(Arrays.asList( - new InMageVolumeExclusionOptions().withVolumeLabel("ezvhj").withOnlyExcludeIfSingleVolume("xdyyrud"), - new InMageVolumeExclusionOptions().withVolumeLabel("hswtvdkxbqssgfe") - .withOnlyExcludeIfSingleVolume("fdxbvwfqjchiv"), - new InMageVolumeExclusionOptions().withVolumeLabel("ija").withOnlyExcludeIfSingleVolume("ndmuvardlmz"))) - .withDiskSignatureOptions( - Arrays.asList(new InMageDiskSignatureExclusionOptions().withDiskSignature("r")))) - .withProfileId("muhcuhtuzl") - .withDisksToInclude(Arrays.asList("yo", "garp", "ctwrapcz", "ojqyvzes")); - model = BinaryData.fromObject(model).toObject(InMageReprotectInput.class); - Assertions.assertEquals("ujjgnfgrzxbarc", model.masterTargetId()); - Assertions.assertEquals("paefzqsy", model.processServerId()); - Assertions.assertEquals("jwenjcytesmf", model.retentionDrive()); - Assertions.assertEquals("r", model.runAsAccountId()); - Assertions.assertEquals("odqhuauzmzivrt", model.datastoreName()); - Assertions.assertEquals("ezvhj", model.diskExclusionInput().volumeOptions().get(0).volumeLabel()); - Assertions.assertEquals("xdyyrud", - model.diskExclusionInput().volumeOptions().get(0).onlyExcludeIfSingleVolume()); - Assertions.assertEquals("r", model.diskExclusionInput().diskSignatureOptions().get(0).diskSignature()); - Assertions.assertEquals("muhcuhtuzl", model.profileId()); - Assertions.assertEquals("yo", model.disksToInclude().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageTestFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageTestFailoverInputTests.java deleted file mode 100644 index 8dcd2824a481..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageTestFailoverInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageTestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPointType; -import org.junit.jupiter.api.Assertions; - -public final class InMageTestFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageTestFailoverInput model = BinaryData - .fromString("{\"instanceType\":\"InMage\",\"recoveryPointType\":\"Custom\",\"recoveryPointId\":\"snj\"}") - .toObject(InMageTestFailoverInput.class); - Assertions.assertEquals(RecoveryPointType.CUSTOM, model.recoveryPointType()); - Assertions.assertEquals("snj", model.recoveryPointId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageTestFailoverInput model - = new InMageTestFailoverInput().withRecoveryPointType(RecoveryPointType.CUSTOM).withRecoveryPointId("snj"); - model = BinaryData.fromObject(model).toObject(InMageTestFailoverInput.class); - Assertions.assertEquals(RecoveryPointType.CUSTOM, model.recoveryPointType()); - Assertions.assertEquals("snj", model.recoveryPointId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageUnplannedFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageUnplannedFailoverInputTests.java deleted file mode 100644 index ec222942dec2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageUnplannedFailoverInputTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageUnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPointType; -import org.junit.jupiter.api.Assertions; - -public final class InMageUnplannedFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageUnplannedFailoverInput model = BinaryData.fromString( - "{\"instanceType\":\"InMage\",\"recoveryPointType\":\"LatestTag\",\"recoveryPointId\":\"aadcndazabundt\"}") - .toObject(InMageUnplannedFailoverInput.class); - Assertions.assertEquals(RecoveryPointType.LATEST_TAG, model.recoveryPointType()); - Assertions.assertEquals("aadcndazabundt", model.recoveryPointId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageUnplannedFailoverInput model - = new InMageUnplannedFailoverInput().withRecoveryPointType(RecoveryPointType.LATEST_TAG) - .withRecoveryPointId("aadcndazabundt"); - model = BinaryData.fromObject(model).toObject(InMageUnplannedFailoverInput.class); - Assertions.assertEquals(RecoveryPointType.LATEST_TAG, model.recoveryPointType()); - Assertions.assertEquals("aadcndazabundt", model.recoveryPointId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageVolumeExclusionOptionsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageVolumeExclusionOptionsTests.java deleted file mode 100644 index 1965e5d2a312..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InMageVolumeExclusionOptionsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageVolumeExclusionOptions; -import org.junit.jupiter.api.Assertions; - -public final class InMageVolumeExclusionOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InMageVolumeExclusionOptions model - = BinaryData.fromString("{\"volumeLabel\":\"vecovsdqhzr\",\"onlyExcludeIfSingleVolume\":\"bakrli\"}") - .toObject(InMageVolumeExclusionOptions.class); - Assertions.assertEquals("vecovsdqhzr", model.volumeLabel()); - Assertions.assertEquals("bakrli", model.onlyExcludeIfSingleVolume()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InMageVolumeExclusionOptions model - = new InMageVolumeExclusionOptions().withVolumeLabel("vecovsdqhzr").withOnlyExcludeIfSingleVolume("bakrli"); - model = BinaryData.fromObject(model).toObject(InMageVolumeExclusionOptions.class); - Assertions.assertEquals("vecovsdqhzr", model.volumeLabel()); - Assertions.assertEquals("bakrli", model.onlyExcludeIfSingleVolume()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InconsistentVmDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InconsistentVmDetailsTests.java deleted file mode 100644 index 3f6c74b47eda..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InconsistentVmDetailsTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InconsistentVmDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InconsistentVmDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InconsistentVmDetails model = BinaryData.fromString( - "{\"vmName\":\"laimouxwk\",\"cloudName\":\"mud\",\"details\":[\"oibi\",\"ziuswsw\",\"rk\",\"qsj\"],\"errorIds\":[\"qqvyfscyrfw\",\"iv\"]}") - .toObject(InconsistentVmDetails.class); - Assertions.assertEquals("laimouxwk", model.vmName()); - Assertions.assertEquals("mud", model.cloudName()); - Assertions.assertEquals("oibi", model.details().get(0)); - Assertions.assertEquals("qqvyfscyrfw", model.errorIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InconsistentVmDetails model = new InconsistentVmDetails().withVmName("laimouxwk") - .withCloudName("mud") - .withDetails(Arrays.asList("oibi", "ziuswsw", "rk", "qsj")) - .withErrorIds(Arrays.asList("qqvyfscyrfw", "iv")); - model = BinaryData.fromObject(model).toObject(InconsistentVmDetails.class); - Assertions.assertEquals("laimouxwk", model.vmName()); - Assertions.assertEquals("mud", model.cloudName()); - Assertions.assertEquals("oibi", model.details().get(0)); - Assertions.assertEquals("qqvyfscyrfw", model.errorIds().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InitialReplicationDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InitialReplicationDetailsTests.java deleted file mode 100644 index d6d82a7c93e8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InitialReplicationDetailsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InitialReplicationDetails; -import org.junit.jupiter.api.Assertions; - -public final class InitialReplicationDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InitialReplicationDetails model = BinaryData - .fromString("{\"initialReplicationType\":\"pqbye\",\"initialReplicationProgressPercentage\":\"wy\"}") - .toObject(InitialReplicationDetails.class); - Assertions.assertEquals("pqbye", model.initialReplicationType()); - Assertions.assertEquals("wy", model.initialReplicationProgressPercentage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InitialReplicationDetails model = new InitialReplicationDetails().withInitialReplicationType("pqbye") - .withInitialReplicationProgressPercentage("wy"); - model = BinaryData.fromObject(model).toObject(InitialReplicationDetails.class); - Assertions.assertEquals("pqbye", model.initialReplicationType()); - Assertions.assertEquals("wy", model.initialReplicationProgressPercentage()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InputEndpointTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InputEndpointTests.java deleted file mode 100644 index 60821b7da7df..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/InputEndpointTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InputEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class InputEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InputEndpoint model = BinaryData - .fromString( - "{\"endpointName\":\"gna\",\"privatePort\":58413214,\"publicPort\":45173211,\"protocol\":\"bktyjmfc\"}") - .toObject(InputEndpoint.class); - Assertions.assertEquals("gna", model.endpointName()); - Assertions.assertEquals(58413214, model.privatePort()); - Assertions.assertEquals(45173211, model.publicPort()); - Assertions.assertEquals("bktyjmfc", model.protocol()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InputEndpoint model = new InputEndpoint().withEndpointName("gna") - .withPrivatePort(58413214) - .withPublicPort(45173211) - .withProtocol("bktyjmfc"); - model = BinaryData.fromObject(model).toObject(InputEndpoint.class); - Assertions.assertEquals("gna", model.endpointName()); - Assertions.assertEquals(58413214, model.privatePort()); - Assertions.assertEquals(45173211, model.publicPort()); - Assertions.assertEquals("bktyjmfc", model.protocol()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/IpConfigDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/IpConfigDetailsTests.java deleted file mode 100644 index 9b4b11ef0a4d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/IpConfigDetailsTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IpConfigDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpConfigDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpConfigDetails model = BinaryData.fromString( - "{\"name\":\"r\",\"isPrimary\":true,\"subnetName\":\"gaxwmzwdfkbnrzo\",\"staticIPAddress\":\"dltb\",\"ipAddressType\":\"tqjfgxxsaet\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"vpyigdaqq\",\"recoveryStaticIPAddress\":\"zdcduwjoedxng\",\"recoveryIPAddressType\":\"aifpaurwwgil\",\"recoveryPublicIPAddressId\":\"qqa\",\"recoveryLBBackendAddressPoolIds\":[\"kxwxdcvjwcyziake\",\"iqch\",\"rtui\",\"dsiwdfmmp\"],\"tfoSubnetName\":\"zzwvywrgyng\",\"tfoStaticIPAddress\":\"grpxncakiqaondjr\",\"tfoPublicIPAddressId\":\"lamgglvlmfejdo\",\"tfoLBBackendAddressPoolIds\":[\"kgltyg\",\"hqfgqkayejsx\"]}") - .toObject(IpConfigDetails.class); - Assertions.assertEquals("r", model.name()); - Assertions.assertEquals(true, model.isPrimary()); - Assertions.assertEquals("gaxwmzwdfkbnrzo", model.subnetName()); - Assertions.assertEquals("dltb", model.staticIpAddress()); - Assertions.assertEquals("tqjfgxxsaet", model.ipAddressType()); - Assertions.assertEquals(false, model.isSeletedForFailover()); - Assertions.assertEquals("vpyigdaqq", model.recoverySubnetName()); - Assertions.assertEquals("zdcduwjoedxng", model.recoveryStaticIpAddress()); - Assertions.assertEquals("aifpaurwwgil", model.recoveryIpAddressType()); - Assertions.assertEquals("qqa", model.recoveryPublicIpAddressId()); - Assertions.assertEquals("kxwxdcvjwcyziake", model.recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("zzwvywrgyng", model.tfoSubnetName()); - Assertions.assertEquals("grpxncakiqaondjr", model.tfoStaticIpAddress()); - Assertions.assertEquals("lamgglvlmfejdo", model.tfoPublicIpAddressId()); - Assertions.assertEquals("kgltyg", model.tfoLBBackendAddressPoolIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpConfigDetails model = new IpConfigDetails().withName("r") - .withIsPrimary(true) - .withSubnetName("gaxwmzwdfkbnrzo") - .withStaticIpAddress("dltb") - .withIpAddressType("tqjfgxxsaet") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("vpyigdaqq") - .withRecoveryStaticIpAddress("zdcduwjoedxng") - .withRecoveryIpAddressType("aifpaurwwgil") - .withRecoveryPublicIpAddressId("qqa") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("kxwxdcvjwcyziake", "iqch", "rtui", "dsiwdfmmp")) - .withTfoSubnetName("zzwvywrgyng") - .withTfoStaticIpAddress("grpxncakiqaondjr") - .withTfoPublicIpAddressId("lamgglvlmfejdo") - .withTfoLBBackendAddressPoolIds(Arrays.asList("kgltyg", "hqfgqkayejsx")); - model = BinaryData.fromObject(model).toObject(IpConfigDetails.class); - Assertions.assertEquals("r", model.name()); - Assertions.assertEquals(true, model.isPrimary()); - Assertions.assertEquals("gaxwmzwdfkbnrzo", model.subnetName()); - Assertions.assertEquals("dltb", model.staticIpAddress()); - Assertions.assertEquals("tqjfgxxsaet", model.ipAddressType()); - Assertions.assertEquals(false, model.isSeletedForFailover()); - Assertions.assertEquals("vpyigdaqq", model.recoverySubnetName()); - Assertions.assertEquals("zdcduwjoedxng", model.recoveryStaticIpAddress()); - Assertions.assertEquals("aifpaurwwgil", model.recoveryIpAddressType()); - Assertions.assertEquals("qqa", model.recoveryPublicIpAddressId()); - Assertions.assertEquals("kxwxdcvjwcyziake", model.recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("zzwvywrgyng", model.tfoSubnetName()); - Assertions.assertEquals("grpxncakiqaondjr", model.tfoStaticIpAddress()); - Assertions.assertEquals("lamgglvlmfejdo", model.tfoPublicIpAddressId()); - Assertions.assertEquals("kgltyg", model.tfoLBBackendAddressPoolIds().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/IpConfigInputDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/IpConfigInputDetailsTests.java deleted file mode 100644 index 58dd2ed9a1a2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/IpConfigInputDetailsTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IpConfigInputDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpConfigInputDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpConfigInputDetails model = BinaryData.fromString( - "{\"ipConfigName\":\"pelmcuvhixbjxyf\",\"isPrimary\":false,\"isSeletedForFailover\":false,\"recoverySubnetName\":\"ool\",\"recoveryStaticIPAddress\":\"tpkiwkkbnujry\",\"recoveryPublicIPAddressId\":\"tylbfpncurdoiw\",\"recoveryLBBackendAddressPoolIds\":[\"htywubxcbihwq\",\"nfdn\"],\"tfoSubnetName\":\"jchrdgoihxumw\",\"tfoStaticIPAddress\":\"ond\",\"tfoPublicIPAddressId\":\"luudfdlwggytsb\",\"tfoLBBackendAddressPoolIds\":[\"vvt\",\"seinqfiuf\",\"qknp\",\"rgnepttwqmsniffc\"]}") - .toObject(IpConfigInputDetails.class); - Assertions.assertEquals("pelmcuvhixbjxyf", model.ipConfigName()); - Assertions.assertEquals(false, model.isPrimary()); - Assertions.assertEquals(false, model.isSeletedForFailover()); - Assertions.assertEquals("ool", model.recoverySubnetName()); - Assertions.assertEquals("tpkiwkkbnujry", model.recoveryStaticIpAddress()); - Assertions.assertEquals("tylbfpncurdoiw", model.recoveryPublicIpAddressId()); - Assertions.assertEquals("htywubxcbihwq", model.recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("jchrdgoihxumw", model.tfoSubnetName()); - Assertions.assertEquals("ond", model.tfoStaticIpAddress()); - Assertions.assertEquals("luudfdlwggytsb", model.tfoPublicIpAddressId()); - Assertions.assertEquals("vvt", model.tfoLBBackendAddressPoolIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpConfigInputDetails model = new IpConfigInputDetails().withIpConfigName("pelmcuvhixbjxyf") - .withIsPrimary(false) - .withIsSeletedForFailover(false) - .withRecoverySubnetName("ool") - .withRecoveryStaticIpAddress("tpkiwkkbnujry") - .withRecoveryPublicIpAddressId("tylbfpncurdoiw") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("htywubxcbihwq", "nfdn")) - .withTfoSubnetName("jchrdgoihxumw") - .withTfoStaticIpAddress("ond") - .withTfoPublicIpAddressId("luudfdlwggytsb") - .withTfoLBBackendAddressPoolIds(Arrays.asList("vvt", "seinqfiuf", "qknp", "rgnepttwqmsniffc")); - model = BinaryData.fromObject(model).toObject(IpConfigInputDetails.class); - Assertions.assertEquals("pelmcuvhixbjxyf", model.ipConfigName()); - Assertions.assertEquals(false, model.isPrimary()); - Assertions.assertEquals(false, model.isSeletedForFailover()); - Assertions.assertEquals("ool", model.recoverySubnetName()); - Assertions.assertEquals("tpkiwkkbnujry", model.recoveryStaticIpAddress()); - Assertions.assertEquals("tylbfpncurdoiw", model.recoveryPublicIpAddressId()); - Assertions.assertEquals("htywubxcbihwq", model.recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("jchrdgoihxumw", model.tfoSubnetName()); - Assertions.assertEquals("ond", model.tfoStaticIpAddress()); - Assertions.assertEquals("luudfdlwggytsb", model.tfoPublicIpAddressId()); - Assertions.assertEquals("vvt", model.tfoLBBackendAddressPoolIds().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobCollectionTests.java deleted file mode 100644 index 9601f6d71f71..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobCollectionTests.java +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.JobInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AsrTask; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.GroupTaskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobErrorDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProviderError; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ServiceError; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TaskTypeDetails; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"activityId\":\"jeuut\",\"scenarioName\":\"xezw\",\"friendlyName\":\"okvbwnhhtqlgehg\",\"state\":\"ipifhpfeoajvg\",\"stateDescription\":\"txjcsheafidlt\",\"tasks\":[{\"taskId\":\"esmkssjhoiftxfkf\",\"name\":\"gpr\",\"startTime\":\"2021-06-29T04:06:59Z\",\"endTime\":\"2021-04-05T10:55:26Z\",\"allowedActions\":[\"cbiqtgdqoh\"],\"friendlyName\":\"wsldrizetpwbr\",\"state\":\"llibphbqzmizak\",\"stateDescription\":\"ankjpdnjzh\",\"taskType\":\"oylhjlmuoyxprimr\",\"customDetails\":{\"instanceType\":\"TaskTypeDetails\"},\"groupTaskCustomDetails\":{\"instanceType\":\"GroupTaskDetails\"},\"errors\":[{},{}]}],\"errors\":[{\"serviceErrorDetails\":{},\"providerErrorDetails\":{},\"errorLevel\":\"islstv\",\"creationTime\":\"2021-10-17T18:13:46Z\",\"taskId\":\"wxdzaumweoohgu\"},{\"serviceErrorDetails\":{},\"providerErrorDetails\":{},\"errorLevel\":\"boyjathwt\",\"creationTime\":\"2021-03-19T17:17:36Z\",\"taskId\":\"a\"},{\"serviceErrorDetails\":{},\"providerErrorDetails\":{},\"errorLevel\":\"dxmeb\",\"creationTime\":\"2021-01-03T03:25:45Z\",\"taskId\":\"jpahlxvea\"},{\"serviceErrorDetails\":{},\"providerErrorDetails\":{},\"errorLevel\":\"nmwmqtibx\",\"creationTime\":\"2021-03-01T23:53:32Z\",\"taskId\":\"dt\"}],\"startTime\":\"2021-11-15T06:45:30Z\",\"endTime\":\"2021-02-14T10:50:47Z\",\"allowedActions\":[\"ijaeukm\"],\"targetObjectId\":\"ieekpndzaa\",\"targetObjectName\":\"udqmeqwigpibudq\",\"targetInstanceType\":\"xebeybpmz\",\"customDetails\":{\"instanceType\":\"JobDetails\",\"affectedObjectDetails\":{\"aqi\":\"ff\",\"ioqaqhvs\":\"mhh\"}}},\"location\":\"fuqyrxpdlcgqlsi\",\"id\":\"mjqfrddgamquhio\",\"name\":\"rsjuivfcdisyir\",\"type\":\"xzhczexrxz\"},{\"properties\":{\"activityId\":\"rtrhqvwrevkhgnl\",\"scenarioName\":\"onzlr\",\"friendlyName\":\"qywncvjtsz\",\"state\":\"fizehtdhgbjk\",\"stateDescription\":\"eljeamurvzmlovua\",\"tasks\":[{\"taskId\":\"cxlpmjerb\",\"name\":\"elvidizozsdbccx\",\"startTime\":\"2021-04-03T14:05:40Z\",\"endTime\":\"2021-06-04T20:01:35Z\",\"allowedActions\":[\"nwncypuuw\",\"ltv\",\"qjctzenkeif\",\"zhmkdasvflyh\"],\"friendlyName\":\"cu\",\"state\":\"hxgsrboldfor\",\"stateDescription\":\"wjlvizbfhfov\",\"taskType\":\"cqpbtuo\",\"customDetails\":{\"instanceType\":\"TaskTypeDetails\"},\"groupTaskCustomDetails\":{\"instanceType\":\"GroupTaskDetails\"},\"errors\":[{}]},{\"taskId\":\"bbelawumuaslzk\",\"name\":\"rwoycqucwyh\",\"startTime\":\"2021-12-05T11:23:21Z\",\"endTime\":\"2021-01-03T22:26:02Z\",\"allowedActions\":[\"kywuhpsvfuu\",\"utlwexxwla\",\"niexzsrzpgepq\"],\"friendlyName\":\"bb\",\"state\":\"pgdakchzyvli\",\"stateDescription\":\"nrkcxkj\",\"taskType\":\"nxm\",\"customDetails\":{\"instanceType\":\"TaskTypeDetails\"},\"groupTaskCustomDetails\":{\"instanceType\":\"GroupTaskDetails\"},\"errors\":[{},{},{}]},{\"taskId\":\"qrntv\",\"name\":\"ijpstte\",\"startTime\":\"2021-11-08T06:52:34Z\",\"endTime\":\"2021-02-04T20:26:02Z\",\"allowedActions\":[\"yyufmhruncuw\",\"qspkcdqzhlctd\"],\"friendlyName\":\"nqndyfpchrqbn\",\"state\":\"rcgegydcwboxjum\",\"stateDescription\":\"qoli\",\"taskType\":\"raiouaubrjtl\",\"customDetails\":{\"instanceType\":\"TaskTypeDetails\"},\"groupTaskCustomDetails\":{\"instanceType\":\"GroupTaskDetails\"},\"errors\":[{},{},{}]},{\"taskId\":\"jrngif\",\"name\":\"z\",\"startTime\":\"2021-09-29T00:55:24Z\",\"endTime\":\"2021-10-27T11:43:24Z\",\"allowedActions\":[\"uimzdlyjd\"],\"friendlyName\":\"wmkyoqufdvruzsl\",\"state\":\"j\",\"stateDescription\":\"ctfnmdxotng\",\"taskType\":\"gugey\",\"customDetails\":{\"instanceType\":\"TaskTypeDetails\"},\"groupTaskCustomDetails\":{\"instanceType\":\"GroupTaskDetails\"},\"errors\":[{},{}]}],\"errors\":[{\"serviceErrorDetails\":{},\"providerErrorDetails\":{},\"errorLevel\":\"absnmfpp\",\"creationTime\":\"2021-09-09T02:17:02Z\",\"taskId\":\"evy\"}],\"startTime\":\"2021-01-30T15:37:24Z\",\"endTime\":\"2021-07-27T14:52:36Z\",\"allowedActions\":[\"czbgomfgbeg\",\"qgleohibetnluank\"],\"targetObjectId\":\"fxeeebtijvacvbm\",\"targetObjectName\":\"bqqxlaj\",\"targetInstanceType\":\"wxacevehj\",\"customDetails\":{\"instanceType\":\"JobDetails\",\"affectedObjectDetails\":{\"faey\":\"oafgaoql\",\"hriypoqeyhlqhy\":\"inmfgvxirp\",\"nuciqdsmexiit\":\"prlpy\",\"stgnl\":\"fuxtyasiibmiybnn\"}}},\"location\":\"nmgixh\",\"id\":\"mavmq\",\"name\":\"oudorhcgyyp\",\"type\":\"otwypundmb\"},{\"properties\":{\"activityId\":\"gcmjkavl\",\"scenarioName\":\"rb\",\"friendlyName\":\"tp\",\"state\":\"tzfjltf\",\"stateDescription\":\"zcyjtot\",\"tasks\":[{\"taskId\":\"vpbdbzqgq\",\"name\":\"hedsvqwthmkyib\",\"startTime\":\"2021-03-21T07:03:22Z\",\"endTime\":\"2021-11-13T09:58:30Z\",\"allowedActions\":[\"qcwdhoh\",\"dtmcd\",\"sufco\",\"dxbzlmcmuap\"],\"friendlyName\":\"hdbevwqqxeyskon\",\"state\":\"inkfkbgbz\",\"stateDescription\":\"wxeqocljmygvkzqk\",\"taskType\":\"eokbze\",\"customDetails\":{\"instanceType\":\"TaskTypeDetails\"},\"groupTaskCustomDetails\":{\"instanceType\":\"GroupTaskDetails\"},\"errors\":[{},{}]}],\"errors\":[{\"serviceErrorDetails\":{},\"providerErrorDetails\":{},\"errorLevel\":\"tleipqxbkw\",\"creationTime\":\"2021-04-24T16:12:29Z\",\"taskId\":\"zvd\"},{\"serviceErrorDetails\":{},\"providerErrorDetails\":{},\"errorLevel\":\"ixz\",\"creationTime\":\"2021-05-22T10:48:30Z\",\"taskId\":\"odawopqhewjptmcg\"}],\"startTime\":\"2021-04-24T18:57:19Z\",\"endTime\":\"2021-03-17T12:43:28Z\",\"allowedActions\":[\"lnd\"],\"targetObjectId\":\"tutmzl\",\"targetObjectName\":\"ojlvfhrbbpneqvc\",\"targetInstanceType\":\"yyurmochpprprsnm\",\"customDetails\":{\"instanceType\":\"JobDetails\",\"affectedObjectDetails\":{\"kpbz\":\"zejnhl\",\"a\":\"cpilj\",\"chndbnwie\":\"zv\"}}},\"location\":\"lewjwiuubwef\",\"id\":\"sfapaqtferrq\",\"name\":\"ex\",\"type\":\"kmfx\"}],\"nextLink\":\"jwogqqnobpudc\"}") - .toObject(JobCollection.class); - Assertions.assertEquals("jeuut", model.value().get(0).properties().activityId()); - Assertions.assertEquals("xezw", model.value().get(0).properties().scenarioName()); - Assertions.assertEquals("okvbwnhhtqlgehg", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("ipifhpfeoajvg", model.value().get(0).properties().state()); - Assertions.assertEquals("txjcsheafidlt", model.value().get(0).properties().stateDescription()); - Assertions.assertEquals("esmkssjhoiftxfkf", model.value().get(0).properties().tasks().get(0).taskId()); - Assertions.assertEquals("gpr", model.value().get(0).properties().tasks().get(0).name()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-29T04:06:59Z"), - model.value().get(0).properties().tasks().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-05T10:55:26Z"), - model.value().get(0).properties().tasks().get(0).endTime()); - Assertions.assertEquals("cbiqtgdqoh", model.value().get(0).properties().tasks().get(0).allowedActions().get(0)); - Assertions.assertEquals("wsldrizetpwbr", model.value().get(0).properties().tasks().get(0).friendlyName()); - Assertions.assertEquals("llibphbqzmizak", model.value().get(0).properties().tasks().get(0).state()); - Assertions.assertEquals("ankjpdnjzh", model.value().get(0).properties().tasks().get(0).stateDescription()); - Assertions.assertEquals("oylhjlmuoyxprimr", model.value().get(0).properties().tasks().get(0).taskType()); - Assertions.assertEquals("islstv", model.value().get(0).properties().errors().get(0).errorLevel()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T18:13:46Z"), - model.value().get(0).properties().errors().get(0).creationTime()); - Assertions.assertEquals("wxdzaumweoohgu", model.value().get(0).properties().errors().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-15T06:45:30Z"), - model.value().get(0).properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-14T10:50:47Z"), - model.value().get(0).properties().endTime()); - Assertions.assertEquals("ijaeukm", model.value().get(0).properties().allowedActions().get(0)); - Assertions.assertEquals("ieekpndzaa", model.value().get(0).properties().targetObjectId()); - Assertions.assertEquals("udqmeqwigpibudq", model.value().get(0).properties().targetObjectName()); - Assertions.assertEquals("xebeybpmz", model.value().get(0).properties().targetInstanceType()); - Assertions.assertEquals("ff", - model.value().get(0).properties().customDetails().affectedObjectDetails().get("aqi")); - Assertions.assertEquals("fuqyrxpdlcgqlsi", model.value().get(0).location()); - Assertions.assertEquals("jwogqqnobpudc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobCollection model - = new JobCollection() - .withValue(Arrays.asList(new JobInner() - .withProperties( - new JobProperties().withActivityId("jeuut") - .withScenarioName("xezw") - .withFriendlyName("okvbwnhhtqlgehg") - .withState("ipifhpfeoajvg") - .withStateDescription("txjcsheafidlt") - .withTasks(Arrays.asList(new AsrTask().withTaskId("esmkssjhoiftxfkf") - .withName("gpr") - .withStartTime(OffsetDateTime.parse("2021-06-29T04:06:59Z")) - .withEndTime(OffsetDateTime.parse("2021-04-05T10:55:26Z")) - .withAllowedActions(Arrays.asList("cbiqtgdqoh")) - .withFriendlyName("wsldrizetpwbr") - .withState("llibphbqzmizak") - .withStateDescription("ankjpdnjzh") - .withTaskType("oylhjlmuoyxprimr") - .withCustomDetails(new TaskTypeDetails()) - .withGroupTaskCustomDetails(new GroupTaskDetails()) - .withErrors(Arrays.asList(new JobErrorDetails(), new JobErrorDetails())))) - .withErrors( - Arrays.asList( - new JobErrorDetails().withServiceErrorDetails(new ServiceError()) - .withProviderErrorDetails(new ProviderError()) - .withErrorLevel("islstv") - .withCreationTime(OffsetDateTime.parse("2021-10-17T18:13:46Z")) - .withTaskId("wxdzaumweoohgu"), - new JobErrorDetails().withServiceErrorDetails(new ServiceError()) - .withProviderErrorDetails(new ProviderError()) - .withErrorLevel("boyjathwt") - .withCreationTime(OffsetDateTime.parse("2021-03-19T17:17:36Z")) - .withTaskId("a"), - new JobErrorDetails().withServiceErrorDetails(new ServiceError()) - .withProviderErrorDetails(new ProviderError()) - .withErrorLevel("dxmeb") - .withCreationTime(OffsetDateTime.parse("2021-01-03T03:25:45Z")) - .withTaskId("jpahlxvea"), - new JobErrorDetails().withServiceErrorDetails(new ServiceError()) - .withProviderErrorDetails(new ProviderError()) - .withErrorLevel("nmwmqtibx") - .withCreationTime(OffsetDateTime.parse("2021-03-01T23:53:32Z")) - .withTaskId("dt"))) - .withStartTime(OffsetDateTime.parse("2021-11-15T06:45:30Z")) - .withEndTime(OffsetDateTime.parse("2021-02-14T10:50:47Z")) - .withAllowedActions(Arrays.asList("ijaeukm")) - .withTargetObjectId("ieekpndzaa") - .withTargetObjectName("udqmeqwigpibudq") - .withTargetInstanceType("xebeybpmz") - .withCustomDetails( - new JobDetails().withAffectedObjectDetails(mapOf("aqi", "ff", "ioqaqhvs", "mhh")))) - .withLocation("fuqyrxpdlcgqlsi"), - new JobInner() - .withProperties(new JobProperties().withActivityId("rtrhqvwrevkhgnl") - .withScenarioName("onzlr") - .withFriendlyName("qywncvjtsz") - .withState("fizehtdhgbjk") - .withStateDescription("eljeamurvzmlovua") - .withTasks(Arrays.asList( - new AsrTask().withTaskId("cxlpmjerb") - .withName("elvidizozsdbccx") - .withStartTime(OffsetDateTime.parse("2021-04-03T14:05:40Z")) - .withEndTime(OffsetDateTime.parse("2021-06-04T20:01:35Z")) - .withAllowedActions( - Arrays.asList("nwncypuuw", "ltv", "qjctzenkeif", "zhmkdasvflyh")) - .withFriendlyName("cu") - .withState("hxgsrboldfor") - .withStateDescription("wjlvizbfhfov") - .withTaskType("cqpbtuo") - .withCustomDetails(new TaskTypeDetails()) - .withGroupTaskCustomDetails(new GroupTaskDetails()) - .withErrors(Arrays.asList(new JobErrorDetails())), - new AsrTask().withTaskId("bbelawumuaslzk") - .withName("rwoycqucwyh") - .withStartTime(OffsetDateTime.parse("2021-12-05T11:23:21Z")) - .withEndTime(OffsetDateTime.parse("2021-01-03T22:26:02Z")) - .withAllowedActions(Arrays.asList("kywuhpsvfuu", "utlwexxwla", "niexzsrzpgepq")) - .withFriendlyName("bb") - .withState("pgdakchzyvli") - .withStateDescription("nrkcxkj") - .withTaskType("nxm") - .withCustomDetails(new TaskTypeDetails()) - .withGroupTaskCustomDetails(new GroupTaskDetails()) - .withErrors(Arrays.asList(new JobErrorDetails(), new JobErrorDetails(), - new JobErrorDetails())), - new AsrTask().withTaskId("qrntv") - .withName("ijpstte") - .withStartTime(OffsetDateTime.parse("2021-11-08T06:52:34Z")) - .withEndTime(OffsetDateTime.parse("2021-02-04T20:26:02Z")) - .withAllowedActions(Arrays.asList("yyufmhruncuw", "qspkcdqzhlctd")) - .withFriendlyName("nqndyfpchrqbn") - .withState("rcgegydcwboxjum") - .withStateDescription("qoli") - .withTaskType("raiouaubrjtl") - .withCustomDetails(new TaskTypeDetails()) - .withGroupTaskCustomDetails(new GroupTaskDetails()) - .withErrors(Arrays.asList(new JobErrorDetails(), new JobErrorDetails(), - new JobErrorDetails())), - new AsrTask().withTaskId("jrngif") - .withName("z") - .withStartTime(OffsetDateTime.parse("2021-09-29T00:55:24Z")) - .withEndTime(OffsetDateTime.parse("2021-10-27T11:43:24Z")) - .withAllowedActions(Arrays.asList("uimzdlyjd")) - .withFriendlyName("wmkyoqufdvruzsl") - .withState("j") - .withStateDescription("ctfnmdxotng") - .withTaskType("gugey") - .withCustomDetails(new TaskTypeDetails()) - .withGroupTaskCustomDetails(new GroupTaskDetails()) - .withErrors(Arrays.asList(new JobErrorDetails(), new JobErrorDetails())))) - .withErrors(Arrays.asList(new JobErrorDetails().withServiceErrorDetails(new ServiceError()) - .withProviderErrorDetails(new ProviderError()) - .withErrorLevel("absnmfpp") - .withCreationTime(OffsetDateTime.parse("2021-09-09T02:17:02Z")) - .withTaskId("evy"))) - .withStartTime(OffsetDateTime.parse("2021-01-30T15:37:24Z")) - .withEndTime(OffsetDateTime.parse("2021-07-27T14:52:36Z")) - .withAllowedActions(Arrays.asList("czbgomfgbeg", "qgleohibetnluank")) - .withTargetObjectId("fxeeebtijvacvbm") - .withTargetObjectName("bqqxlaj") - .withTargetInstanceType("wxacevehj") - .withCustomDetails( - new JobDetails().withAffectedObjectDetails(mapOf("faey", "oafgaoql", "hriypoqeyhlqhy", - "inmfgvxirp", "nuciqdsmexiit", "prlpy", "stgnl", "fuxtyasiibmiybnn")))) - .withLocation("nmgixh"), - new JobInner() - .withProperties(new JobProperties().withActivityId("gcmjkavl") - .withScenarioName("rb") - .withFriendlyName("tp") - .withState("tzfjltf") - .withStateDescription("zcyjtot") - .withTasks(Arrays.asList(new AsrTask().withTaskId("vpbdbzqgq") - .withName("hedsvqwthmkyib") - .withStartTime(OffsetDateTime.parse("2021-03-21T07:03:22Z")) - .withEndTime(OffsetDateTime.parse("2021-11-13T09:58:30Z")) - .withAllowedActions(Arrays.asList("qcwdhoh", "dtmcd", "sufco", "dxbzlmcmuap")) - .withFriendlyName("hdbevwqqxeyskon") - .withState("inkfkbgbz") - .withStateDescription("wxeqocljmygvkzqk") - .withTaskType("eokbze") - .withCustomDetails(new TaskTypeDetails()) - .withGroupTaskCustomDetails(new GroupTaskDetails()) - .withErrors(Arrays.asList(new JobErrorDetails(), new JobErrorDetails())))) - .withErrors(Arrays.asList( - new JobErrorDetails().withServiceErrorDetails(new ServiceError()) - .withProviderErrorDetails(new ProviderError()) - .withErrorLevel("tleipqxbkw") - .withCreationTime(OffsetDateTime.parse("2021-04-24T16:12:29Z")) - .withTaskId("zvd"), - new JobErrorDetails().withServiceErrorDetails(new ServiceError()) - .withProviderErrorDetails(new ProviderError()) - .withErrorLevel("ixz") - .withCreationTime(OffsetDateTime.parse("2021-05-22T10:48:30Z")) - .withTaskId("odawopqhewjptmcg"))) - .withStartTime(OffsetDateTime.parse("2021-04-24T18:57:19Z")) - .withEndTime(OffsetDateTime.parse("2021-03-17T12:43:28Z")) - .withAllowedActions(Arrays.asList("lnd")) - .withTargetObjectId("tutmzl") - .withTargetObjectName("ojlvfhrbbpneqvc") - .withTargetInstanceType("yyurmochpprprsnm") - .withCustomDetails(new JobDetails() - .withAffectedObjectDetails(mapOf("kpbz", "zejnhl", "a", "cpilj", "chndbnwie", "zv")))) - .withLocation("lewjwiuubwef"))) - .withNextLink("jwogqqnobpudc"); - model = BinaryData.fromObject(model).toObject(JobCollection.class); - Assertions.assertEquals("jeuut", model.value().get(0).properties().activityId()); - Assertions.assertEquals("xezw", model.value().get(0).properties().scenarioName()); - Assertions.assertEquals("okvbwnhhtqlgehg", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("ipifhpfeoajvg", model.value().get(0).properties().state()); - Assertions.assertEquals("txjcsheafidlt", model.value().get(0).properties().stateDescription()); - Assertions.assertEquals("esmkssjhoiftxfkf", model.value().get(0).properties().tasks().get(0).taskId()); - Assertions.assertEquals("gpr", model.value().get(0).properties().tasks().get(0).name()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-29T04:06:59Z"), - model.value().get(0).properties().tasks().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-05T10:55:26Z"), - model.value().get(0).properties().tasks().get(0).endTime()); - Assertions.assertEquals("cbiqtgdqoh", model.value().get(0).properties().tasks().get(0).allowedActions().get(0)); - Assertions.assertEquals("wsldrizetpwbr", model.value().get(0).properties().tasks().get(0).friendlyName()); - Assertions.assertEquals("llibphbqzmizak", model.value().get(0).properties().tasks().get(0).state()); - Assertions.assertEquals("ankjpdnjzh", model.value().get(0).properties().tasks().get(0).stateDescription()); - Assertions.assertEquals("oylhjlmuoyxprimr", model.value().get(0).properties().tasks().get(0).taskType()); - Assertions.assertEquals("islstv", model.value().get(0).properties().errors().get(0).errorLevel()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T18:13:46Z"), - model.value().get(0).properties().errors().get(0).creationTime()); - Assertions.assertEquals("wxdzaumweoohgu", model.value().get(0).properties().errors().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-15T06:45:30Z"), - model.value().get(0).properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-14T10:50:47Z"), - model.value().get(0).properties().endTime()); - Assertions.assertEquals("ijaeukm", model.value().get(0).properties().allowedActions().get(0)); - Assertions.assertEquals("ieekpndzaa", model.value().get(0).properties().targetObjectId()); - Assertions.assertEquals("udqmeqwigpibudq", model.value().get(0).properties().targetObjectName()); - Assertions.assertEquals("xebeybpmz", model.value().get(0).properties().targetInstanceType()); - Assertions.assertEquals("ff", - model.value().get(0).properties().customDetails().affectedObjectDetails().get("aqi")); - Assertions.assertEquals("fuqyrxpdlcgqlsi", model.value().get(0).location()); - Assertions.assertEquals("jwogqqnobpudc", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobDetailsTests.java deleted file mode 100644 index 81daad9b86ea..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobDetailsTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobDetails; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobDetails model = BinaryData.fromString( - "{\"instanceType\":\"JobDetails\",\"affectedObjectDetails\":{\"jwpfilkm\":\"qlafcbahhpzpofoi\",\"dviauogp\":\"kholvd\",\"kyefchnmnahmnxhk\":\"uartvti\",\"ooxf\":\"jqirwrw\"}}") - .toObject(JobDetails.class); - Assertions.assertEquals("qlafcbahhpzpofoi", model.affectedObjectDetails().get("jwpfilkm")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobDetails model = new JobDetails().withAffectedObjectDetails(mapOf("jwpfilkm", "qlafcbahhpzpofoi", "dviauogp", - "kholvd", "kyefchnmnahmnxhk", "uartvti", "ooxf", "jqirwrw")); - model = BinaryData.fromObject(model).toObject(JobDetails.class); - Assertions.assertEquals("qlafcbahhpzpofoi", model.affectedObjectDetails().get("jwpfilkm")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobEntityTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobEntityTests.java deleted file mode 100644 index 73ad83bc0bd3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobEntityTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobEntity; -import org.junit.jupiter.api.Assertions; - -public final class JobEntityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobEntity model = BinaryData.fromString( - "{\"jobId\":\"xpno\",\"jobFriendlyName\":\"oanfbcswqagyw\",\"targetObjectId\":\"xigvjrktpgaeuk\",\"targetObjectName\":\"wohpmwhqnucs\",\"targetInstanceType\":\"hsidsjtdlpbnin\",\"jobScenarioName\":\"azlsvbzfcpuo\"}") - .toObject(JobEntity.class); - Assertions.assertEquals("xpno", model.jobId()); - Assertions.assertEquals("oanfbcswqagyw", model.jobFriendlyName()); - Assertions.assertEquals("xigvjrktpgaeuk", model.targetObjectId()); - Assertions.assertEquals("wohpmwhqnucs", model.targetObjectName()); - Assertions.assertEquals("hsidsjtdlpbnin", model.targetInstanceType()); - Assertions.assertEquals("azlsvbzfcpuo", model.jobScenarioName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobEntity model = new JobEntity().withJobId("xpno") - .withJobFriendlyName("oanfbcswqagyw") - .withTargetObjectId("xigvjrktpgaeuk") - .withTargetObjectName("wohpmwhqnucs") - .withTargetInstanceType("hsidsjtdlpbnin") - .withJobScenarioName("azlsvbzfcpuo"); - model = BinaryData.fromObject(model).toObject(JobEntity.class); - Assertions.assertEquals("xpno", model.jobId()); - Assertions.assertEquals("oanfbcswqagyw", model.jobFriendlyName()); - Assertions.assertEquals("xigvjrktpgaeuk", model.targetObjectId()); - Assertions.assertEquals("wohpmwhqnucs", model.targetObjectName()); - Assertions.assertEquals("hsidsjtdlpbnin", model.targetInstanceType()); - Assertions.assertEquals("azlsvbzfcpuo", model.jobScenarioName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobQueryParameterTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobQueryParameterTests.java deleted file mode 100644 index 2cfa2e00ced5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobQueryParameterTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExportJobOutputSerializationType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobQueryParameter; -import org.junit.jupiter.api.Assertions; - -public final class JobQueryParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobQueryParameter model = BinaryData.fromString( - "{\"startTime\":\"amhsycxhxzgazt\",\"endTime\":\"boi\",\"fabricId\":\"mfqhppubowse\",\"affectedObjectTypes\":\"fgkmtdhern\",\"jobStatus\":\"tcjuahokqto\",\"jobOutputType\":\"Excel\",\"jobName\":\"xof\",\"timezoneOffset\":37.56433108394144}") - .toObject(JobQueryParameter.class); - Assertions.assertEquals("amhsycxhxzgazt", model.startTime()); - Assertions.assertEquals("boi", model.endTime()); - Assertions.assertEquals("mfqhppubowse", model.fabricId()); - Assertions.assertEquals("fgkmtdhern", model.affectedObjectTypes()); - Assertions.assertEquals("tcjuahokqto", model.jobStatus()); - Assertions.assertEquals(ExportJobOutputSerializationType.EXCEL, model.jobOutputType()); - Assertions.assertEquals("xof", model.jobName()); - Assertions.assertEquals(37.56433108394144D, model.timezoneOffset()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobQueryParameter model = new JobQueryParameter().withStartTime("amhsycxhxzgazt") - .withEndTime("boi") - .withFabricId("mfqhppubowse") - .withAffectedObjectTypes("fgkmtdhern") - .withJobStatus("tcjuahokqto") - .withJobOutputType(ExportJobOutputSerializationType.EXCEL) - .withJobName("xof") - .withTimezoneOffset(37.56433108394144D); - model = BinaryData.fromObject(model).toObject(JobQueryParameter.class); - Assertions.assertEquals("amhsycxhxzgazt", model.startTime()); - Assertions.assertEquals("boi", model.endTime()); - Assertions.assertEquals("mfqhppubowse", model.fabricId()); - Assertions.assertEquals("fgkmtdhern", model.affectedObjectTypes()); - Assertions.assertEquals("tcjuahokqto", model.jobStatus()); - Assertions.assertEquals(ExportJobOutputSerializationType.EXCEL, model.jobOutputType()); - Assertions.assertEquals("xof", model.jobName()); - Assertions.assertEquals(37.56433108394144D, model.timezoneOffset()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobStatusEventDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobStatusEventDetailsTests.java deleted file mode 100644 index 7810bd781511..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobStatusEventDetailsTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobStatusEventDetails; -import org.junit.jupiter.api.Assertions; - -public final class JobStatusEventDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobStatusEventDetails model = BinaryData.fromString( - "{\"instanceType\":\"JobStatus\",\"jobId\":\"wkaupwhlz\",\"jobFriendlyName\":\"kremgjl\",\"jobStatus\":\"vdorsirx\",\"affectedObjectType\":\"yrkqa\"}") - .toObject(JobStatusEventDetails.class); - Assertions.assertEquals("wkaupwhlz", model.jobId()); - Assertions.assertEquals("kremgjl", model.jobFriendlyName()); - Assertions.assertEquals("vdorsirx", model.jobStatus()); - Assertions.assertEquals("yrkqa", model.affectedObjectType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobStatusEventDetails model = new JobStatusEventDetails().withJobId("wkaupwhlz") - .withJobFriendlyName("kremgjl") - .withJobStatus("vdorsirx") - .withAffectedObjectType("yrkqa"); - model = BinaryData.fromObject(model).toObject(JobStatusEventDetails.class); - Assertions.assertEquals("wkaupwhlz", model.jobId()); - Assertions.assertEquals("kremgjl", model.jobFriendlyName()); - Assertions.assertEquals("vdorsirx", model.jobStatus()); - Assertions.assertEquals("yrkqa", model.affectedObjectType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobTaskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobTaskDetailsTests.java deleted file mode 100644 index 165498241ca0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/JobTaskDetailsTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobEntity; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobTaskDetails; -import org.junit.jupiter.api.Assertions; - -public final class JobTaskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobTaskDetails model = BinaryData.fromString( - "{\"instanceType\":\"JobTaskDetails\",\"jobTask\":{\"jobId\":\"wwmjs\",\"jobFriendlyName\":\"na\",\"targetObjectId\":\"amecle\",\"targetObjectName\":\"oulndhzyoeojhto\",\"targetInstanceType\":\"h\",\"jobScenarioName\":\"idmytzln\"}}") - .toObject(JobTaskDetails.class); - Assertions.assertEquals("wwmjs", model.jobTask().jobId()); - Assertions.assertEquals("na", model.jobTask().jobFriendlyName()); - Assertions.assertEquals("amecle", model.jobTask().targetObjectId()); - Assertions.assertEquals("oulndhzyoeojhto", model.jobTask().targetObjectName()); - Assertions.assertEquals("h", model.jobTask().targetInstanceType()); - Assertions.assertEquals("idmytzln", model.jobTask().jobScenarioName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobTaskDetails model = new JobTaskDetails().withJobTask(new JobEntity().withJobId("wwmjs") - .withJobFriendlyName("na") - .withTargetObjectId("amecle") - .withTargetObjectName("oulndhzyoeojhto") - .withTargetInstanceType("h") - .withJobScenarioName("idmytzln")); - model = BinaryData.fromObject(model).toObject(JobTaskDetails.class); - Assertions.assertEquals("wwmjs", model.jobTask().jobId()); - Assertions.assertEquals("na", model.jobTask().jobFriendlyName()); - Assertions.assertEquals("amecle", model.jobTask().targetObjectId()); - Assertions.assertEquals("oulndhzyoeojhto", model.jobTask().targetObjectName()); - Assertions.assertEquals("h", model.jobTask().targetInstanceType()); - Assertions.assertEquals("idmytzln", model.jobTask().jobScenarioName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/LogicalNetworkCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/LogicalNetworkCollectionTests.java deleted file mode 100644 index 768add753d3e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/LogicalNetworkCollectionTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.LogicalNetworkInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LogicalNetworkCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LogicalNetworkProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LogicalNetworkCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogicalNetworkCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"friendlyName\":\"j\",\"networkVirtualizationStatus\":\"dxob\",\"logicalNetworkUsage\":\"dxkqpx\",\"logicalNetworkDefinitionsStatus\":\"ajionpimexgstxg\"},\"location\":\"odgmaajrmvdjwz\",\"id\":\"lovmclwhijcoe\",\"name\":\"ctbzaq\",\"type\":\"qsycbkbfkgu\"}],\"nextLink\":\"kexxppof\"}") - .toObject(LogicalNetworkCollection.class); - Assertions.assertEquals("j", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("dxob", model.value().get(0).properties().networkVirtualizationStatus()); - Assertions.assertEquals("dxkqpx", model.value().get(0).properties().logicalNetworkUsage()); - Assertions.assertEquals("ajionpimexgstxg", model.value().get(0).properties().logicalNetworkDefinitionsStatus()); - Assertions.assertEquals("odgmaajrmvdjwz", model.value().get(0).location()); - Assertions.assertEquals("kexxppof", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogicalNetworkCollection model - = new LogicalNetworkCollection() - .withValue( - Arrays - .asList(new LogicalNetworkInner() - .withProperties(new LogicalNetworkProperties().withFriendlyName("j") - .withNetworkVirtualizationStatus("dxob") - .withLogicalNetworkUsage("dxkqpx") - .withLogicalNetworkDefinitionsStatus("ajionpimexgstxg")) - .withLocation("odgmaajrmvdjwz"))) - .withNextLink("kexxppof"); - model = BinaryData.fromObject(model).toObject(LogicalNetworkCollection.class); - Assertions.assertEquals("j", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("dxob", model.value().get(0).properties().networkVirtualizationStatus()); - Assertions.assertEquals("dxkqpx", model.value().get(0).properties().logicalNetworkUsage()); - Assertions.assertEquals("ajionpimexgstxg", model.value().get(0).properties().logicalNetworkDefinitionsStatus()); - Assertions.assertEquals("odgmaajrmvdjwz", model.value().get(0).location()); - Assertions.assertEquals("kexxppof", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/LogicalNetworkInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/LogicalNetworkInnerTests.java deleted file mode 100644 index 669b2d315de0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/LogicalNetworkInnerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.LogicalNetworkInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LogicalNetworkProperties; -import org.junit.jupiter.api.Assertions; - -public final class LogicalNetworkInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogicalNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"friendlyName\":\"x\",\"networkVirtualizationStatus\":\"jpgd\",\"logicalNetworkUsage\":\"ocjjxhvpmouexh\",\"logicalNetworkDefinitionsStatus\":\"xibqeojnx\"},\"location\":\"zvddntwndeicbtwn\",\"id\":\"zao\",\"name\":\"vuhrhcffcyddgl\",\"type\":\"jthjqkwpyei\"}") - .toObject(LogicalNetworkInner.class); - Assertions.assertEquals("x", model.properties().friendlyName()); - Assertions.assertEquals("jpgd", model.properties().networkVirtualizationStatus()); - Assertions.assertEquals("ocjjxhvpmouexh", model.properties().logicalNetworkUsage()); - Assertions.assertEquals("xibqeojnx", model.properties().logicalNetworkDefinitionsStatus()); - Assertions.assertEquals("zvddntwndeicbtwn", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogicalNetworkInner model - = new LogicalNetworkInner().withProperties(new LogicalNetworkProperties().withFriendlyName("x") - .withNetworkVirtualizationStatus("jpgd") - .withLogicalNetworkUsage("ocjjxhvpmouexh") - .withLogicalNetworkDefinitionsStatus("xibqeojnx")).withLocation("zvddntwndeicbtwn"); - model = BinaryData.fromObject(model).toObject(LogicalNetworkInner.class); - Assertions.assertEquals("x", model.properties().friendlyName()); - Assertions.assertEquals("jpgd", model.properties().networkVirtualizationStatus()); - Assertions.assertEquals("ocjjxhvpmouexh", model.properties().logicalNetworkUsage()); - Assertions.assertEquals("xibqeojnx", model.properties().logicalNetworkDefinitionsStatus()); - Assertions.assertEquals("zvddntwndeicbtwn", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/LogicalNetworkPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/LogicalNetworkPropertiesTests.java deleted file mode 100644 index f92bcf5a7da6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/LogicalNetworkPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LogicalNetworkProperties; -import org.junit.jupiter.api.Assertions; - -public final class LogicalNetworkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogicalNetworkProperties model = BinaryData.fromString( - "{\"friendlyName\":\"mqc\",\"networkVirtualizationStatus\":\"q\",\"logicalNetworkUsage\":\"khixuigdtopbo\",\"logicalNetworkDefinitionsStatus\":\"og\"}") - .toObject(LogicalNetworkProperties.class); - Assertions.assertEquals("mqc", model.friendlyName()); - Assertions.assertEquals("q", model.networkVirtualizationStatus()); - Assertions.assertEquals("khixuigdtopbo", model.logicalNetworkUsage()); - Assertions.assertEquals("og", model.logicalNetworkDefinitionsStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogicalNetworkProperties model = new LogicalNetworkProperties().withFriendlyName("mqc") - .withNetworkVirtualizationStatus("q") - .withLogicalNetworkUsage("khixuigdtopbo") - .withLogicalNetworkDefinitionsStatus("og"); - model = BinaryData.fromObject(model).toObject(LogicalNetworkProperties.class); - Assertions.assertEquals("mqc", model.friendlyName()); - Assertions.assertEquals("q", model.networkVirtualizationStatus()); - Assertions.assertEquals("khixuigdtopbo", model.logicalNetworkUsage()); - Assertions.assertEquals("og", model.logicalNetworkDefinitionsStatus()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ManualActionTaskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ManualActionTaskDetailsTests.java deleted file mode 100644 index d6bf16e9f80a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ManualActionTaskDetailsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ManualActionTaskDetails; -import org.junit.jupiter.api.Assertions; - -public final class ManualActionTaskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManualActionTaskDetails model = BinaryData.fromString( - "{\"instanceType\":\"ManualActionTaskDetails\",\"name\":\"fajfreprfvmki\",\"instructions\":\"teyrqshi\",\"observation\":\"cejo\"}") - .toObject(ManualActionTaskDetails.class); - Assertions.assertEquals("fajfreprfvmki", model.name()); - Assertions.assertEquals("teyrqshi", model.instructions()); - Assertions.assertEquals("cejo", model.observation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManualActionTaskDetails model = new ManualActionTaskDetails().withName("fajfreprfvmki") - .withInstructions("teyrqshi") - .withObservation("cejo"); - model = BinaryData.fromObject(model).toObject(ManualActionTaskDetails.class); - Assertions.assertEquals("fajfreprfvmki", model.name()); - Assertions.assertEquals("teyrqshi", model.instructions()); - Assertions.assertEquals("cejo", model.observation()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrateInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrateInputPropertiesTests.java deleted file mode 100644 index 9b7bcc432cc8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrateInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrateInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrateProviderSpecificInput; - -public final class MigrateInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MigrateInputProperties model - = BinaryData.fromString("{\"providerSpecificDetails\":{\"instanceType\":\"MigrateProviderSpecificInput\"}}") - .toObject(MigrateInputProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MigrateInputProperties model - = new MigrateInputProperties().withProviderSpecificDetails(new MigrateProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(MigrateInputProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrateInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrateInputTests.java deleted file mode 100644 index 39f968f1f392..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrateInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrateInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrateProviderSpecificInput; - -public final class MigrateInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MigrateInput model = BinaryData - .fromString( - "{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"MigrateProviderSpecificInput\"}}}") - .toObject(MigrateInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MigrateInput model = new MigrateInput().withProperties( - new MigrateInputProperties().withProviderSpecificDetails(new MigrateProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(MigrateInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrateProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrateProviderSpecificInputTests.java deleted file mode 100644 index cb0e8dcbd03b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrateProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrateProviderSpecificInput; - -public final class MigrateProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MigrateProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"MigrateProviderSpecificInput\"}") - .toObject(MigrateProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MigrateProviderSpecificInput model = new MigrateProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(MigrateProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationProviderSpecificSettingsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationProviderSpecificSettingsTests.java deleted file mode 100644 index ad46a3fc1650..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationProviderSpecificSettingsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationProviderSpecificSettings; - -public final class MigrationProviderSpecificSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MigrationProviderSpecificSettings model - = BinaryData.fromString("{\"instanceType\":\"MigrationProviderSpecificSettings\"}") - .toObject(MigrationProviderSpecificSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MigrationProviderSpecificSettings model = new MigrationProviderSpecificSettings(); - model = BinaryData.fromObject(model).toObject(MigrationProviderSpecificSettings.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointCollectionTests.java deleted file mode 100644 index 55fcbddef3be..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointCollectionTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationRecoveryPointInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPointCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPointProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MigrationRecoveryPointCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MigrationRecoveryPointCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"recoveryPointTime\":\"2021-08-18T20:27:18Z\",\"recoveryPointType\":\"ApplicationConsistent\"},\"location\":\"htxongmtsavjc\",\"id\":\"pwxqp\",\"name\":\"rknftguvriuhprwm\",\"type\":\"yvxqtayriwwroy\"},{\"properties\":{\"recoveryPointTime\":\"2021-11-30T11:12:46Z\",\"recoveryPointType\":\"NotSpecified\"},\"location\":\"qibycnojvknm\",\"id\":\"fqsgzvahapjy\",\"name\":\"hpvgqz\",\"type\":\"j\"},{\"properties\":{\"recoveryPointTime\":\"2021-04-03T19:52:37Z\",\"recoveryPointType\":\"NotSpecified\"},\"location\":\"mwlxk\",\"id\":\"ug\",\"name\":\"hzovawjvzunlut\",\"type\":\"nnprn\"}],\"nextLink\":\"peilpjzuaejxdu\"}") - .toObject(MigrationRecoveryPointCollection.class); - Assertions.assertEquals("htxongmtsavjc", model.value().get(0).location()); - Assertions.assertEquals("peilpjzuaejxdu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MigrationRecoveryPointCollection model = new MigrationRecoveryPointCollection().withValue(Arrays.asList( - new MigrationRecoveryPointInner().withProperties(new MigrationRecoveryPointProperties()) - .withLocation("htxongmtsavjc"), - new MigrationRecoveryPointInner().withProperties(new MigrationRecoveryPointProperties()) - .withLocation("qibycnojvknm"), - new MigrationRecoveryPointInner().withProperties(new MigrationRecoveryPointProperties()) - .withLocation("mwlxk"))) - .withNextLink("peilpjzuaejxdu"); - model = BinaryData.fromObject(model).toObject(MigrationRecoveryPointCollection.class); - Assertions.assertEquals("htxongmtsavjc", model.value().get(0).location()); - Assertions.assertEquals("peilpjzuaejxdu", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointInnerTests.java deleted file mode 100644 index fd3656b92da2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointInnerTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.MigrationRecoveryPointInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPointProperties; -import org.junit.jupiter.api.Assertions; - -public final class MigrationRecoveryPointInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MigrationRecoveryPointInner model = BinaryData.fromString( - "{\"properties\":{\"recoveryPointTime\":\"2021-03-19T18:16:56Z\",\"recoveryPointType\":\"NotSpecified\"},\"location\":\"tdzumveekgpw\",\"id\":\"zuhkfpbsjyof\",\"name\":\"xl\",\"type\":\"us\"}") - .toObject(MigrationRecoveryPointInner.class); - Assertions.assertEquals("tdzumveekgpw", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MigrationRecoveryPointInner model - = new MigrationRecoveryPointInner().withProperties(new MigrationRecoveryPointProperties()) - .withLocation("tdzumveekgpw"); - model = BinaryData.fromObject(model).toObject(MigrationRecoveryPointInner.class); - Assertions.assertEquals("tdzumveekgpw", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointPropertiesTests.java deleted file mode 100644 index 1f269caac765..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointPropertiesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPointProperties; - -public final class MigrationRecoveryPointPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MigrationRecoveryPointProperties model = BinaryData - .fromString( - "{\"recoveryPointTime\":\"2021-04-08T00:20:33Z\",\"recoveryPointType\":\"ApplicationConsistent\"}") - .toObject(MigrationRecoveryPointProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MigrationRecoveryPointProperties model = new MigrationRecoveryPointProperties(); - model = BinaryData.fromObject(model).toObject(MigrationRecoveryPointProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointsGetWithResponseMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointsGetWithResponseMockTests.java deleted file mode 100644 index e0f62567bbd9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointsGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPoint; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MigrationRecoveryPointsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"recoveryPointTime\":\"2021-05-17T00:20:24Z\",\"recoveryPointType\":\"ApplicationConsistent\"},\"location\":\"hlsfjfouqjpzhea\",\"id\":\"uvkqxqkvadmj\",\"name\":\"ymudj\",\"type\":\"aajzdebhsermcl\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MigrationRecoveryPoint response = manager.migrationRecoveryPoints() - .getWithResponse("bfb", "divixzhpjgqzmiao", "weacfxaubu", "ruetcnx", "iqzzdckhsqdrrjsu", "nowobwx", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hlsfjfouqjpzhea", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointsListByReplicationMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointsListByReplicationMockTests.java deleted file mode 100644 index 287e57a52dde..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MigrationRecoveryPointsListByReplicationMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MigrationRecoveryPoint; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MigrationRecoveryPointsListByReplicationMockTests { - @Test - public void testListByReplicationMigrationItems() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"recoveryPointTime\":\"2021-07-07T21:49:56Z\",\"recoveryPointType\":\"ApplicationConsistent\"},\"location\":\"lgfaphwuu\",\"id\":\"wtsaynrtvj\",\"name\":\"qreeo\",\"type\":\"vqjmrnblihs\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.migrationRecoveryPoints() - .listByReplicationMigrationItems("wynepktvmwgvco", "ysebjij", "hpxnikouox", "alokb", "kkyporsyn", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lgfaphwuu", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MobilityServiceUpdateTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MobilityServiceUpdateTests.java deleted file mode 100644 index 177171d03e00..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/MobilityServiceUpdateTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MobilityServiceUpdate; -import org.junit.jupiter.api.Assertions; - -public final class MobilityServiceUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MobilityServiceUpdate model = BinaryData - .fromString("{\"version\":\"cdsgxceluji\",\"rebootStatus\":\"lluunxh\",\"osType\":\"lfxzfwuge\"}") - .toObject(MobilityServiceUpdate.class); - Assertions.assertEquals("cdsgxceluji", model.version()); - Assertions.assertEquals("lluunxh", model.rebootStatus()); - Assertions.assertEquals("lfxzfwuge", model.osType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MobilityServiceUpdate model = new MobilityServiceUpdate().withVersion("cdsgxceluji") - .withRebootStatus("lluunxh") - .withOsType("lfxzfwuge"); - model = BinaryData.fromObject(model).toObject(MobilityServiceUpdate.class); - Assertions.assertEquals("cdsgxceluji", model.version()); - Assertions.assertEquals("lluunxh", model.rebootStatus()); - Assertions.assertEquals("lfxzfwuge", model.osType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkCollectionTests.java deleted file mode 100644 index aba933136303..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkCollectionTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Subnet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"fabricType\":\"a\",\"subnets\":[{\"name\":\"rzayv\",\"friendlyName\":\"pgvdf\",\"addressList\":[\"tkftutqxlngx\",\"efgugnxk\",\"xdqmidtthzrvqdra\",\"hjybigehoqfbo\"]},{\"name\":\"kanyktzlcuiywg\",\"friendlyName\":\"wgndrvynhzgpp\",\"addressList\":[\"gyncocpecfvmmc\",\"ofsx\",\"zevgb\"]},{\"name\":\"jqabcypmivkwlzuv\",\"friendlyName\":\"fwnfnb\",\"addressList\":[\"ionle\",\"x\"]}],\"friendlyName\":\"qgtz\",\"networkType\":\"pnqbqqwxrjfe\"},\"location\":\"lnwsubisn\",\"id\":\"ampmngnz\",\"name\":\"c\",\"type\":\"aqw\"}],\"nextLink\":\"chcbonqvpkvlrxnj\"}") - .toObject(NetworkCollection.class); - Assertions.assertEquals("a", model.value().get(0).properties().fabricType()); - Assertions.assertEquals("rzayv", model.value().get(0).properties().subnets().get(0).name()); - Assertions.assertEquals("pgvdf", model.value().get(0).properties().subnets().get(0).friendlyName()); - Assertions.assertEquals("tkftutqxlngx", - model.value().get(0).properties().subnets().get(0).addressList().get(0)); - Assertions.assertEquals("qgtz", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("pnqbqqwxrjfe", model.value().get(0).properties().networkType()); - Assertions.assertEquals("lnwsubisn", model.value().get(0).location()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkCollection model - = new NetworkCollection().withValue(Arrays.asList( - new NetworkInner() - .withProperties( - new NetworkProperties().withFabricType("a") - .withSubnets( - Arrays.asList( - new Subnet().withName("rzayv") - .withFriendlyName("pgvdf") - .withAddressList(Arrays.asList("tkftutqxlngx", "efgugnxk", "xdqmidtthzrvqdra", - "hjybigehoqfbo")), - new Subnet().withName("kanyktzlcuiywg") - .withFriendlyName("wgndrvynhzgpp") - .withAddressList(Arrays.asList("gyncocpecfvmmc", "ofsx", "zevgb")), - new Subnet().withName("jqabcypmivkwlzuv") - .withFriendlyName("fwnfnb") - .withAddressList(Arrays.asList("ionle", "x")))) - .withFriendlyName("qgtz") - .withNetworkType("pnqbqqwxrjfe")) - .withLocation("lnwsubisn"))) - .withNextLink("chcbonqvpkvlrxnj"); - model = BinaryData.fromObject(model).toObject(NetworkCollection.class); - Assertions.assertEquals("a", model.value().get(0).properties().fabricType()); - Assertions.assertEquals("rzayv", model.value().get(0).properties().subnets().get(0).name()); - Assertions.assertEquals("pgvdf", model.value().get(0).properties().subnets().get(0).friendlyName()); - Assertions.assertEquals("tkftutqxlngx", - model.value().get(0).properties().subnets().get(0).addressList().get(0)); - Assertions.assertEquals("qgtz", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("pnqbqqwxrjfe", model.value().get(0).properties().networkType()); - Assertions.assertEquals("lnwsubisn", model.value().get(0).location()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkInnerTests.java deleted file mode 100644 index 81ce06a5d29b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkInnerTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Subnet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkInner model = BinaryData.fromString( - "{\"properties\":{\"fabricType\":\"eipheoflokeyy\",\"subnets\":[{\"name\":\"bdlwtgrhpdjpj\",\"friendlyName\":\"asxazjpqyegualhb\",\"addressList\":[\"e\",\"jzzvdud\"]}],\"friendlyName\":\"dslfhotwmcy\",\"networkType\":\"wlbjnpgacftade\"},\"location\":\"nltyfsoppusuesnz\",\"id\":\"dejbavo\",\"name\":\"xzdmohctb\",\"type\":\"vudwx\"}") - .toObject(NetworkInner.class); - Assertions.assertEquals("eipheoflokeyy", model.properties().fabricType()); - Assertions.assertEquals("bdlwtgrhpdjpj", model.properties().subnets().get(0).name()); - Assertions.assertEquals("asxazjpqyegualhb", model.properties().subnets().get(0).friendlyName()); - Assertions.assertEquals("e", model.properties().subnets().get(0).addressList().get(0)); - Assertions.assertEquals("dslfhotwmcy", model.properties().friendlyName()); - Assertions.assertEquals("wlbjnpgacftade", model.properties().networkType()); - Assertions.assertEquals("nltyfsoppusuesnz", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInner model = new NetworkInner().withProperties(new NetworkProperties().withFabricType("eipheoflokeyy") - .withSubnets(Arrays.asList(new Subnet().withName("bdlwtgrhpdjpj") - .withFriendlyName("asxazjpqyegualhb") - .withAddressList(Arrays.asList("e", "jzzvdud")))) - .withFriendlyName("dslfhotwmcy") - .withNetworkType("wlbjnpgacftade")).withLocation("nltyfsoppusuesnz"); - model = BinaryData.fromObject(model).toObject(NetworkInner.class); - Assertions.assertEquals("eipheoflokeyy", model.properties().fabricType()); - Assertions.assertEquals("bdlwtgrhpdjpj", model.properties().subnets().get(0).name()); - Assertions.assertEquals("asxazjpqyegualhb", model.properties().subnets().get(0).friendlyName()); - Assertions.assertEquals("e", model.properties().subnets().get(0).addressList().get(0)); - Assertions.assertEquals("dslfhotwmcy", model.properties().friendlyName()); - Assertions.assertEquals("wlbjnpgacftade", model.properties().networkType()); - Assertions.assertEquals("nltyfsoppusuesnz", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkMappingCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkMappingCollectionTests.java deleted file mode 100644 index a697302f594b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkMappingCollectionTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMappingCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMappingFabricSpecificSettings; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMappingProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkMappingCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkMappingCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"state\":\"yiuokktwh\",\"primaryNetworkFriendlyName\":\"xw\",\"primaryNetworkId\":\"wqsmbsur\",\"primaryFabricFriendlyName\":\"imoryocfsfksym\",\"recoveryNetworkFriendlyName\":\"ys\",\"recoveryNetworkId\":\"i\",\"recoveryFabricArmId\":\"xhqyudxorrqnb\",\"recoveryFabricFriendlyName\":\"czvyifq\",\"fabricSpecificSettings\":{\"instanceType\":\"NetworkMappingFabricSpecificSettings\"}},\"location\":\"dvjsllrmvvdf\",\"id\":\"atkpnp\",\"name\":\"lexxbczwtru\",\"type\":\"iqzbq\"}],\"nextLink\":\"sovmyokacspkwl\"}") - .toObject(NetworkMappingCollection.class); - Assertions.assertEquals("yiuokktwh", model.value().get(0).properties().state()); - Assertions.assertEquals("xw", model.value().get(0).properties().primaryNetworkFriendlyName()); - Assertions.assertEquals("wqsmbsur", model.value().get(0).properties().primaryNetworkId()); - Assertions.assertEquals("imoryocfsfksym", model.value().get(0).properties().primaryFabricFriendlyName()); - Assertions.assertEquals("ys", model.value().get(0).properties().recoveryNetworkFriendlyName()); - Assertions.assertEquals("i", model.value().get(0).properties().recoveryNetworkId()); - Assertions.assertEquals("xhqyudxorrqnb", model.value().get(0).properties().recoveryFabricArmId()); - Assertions.assertEquals("czvyifq", model.value().get(0).properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("dvjsllrmvvdf", model.value().get(0).location()); - Assertions.assertEquals("sovmyokacspkwl", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkMappingCollection model - = new NetworkMappingCollection().withValue(Arrays.asList(new NetworkMappingInner() - .withProperties(new NetworkMappingProperties().withState("yiuokktwh") - .withPrimaryNetworkFriendlyName("xw") - .withPrimaryNetworkId("wqsmbsur") - .withPrimaryFabricFriendlyName("imoryocfsfksym") - .withRecoveryNetworkFriendlyName("ys") - .withRecoveryNetworkId("i") - .withRecoveryFabricArmId("xhqyudxorrqnb") - .withRecoveryFabricFriendlyName("czvyifq") - .withFabricSpecificSettings(new NetworkMappingFabricSpecificSettings())) - .withLocation("dvjsllrmvvdf"))).withNextLink("sovmyokacspkwl"); - model = BinaryData.fromObject(model).toObject(NetworkMappingCollection.class); - Assertions.assertEquals("yiuokktwh", model.value().get(0).properties().state()); - Assertions.assertEquals("xw", model.value().get(0).properties().primaryNetworkFriendlyName()); - Assertions.assertEquals("wqsmbsur", model.value().get(0).properties().primaryNetworkId()); - Assertions.assertEquals("imoryocfsfksym", model.value().get(0).properties().primaryFabricFriendlyName()); - Assertions.assertEquals("ys", model.value().get(0).properties().recoveryNetworkFriendlyName()); - Assertions.assertEquals("i", model.value().get(0).properties().recoveryNetworkId()); - Assertions.assertEquals("xhqyudxorrqnb", model.value().get(0).properties().recoveryFabricArmId()); - Assertions.assertEquals("czvyifq", model.value().get(0).properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("dvjsllrmvvdf", model.value().get(0).location()); - Assertions.assertEquals("sovmyokacspkwl", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkMappingFabricSpecificSettingsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkMappingFabricSpecificSettingsTests.java deleted file mode 100644 index d6f266d9a2ef..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkMappingFabricSpecificSettingsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMappingFabricSpecificSettings; - -public final class NetworkMappingFabricSpecificSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkMappingFabricSpecificSettings model - = BinaryData.fromString("{\"instanceType\":\"NetworkMappingFabricSpecificSettings\"}") - .toObject(NetworkMappingFabricSpecificSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkMappingFabricSpecificSettings model = new NetworkMappingFabricSpecificSettings(); - model = BinaryData.fromObject(model).toObject(NetworkMappingFabricSpecificSettings.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkMappingInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkMappingInnerTests.java deleted file mode 100644 index 81fd60431fbe..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkMappingInnerTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.NetworkMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMappingFabricSpecificSettings; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMappingProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkMappingInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkMappingInner model = BinaryData.fromString( - "{\"properties\":{\"state\":\"obpxjmflbvvn\",\"primaryNetworkFriendlyName\":\"rkcciwwzjuqk\",\"primaryNetworkId\":\"sa\",\"primaryFabricFriendlyName\":\"wkuofoskghsauu\",\"recoveryNetworkFriendlyName\":\"jmvxie\",\"recoveryNetworkId\":\"ugidyjrr\",\"recoveryFabricArmId\":\"y\",\"recoveryFabricFriendlyName\":\"svexcsonpclhoco\",\"fabricSpecificSettings\":{\"instanceType\":\"NetworkMappingFabricSpecificSettings\"}},\"location\":\"kevle\",\"id\":\"gz\",\"name\":\"buhfmvfaxkffeiit\",\"type\":\"lvmezyvshxmzsbbz\"}") - .toObject(NetworkMappingInner.class); - Assertions.assertEquals("obpxjmflbvvn", model.properties().state()); - Assertions.assertEquals("rkcciwwzjuqk", model.properties().primaryNetworkFriendlyName()); - Assertions.assertEquals("sa", model.properties().primaryNetworkId()); - Assertions.assertEquals("wkuofoskghsauu", model.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("jmvxie", model.properties().recoveryNetworkFriendlyName()); - Assertions.assertEquals("ugidyjrr", model.properties().recoveryNetworkId()); - Assertions.assertEquals("y", model.properties().recoveryFabricArmId()); - Assertions.assertEquals("svexcsonpclhoco", model.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("kevle", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkMappingInner model - = new NetworkMappingInner().withProperties(new NetworkMappingProperties().withState("obpxjmflbvvn") - .withPrimaryNetworkFriendlyName("rkcciwwzjuqk") - .withPrimaryNetworkId("sa") - .withPrimaryFabricFriendlyName("wkuofoskghsauu") - .withRecoveryNetworkFriendlyName("jmvxie") - .withRecoveryNetworkId("ugidyjrr") - .withRecoveryFabricArmId("y") - .withRecoveryFabricFriendlyName("svexcsonpclhoco") - .withFabricSpecificSettings(new NetworkMappingFabricSpecificSettings())).withLocation("kevle"); - model = BinaryData.fromObject(model).toObject(NetworkMappingInner.class); - Assertions.assertEquals("obpxjmflbvvn", model.properties().state()); - Assertions.assertEquals("rkcciwwzjuqk", model.properties().primaryNetworkFriendlyName()); - Assertions.assertEquals("sa", model.properties().primaryNetworkId()); - Assertions.assertEquals("wkuofoskghsauu", model.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("jmvxie", model.properties().recoveryNetworkFriendlyName()); - Assertions.assertEquals("ugidyjrr", model.properties().recoveryNetworkId()); - Assertions.assertEquals("y", model.properties().recoveryFabricArmId()); - Assertions.assertEquals("svexcsonpclhoco", model.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("kevle", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkMappingPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkMappingPropertiesTests.java deleted file mode 100644 index c5477a60fb81..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkMappingPropertiesTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMappingFabricSpecificSettings; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMappingProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkMappingPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkMappingProperties model = BinaryData.fromString( - "{\"state\":\"gigr\",\"primaryNetworkFriendlyName\":\"burvjxxjnspy\",\"primaryNetworkId\":\"tko\",\"primaryFabricFriendlyName\":\"kouknvudwtiu\",\"recoveryNetworkFriendlyName\":\"ldngkpoci\",\"recoveryNetworkId\":\"z\",\"recoveryFabricArmId\":\"o\",\"recoveryFabricFriendlyName\":\"ukgjnpiucgygevq\",\"fabricSpecificSettings\":{\"instanceType\":\"NetworkMappingFabricSpecificSettings\"}}") - .toObject(NetworkMappingProperties.class); - Assertions.assertEquals("gigr", model.state()); - Assertions.assertEquals("burvjxxjnspy", model.primaryNetworkFriendlyName()); - Assertions.assertEquals("tko", model.primaryNetworkId()); - Assertions.assertEquals("kouknvudwtiu", model.primaryFabricFriendlyName()); - Assertions.assertEquals("ldngkpoci", model.recoveryNetworkFriendlyName()); - Assertions.assertEquals("z", model.recoveryNetworkId()); - Assertions.assertEquals("o", model.recoveryFabricArmId()); - Assertions.assertEquals("ukgjnpiucgygevq", model.recoveryFabricFriendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkMappingProperties model = new NetworkMappingProperties().withState("gigr") - .withPrimaryNetworkFriendlyName("burvjxxjnspy") - .withPrimaryNetworkId("tko") - .withPrimaryFabricFriendlyName("kouknvudwtiu") - .withRecoveryNetworkFriendlyName("ldngkpoci") - .withRecoveryNetworkId("z") - .withRecoveryFabricArmId("o") - .withRecoveryFabricFriendlyName("ukgjnpiucgygevq") - .withFabricSpecificSettings(new NetworkMappingFabricSpecificSettings()); - model = BinaryData.fromObject(model).toObject(NetworkMappingProperties.class); - Assertions.assertEquals("gigr", model.state()); - Assertions.assertEquals("burvjxxjnspy", model.primaryNetworkFriendlyName()); - Assertions.assertEquals("tko", model.primaryNetworkId()); - Assertions.assertEquals("kouknvudwtiu", model.primaryFabricFriendlyName()); - Assertions.assertEquals("ldngkpoci", model.recoveryNetworkFriendlyName()); - Assertions.assertEquals("z", model.recoveryNetworkId()); - Assertions.assertEquals("o", model.recoveryFabricArmId()); - Assertions.assertEquals("ukgjnpiucgygevq", model.recoveryFabricFriendlyName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkPropertiesTests.java deleted file mode 100644 index 140ee2cb2a46..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NetworkPropertiesTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Subnet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkProperties model = BinaryData.fromString( - "{\"fabricType\":\"dnvowg\",\"subnets\":[{\"name\":\"gwdkcglhsl\",\"friendlyName\":\"jdyggdtji\",\"addressList\":[\"kuofqweykhme\"]},{\"name\":\"vfyexfw\",\"friendlyName\":\"bcibvyvdcsitynn\",\"addressList\":[\"dectehfiqsc\",\"eypvhezrkg\",\"hcjrefovgmk\",\"sle\"]},{\"name\":\"vxyqjpkcattpngjc\",\"friendlyName\":\"czsqpjhvm\",\"addressList\":[\"v\",\"ysou\",\"q\"]}],\"friendlyName\":\"a\",\"networkType\":\"ae\"}") - .toObject(NetworkProperties.class); - Assertions.assertEquals("dnvowg", model.fabricType()); - Assertions.assertEquals("gwdkcglhsl", model.subnets().get(0).name()); - Assertions.assertEquals("jdyggdtji", model.subnets().get(0).friendlyName()); - Assertions.assertEquals("kuofqweykhme", model.subnets().get(0).addressList().get(0)); - Assertions.assertEquals("a", model.friendlyName()); - Assertions.assertEquals("ae", model.networkType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkProperties model = new NetworkProperties().withFabricType("dnvowg") - .withSubnets(Arrays.asList( - new Subnet().withName("gwdkcglhsl") - .withFriendlyName("jdyggdtji") - .withAddressList(Arrays.asList("kuofqweykhme")), - new Subnet().withName("vfyexfw") - .withFriendlyName("bcibvyvdcsitynn") - .withAddressList(Arrays.asList("dectehfiqsc", "eypvhezrkg", "hcjrefovgmk", "sle")), - new Subnet().withName("vxyqjpkcattpngjc") - .withFriendlyName("czsqpjhvm") - .withAddressList(Arrays.asList("v", "ysou", "q")))) - .withFriendlyName("a") - .withNetworkType("ae"); - model = BinaryData.fromObject(model).toObject(NetworkProperties.class); - Assertions.assertEquals("dnvowg", model.fabricType()); - Assertions.assertEquals("gwdkcglhsl", model.subnets().get(0).name()); - Assertions.assertEquals("jdyggdtji", model.subnets().get(0).friendlyName()); - Assertions.assertEquals("kuofqweykhme", model.subnets().get(0).addressList().get(0)); - Assertions.assertEquals("a", model.friendlyName()); - Assertions.assertEquals("ae", model.networkType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NewProtectionProfileTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NewProtectionProfileTests.java deleted file mode 100644 index b4d087672901..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NewProtectionProfileTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NewProtectionProfile; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SetMultiVmSyncStatus; -import org.junit.jupiter.api.Assertions; - -public final class NewProtectionProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NewProtectionProfile model = BinaryData.fromString( - "{\"resourceType\":\"New\",\"policyName\":\"pc\",\"recoveryPointHistory\":1754737974,\"crashConsistentFrequencyInMinutes\":381406744,\"appConsistentFrequencyInMinutes\":198630766,\"multiVmSyncStatus\":\"Enable\"}") - .toObject(NewProtectionProfile.class); - Assertions.assertEquals("pc", model.policyName()); - Assertions.assertEquals(1754737974, model.recoveryPointHistory()); - Assertions.assertEquals(381406744, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(198630766, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(SetMultiVmSyncStatus.ENABLE, model.multiVmSyncStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NewProtectionProfile model = new NewProtectionProfile().withPolicyName("pc") - .withRecoveryPointHistory(1754737974) - .withCrashConsistentFrequencyInMinutes(381406744) - .withAppConsistentFrequencyInMinutes(198630766) - .withMultiVmSyncStatus(SetMultiVmSyncStatus.ENABLE); - model = BinaryData.fromObject(model).toObject(NewProtectionProfile.class); - Assertions.assertEquals("pc", model.policyName()); - Assertions.assertEquals(1754737974, model.recoveryPointHistory()); - Assertions.assertEquals(381406744, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(198630766, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(SetMultiVmSyncStatus.ENABLE, model.multiVmSyncStatus()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NewRecoveryVirtualNetworkTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NewRecoveryVirtualNetworkTests.java deleted file mode 100644 index b41b0316f9d8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/NewRecoveryVirtualNetworkTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NewRecoveryVirtualNetwork; -import org.junit.jupiter.api.Assertions; - -public final class NewRecoveryVirtualNetworkTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NewRecoveryVirtualNetwork model = BinaryData.fromString( - "{\"resourceType\":\"New\",\"recoveryVirtualNetworkResourceGroupName\":\"vfpsj\",\"recoveryVirtualNetworkName\":\"ngsy\"}") - .toObject(NewRecoveryVirtualNetwork.class); - Assertions.assertEquals("vfpsj", model.recoveryVirtualNetworkResourceGroupName()); - Assertions.assertEquals("ngsy", model.recoveryVirtualNetworkName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NewRecoveryVirtualNetwork model - = new NewRecoveryVirtualNetwork().withRecoveryVirtualNetworkResourceGroupName("vfpsj") - .withRecoveryVirtualNetworkName("ngsy"); - model = BinaryData.fromObject(model).toObject(NewRecoveryVirtualNetwork.class); - Assertions.assertEquals("vfpsj", model.recoveryVirtualNetworkResourceGroupName()); - Assertions.assertEquals("ngsy", model.recoveryVirtualNetworkName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OSDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OSDetailsTests.java deleted file mode 100644 index 7d66ad8c8b4b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OSDetailsTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OSDetails; -import org.junit.jupiter.api.Assertions; - -public final class OSDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OSDetails model = BinaryData.fromString( - "{\"osType\":\"dqigmg\",\"productType\":\"inztxl\",\"osEdition\":\"khnjcmrnkfm\",\"oSVersion\":\"cqtwmlmhjnqtq\",\"oSMajorVersion\":\"hj\",\"oSMinorVersion\":\"vragpokddx\"}") - .toObject(OSDetails.class); - Assertions.assertEquals("dqigmg", model.osType()); - Assertions.assertEquals("inztxl", model.productType()); - Assertions.assertEquals("khnjcmrnkfm", model.osEdition()); - Assertions.assertEquals("cqtwmlmhjnqtq", model.oSVersion()); - Assertions.assertEquals("hj", model.oSMajorVersion()); - Assertions.assertEquals("vragpokddx", model.oSMinorVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OSDetails model = new OSDetails().withOsType("dqigmg") - .withProductType("inztxl") - .withOsEdition("khnjcmrnkfm") - .withOSVersion("cqtwmlmhjnqtq") - .withOSMajorVersion("hj") - .withOSMinorVersion("vragpokddx"); - model = BinaryData.fromObject(model).toObject(OSDetails.class); - Assertions.assertEquals("dqigmg", model.osType()); - Assertions.assertEquals("inztxl", model.productType()); - Assertions.assertEquals("khnjcmrnkfm", model.osEdition()); - Assertions.assertEquals("cqtwmlmhjnqtq", model.oSVersion()); - Assertions.assertEquals("hj", model.oSMajorVersion()); - Assertions.assertEquals("vragpokddx", model.oSMinorVersion()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OSDiskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OSDiskDetailsTests.java deleted file mode 100644 index b965f22a8ebf..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OSDiskDetailsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OSDiskDetails; -import org.junit.jupiter.api.Assertions; - -public final class OSDiskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OSDiskDetails model = BinaryData - .fromString("{\"osVhdId\":\"hrjqfyaytvslyek\",\"osType\":\"niuarlcjiwgsxfai\",\"vhdName\":\"wd\"}") - .toObject(OSDiskDetails.class); - Assertions.assertEquals("hrjqfyaytvslyek", model.osVhdId()); - Assertions.assertEquals("niuarlcjiwgsxfai", model.osType()); - Assertions.assertEquals("wd", model.vhdName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OSDiskDetails model - = new OSDiskDetails().withOsVhdId("hrjqfyaytvslyek").withOsType("niuarlcjiwgsxfai").withVhdName("wd"); - model = BinaryData.fromObject(model).toObject(OSDiskDetails.class); - Assertions.assertEquals("hrjqfyaytvslyek", model.osVhdId()); - Assertions.assertEquals("niuarlcjiwgsxfai", model.osType()); - Assertions.assertEquals("wd", model.vhdName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OSUpgradeSupportedVersionsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OSUpgradeSupportedVersionsTests.java deleted file mode 100644 index 87a00eeb975a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OSUpgradeSupportedVersionsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OSUpgradeSupportedVersions; - -public final class OSUpgradeSupportedVersionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OSUpgradeSupportedVersions model = BinaryData.fromString( - "{\"supportedSourceOsVersion\":\"hhkvguavtptbk\",\"supportedTargetOsVersions\":[\"qynspgbvoffb\",\"kwvdxa\",\"xqokmyrlji\"]}") - .toObject(OSUpgradeSupportedVersions.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OSUpgradeSupportedVersions model = new OSUpgradeSupportedVersions(); - model = BinaryData.fromObject(model).toObject(OSUpgradeSupportedVersions.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OSVersionWrapperTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OSVersionWrapperTests.java deleted file mode 100644 index 9bc9b6b12285..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OSVersionWrapperTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OSVersionWrapper; -import org.junit.jupiter.api.Assertions; - -public final class OSVersionWrapperTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OSVersionWrapper model = BinaryData.fromString("{\"version\":\"wjh\",\"servicePack\":\"biwetpo\"}") - .toObject(OSVersionWrapper.class); - Assertions.assertEquals("wjh", model.version()); - Assertions.assertEquals("biwetpo", model.servicePack()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OSVersionWrapper model = new OSVersionWrapper().withVersion("wjh").withServicePack("biwetpo"); - model = BinaryData.fromObject(model).toObject(OSVersionWrapper.class); - Assertions.assertEquals("wjh", model.version()); - Assertions.assertEquals("biwetpo", model.servicePack()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OperationsDiscoveryCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OperationsDiscoveryCollectionTests.java deleted file mode 100644 index c56f9d48ae3d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OperationsDiscoveryCollectionTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.OperationsDiscoveryInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Display; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OperationsDiscoveryCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationsDiscoveryCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationsDiscoveryCollection model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"ownoizhw\",\"properties\":\"dataxybqsoqij\"},{\"name\":\"dmbpazlobcufpdz\",\"display\":{\"provider\":\"t\",\"resource\":\"qjnqglhqgnufoooj\",\"operation\":\"ifsqesaagdfmg\",\"description\":\"lhjxr\"},\"origin\":\"kwm\",\"properties\":\"dataktsizntocipaou\"},{\"name\":\"psqucmpoyf\",\"display\":{\"provider\":\"ogknygjofjdd\",\"resource\":\"s\",\"operation\":\"eupewnwreitjz\",\"description\":\"lusarh\"},\"origin\":\"fcqhsmyurkd\",\"properties\":\"datalx\"}],\"nextLink\":\"kuksjtxukcdm\"}") - .toObject(OperationsDiscoveryCollection.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals("ownoizhw", model.value().get(0).origin()); - Assertions.assertEquals("kuksjtxukcdm", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationsDiscoveryCollection model = new OperationsDiscoveryCollection().withValue(Arrays.asList( - new OperationsDiscoveryInner().withName("quvgjxpybczme") - .withDisplay(new Display().withProvider("zopbsphrupidgs") - .withResource("bejhphoycmsxa") - .withOperation("hdxbmtqio") - .withDescription("zehtbmu")) - .withOrigin("ownoizhw") - .withProperties("dataxybqsoqij"), - new OperationsDiscoveryInner().withName("dmbpazlobcufpdz") - .withDisplay(new Display().withProvider("t") - .withResource("qjnqglhqgnufoooj") - .withOperation("ifsqesaagdfmg") - .withDescription("lhjxr")) - .withOrigin("kwm") - .withProperties("dataktsizntocipaou"), - new OperationsDiscoveryInner().withName("psqucmpoyf") - .withDisplay(new Display().withProvider("ogknygjofjdd") - .withResource("s") - .withOperation("eupewnwreitjz") - .withDescription("lusarh")) - .withOrigin("fcqhsmyurkd") - .withProperties("datalx"))) - .withNextLink("kuksjtxukcdm"); - model = BinaryData.fromObject(model).toObject(OperationsDiscoveryCollection.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals("ownoizhw", model.value().get(0).origin()); - Assertions.assertEquals("kuksjtxukcdm", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OperationsDiscoveryInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OperationsDiscoveryInnerTests.java deleted file mode 100644 index c01af70144f7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OperationsDiscoveryInnerTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.OperationsDiscoveryInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Display; -import org.junit.jupiter.api.Assertions; - -public final class OperationsDiscoveryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationsDiscoveryInner model = BinaryData.fromString( - "{\"name\":\"rcryuanzwuxzdxta\",\"display\":{\"provider\":\"hmwhfpmrqo\",\"resource\":\"tu\",\"operation\":\"nryrtihf\",\"description\":\"ijbpzvgnwzsymgl\"},\"origin\":\"fcyzkohdbihanufh\",\"properties\":\"databj\"}") - .toObject(OperationsDiscoveryInner.class); - Assertions.assertEquals("rcryuanzwuxzdxta", model.name()); - Assertions.assertEquals("hmwhfpmrqo", model.display().provider()); - Assertions.assertEquals("tu", model.display().resource()); - Assertions.assertEquals("nryrtihf", model.display().operation()); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.display().description()); - Assertions.assertEquals("fcyzkohdbihanufh", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationsDiscoveryInner model = new OperationsDiscoveryInner().withName("rcryuanzwuxzdxta") - .withDisplay(new Display().withProvider("hmwhfpmrqo") - .withResource("tu") - .withOperation("nryrtihf") - .withDescription("ijbpzvgnwzsymgl")) - .withOrigin("fcyzkohdbihanufh") - .withProperties("databj"); - model = BinaryData.fromObject(model).toObject(OperationsDiscoveryInner.class); - Assertions.assertEquals("rcryuanzwuxzdxta", model.name()); - Assertions.assertEquals("hmwhfpmrqo", model.display().provider()); - Assertions.assertEquals("tu", model.display().resource()); - Assertions.assertEquals("nryrtihf", model.display().operation()); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.display().description()); - Assertions.assertEquals("fcyzkohdbihanufh", model.origin()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OperationsListByResourceGroupMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OperationsListByResourceGroupMockTests.java deleted file mode 100644 index 644d8723ed6c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/OperationsListByResourceGroupMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OperationsDiscovery; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"oojjfuktub\",\"display\":{\"provider\":\"nhgbtzvxxvsbc\",\"resource\":\"fkrfnkcni\",\"operation\":\"swxmfurqm\",\"description\":\"wwp\"},\"origin\":\"um\",\"properties\":\"dataahbqsvnkxm\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.operations().listByResourceGroup("flbrouszxacdwuko", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("oojjfuktub", response.iterator().next().name()); - Assertions.assertEquals("nhgbtzvxxvsbc", response.iterator().next().display().provider()); - Assertions.assertEquals("fkrfnkcni", response.iterator().next().display().resource()); - Assertions.assertEquals("swxmfurqm", response.iterator().next().display().operation()); - Assertions.assertEquals("wwp", response.iterator().next().display().description()); - Assertions.assertEquals("um", response.iterator().next().origin()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PauseReplicationInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PauseReplicationInputPropertiesTests.java deleted file mode 100644 index fb347ca50a38..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PauseReplicationInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PauseReplicationInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class PauseReplicationInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PauseReplicationInputProperties model - = BinaryData.fromString("{\"instanceType\":\"qvkelnsm\"}").toObject(PauseReplicationInputProperties.class); - Assertions.assertEquals("qvkelnsm", model.instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PauseReplicationInputProperties model = new PauseReplicationInputProperties().withInstanceType("qvkelnsm"); - model = BinaryData.fromObject(model).toObject(PauseReplicationInputProperties.class); - Assertions.assertEquals("qvkelnsm", model.instanceType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PauseReplicationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PauseReplicationInputTests.java deleted file mode 100644 index 0d4ab5c2a4fc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PauseReplicationInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PauseReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PauseReplicationInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class PauseReplicationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PauseReplicationInput model = BinaryData.fromString("{\"properties\":{\"instanceType\":\"waboe\"}}") - .toObject(PauseReplicationInput.class); - Assertions.assertEquals("waboe", model.properties().instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PauseReplicationInput model = new PauseReplicationInput() - .withProperties(new PauseReplicationInputProperties().withInstanceType("waboe")); - model = BinaryData.fromObject(model).toObject(PauseReplicationInput.class); - Assertions.assertEquals("waboe", model.properties().instanceType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PlannedFailoverInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PlannedFailoverInputPropertiesTests.java deleted file mode 100644 index 11a385b20c31..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PlannedFailoverInputPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PlannedFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PlannedFailoverProviderSpecificFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class PlannedFailoverInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PlannedFailoverInputProperties model = BinaryData.fromString( - "{\"failoverDirection\":\"qyzhf\",\"providerSpecificDetails\":{\"instanceType\":\"PlannedFailoverProviderSpecificFailoverInput\"}}") - .toObject(PlannedFailoverInputProperties.class); - Assertions.assertEquals("qyzhf", model.failoverDirection()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlannedFailoverInputProperties model = new PlannedFailoverInputProperties().withFailoverDirection("qyzhf") - .withProviderSpecificDetails(new PlannedFailoverProviderSpecificFailoverInput()); - model = BinaryData.fromObject(model).toObject(PlannedFailoverInputProperties.class); - Assertions.assertEquals("qyzhf", model.failoverDirection()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PlannedFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PlannedFailoverInputTests.java deleted file mode 100644 index 78f6deab9726..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PlannedFailoverInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PlannedFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PlannedFailoverProviderSpecificFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class PlannedFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PlannedFailoverInput model = BinaryData.fromString( - "{\"properties\":{\"failoverDirection\":\"tizzronasxif\",\"providerSpecificDetails\":{\"instanceType\":\"PlannedFailoverProviderSpecificFailoverInput\"}}}") - .toObject(PlannedFailoverInput.class); - Assertions.assertEquals("tizzronasxif", model.properties().failoverDirection()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlannedFailoverInput model = new PlannedFailoverInput() - .withProperties(new PlannedFailoverInputProperties().withFailoverDirection("tizzronasxif") - .withProviderSpecificDetails(new PlannedFailoverProviderSpecificFailoverInput())); - model = BinaryData.fromObject(model).toObject(PlannedFailoverInput.class); - Assertions.assertEquals("tizzronasxif", model.properties().failoverDirection()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PlannedFailoverProviderSpecificFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PlannedFailoverProviderSpecificFailoverInputTests.java deleted file mode 100644 index ce88dc844299..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PlannedFailoverProviderSpecificFailoverInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PlannedFailoverProviderSpecificFailoverInput; - -public final class PlannedFailoverProviderSpecificFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PlannedFailoverProviderSpecificFailoverInput model - = BinaryData.fromString("{\"instanceType\":\"PlannedFailoverProviderSpecificFailoverInput\"}") - .toObject(PlannedFailoverProviderSpecificFailoverInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlannedFailoverProviderSpecificFailoverInput model = new PlannedFailoverProviderSpecificFailoverInput(); - model = BinaryData.fromObject(model).toObject(PlannedFailoverProviderSpecificFailoverInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyCollectionTests.java deleted file mode 100644 index 9085b6e3fe03..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyCollectionTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.PolicyInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProviderSpecificDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PolicyCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PolicyCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"friendlyName\":\"ulaiywzejywhs\",\"providerSpecificDetails\":{\"instanceType\":\"PolicyProviderSpecificDetails\"}},\"location\":\"ojpllndnpdwrpqaf\",\"id\":\"fugsnnfhyetefy\",\"name\":\"oc\",\"type\":\"ctfjgtixr\"},{\"properties\":{\"friendlyName\":\"uyturml\",\"providerSpecificDetails\":{\"instanceType\":\"PolicyProviderSpecificDetails\"}},\"location\":\"wolba\",\"id\":\"iropionszon\",\"name\":\"pngajin\",\"type\":\"ixjawrtm\"},{\"properties\":{\"friendlyName\":\"myccx\",\"providerSpecificDetails\":{\"instanceType\":\"PolicyProviderSpecificDetails\"}},\"location\":\"coxovn\",\"id\":\"khenlus\",\"name\":\"nrd\",\"type\":\"jxtxrdc\"},{\"properties\":{\"friendlyName\":\"vidttgepuslvyjt\",\"providerSpecificDetails\":{\"instanceType\":\"PolicyProviderSpecificDetails\"}},\"location\":\"wkasiziesf\",\"id\":\"ughtuqfecjxeygtu\",\"name\":\"xu\",\"type\":\"cbuewmrswnjlxuz\"}],\"nextLink\":\"wpusxjbaqehg\"}") - .toObject(PolicyCollection.class); - Assertions.assertEquals("ulaiywzejywhs", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("ojpllndnpdwrpqaf", model.value().get(0).location()); - Assertions.assertEquals("wpusxjbaqehg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PolicyCollection model - = new PolicyCollection() - .withValue( - Arrays.asList( - new PolicyInner() - .withProperties(new PolicyProperties().withFriendlyName("ulaiywzejywhs") - .withProviderSpecificDetails(new PolicyProviderSpecificDetails())) - .withLocation("ojpllndnpdwrpqaf"), - new PolicyInner() - .withProperties(new PolicyProperties().withFriendlyName("uyturml") - .withProviderSpecificDetails(new PolicyProviderSpecificDetails())) - .withLocation("wolba"), - new PolicyInner() - .withProperties(new PolicyProperties().withFriendlyName("myccx") - .withProviderSpecificDetails(new PolicyProviderSpecificDetails())) - .withLocation("coxovn"), - new PolicyInner() - .withProperties(new PolicyProperties().withFriendlyName("vidttgepuslvyjt") - .withProviderSpecificDetails(new PolicyProviderSpecificDetails())) - .withLocation("wkasiziesf"))) - .withNextLink("wpusxjbaqehg"); - model = BinaryData.fromObject(model).toObject(PolicyCollection.class); - Assertions.assertEquals("ulaiywzejywhs", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("ojpllndnpdwrpqaf", model.value().get(0).location()); - Assertions.assertEquals("wpusxjbaqehg", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyInnerTests.java deleted file mode 100644 index 633feac031d4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyInnerTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.PolicyInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProviderSpecificDetails; -import org.junit.jupiter.api.Assertions; - -public final class PolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PolicyInner model = BinaryData.fromString( - "{\"properties\":{\"friendlyName\":\"hzjqatucoige\",\"providerSpecificDetails\":{\"instanceType\":\"PolicyProviderSpecificDetails\"}},\"location\":\"cnwfepbnwgfmxjg\",\"id\":\"g\",\"name\":\"jbgdlfgtdysnaquf\",\"type\":\"qbctqha\"}") - .toObject(PolicyInner.class); - Assertions.assertEquals("hzjqatucoige", model.properties().friendlyName()); - Assertions.assertEquals("cnwfepbnwgfmxjg", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PolicyInner model = new PolicyInner().withProperties(new PolicyProperties().withFriendlyName("hzjqatucoige") - .withProviderSpecificDetails(new PolicyProviderSpecificDetails())).withLocation("cnwfepbnwgfmxjg"); - model = BinaryData.fromObject(model).toObject(PolicyInner.class); - Assertions.assertEquals("hzjqatucoige", model.properties().friendlyName()); - Assertions.assertEquals("cnwfepbnwgfmxjg", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyPropertiesTests.java deleted file mode 100644 index e0a11958ba67..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProviderSpecificDetails; -import org.junit.jupiter.api.Assertions; - -public final class PolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PolicyProperties model = BinaryData.fromString( - "{\"friendlyName\":\"jrwdkqz\",\"providerSpecificDetails\":{\"instanceType\":\"PolicyProviderSpecificDetails\"}}") - .toObject(PolicyProperties.class); - Assertions.assertEquals("jrwdkqz", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PolicyProperties model = new PolicyProperties().withFriendlyName("jrwdkqz") - .withProviderSpecificDetails(new PolicyProviderSpecificDetails()); - model = BinaryData.fromObject(model).toObject(PolicyProperties.class); - Assertions.assertEquals("jrwdkqz", model.friendlyName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyProviderSpecificDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyProviderSpecificDetailsTests.java deleted file mode 100644 index 6bcc772021c4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyProviderSpecificDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProviderSpecificDetails; - -public final class PolicyProviderSpecificDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PolicyProviderSpecificDetails model - = BinaryData.fromString("{\"instanceType\":\"PolicyProviderSpecificDetails\"}") - .toObject(PolicyProviderSpecificDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PolicyProviderSpecificDetails model = new PolicyProviderSpecificDetails(); - model = BinaryData.fromObject(model).toObject(PolicyProviderSpecificDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyProviderSpecificInputTests.java deleted file mode 100644 index 051c9a19f9e8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/PolicyProviderSpecificInputTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProviderSpecificInput; - -public final class PolicyProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PolicyProviderSpecificInput model = BinaryData.fromString("{\"instanceType\":\"PolicyProviderSpecificInput\"}") - .toObject(PolicyProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PolicyProviderSpecificInput model = new PolicyProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(PolicyProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectableItemCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectableItemCollectionTests.java deleted file mode 100644 index 40ad99aa85ce..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectableItemCollectionTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectableItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigurationSettings; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectableItemCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectableItemProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ProtectableItemCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProtectableItemCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"friendlyName\":\"qcslyjpkiid\",\"protectionStatus\":\"exznelixhnr\",\"replicationProtectedItemId\":\"folhbnxknal\",\"recoveryServicesProviderId\":\"lp\",\"protectionReadinessErrors\":[\"dtpnapnyiropuhp\",\"gvpgy\",\"gqgitxmedjvcsl\"],\"supportedReplicationProviders\":[\"wwncwzzhxgk\",\"rmgucnap\"],\"customDetails\":{\"instanceType\":\"ConfigurationSettings\"}},\"location\":\"oellwp\",\"id\":\"fdygpfqbuaceopz\",\"name\":\"qrhhu\",\"type\":\"opppcqeq\"},{\"properties\":{\"friendlyName\":\"z\",\"protectionStatus\":\"hzxct\",\"replicationProtectedItemId\":\"gbkdmoizpos\",\"recoveryServicesProviderId\":\"grcfb\",\"protectionReadinessErrors\":[\"mfqjhhkxbp\",\"jy\",\"jhxxjyn\",\"u\"],\"supportedReplicationProviders\":[\"krtswbxqz\"],\"customDetails\":{\"instanceType\":\"ConfigurationSettings\"}},\"location\":\"jfauvjfdxxi\",\"id\":\"e\",\"name\":\"vtcqaqtdo\",\"type\":\"mcbxvwvxysl\"},{\"properties\":{\"friendlyName\":\"sfxobl\",\"protectionStatus\":\"k\",\"replicationProtectedItemId\":\"mpew\",\"recoveryServicesProviderId\":\"fbkrvrnsvs\",\"protectionReadinessErrors\":[\"ohxcrsbfova\",\"rruvwbhsq\"],\"supportedReplicationProviders\":[\"bcgjbirxbp\",\"bsrfbj\",\"dtws\"],\"customDetails\":{\"instanceType\":\"ConfigurationSettings\"}},\"location\":\"ftpvjzbexil\",\"id\":\"znfqqnvwpmqtar\",\"name\":\"oujmkcjhwqytj\",\"type\":\"ybn\"},{\"properties\":{\"friendlyName\":\"wgdrjervnaenqp\",\"protectionStatus\":\"indoygmifthnzd\",\"replicationProtectedItemId\":\"sl\",\"recoveryServicesProviderId\":\"ayqigynduhav\",\"protectionReadinessErrors\":[\"kthumaqolbgycdui\",\"r\"],\"supportedReplicationProviders\":[\"cym\",\"aolps\",\"lqlfm\",\"dnbbglzps\"],\"customDetails\":{\"instanceType\":\"ConfigurationSettings\"}},\"location\":\"d\",\"id\":\"cwyhzdxssa\",\"name\":\"bzmnvdfznud\",\"type\":\"od\"}],\"nextLink\":\"zbn\"}") - .toObject(ProtectableItemCollection.class); - Assertions.assertEquals("qcslyjpkiid", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("exznelixhnr", model.value().get(0).properties().protectionStatus()); - Assertions.assertEquals("folhbnxknal", model.value().get(0).properties().replicationProtectedItemId()); - Assertions.assertEquals("lp", model.value().get(0).properties().recoveryServicesProviderId()); - Assertions.assertEquals("dtpnapnyiropuhp", - model.value().get(0).properties().protectionReadinessErrors().get(0)); - Assertions.assertEquals("wwncwzzhxgk", - model.value().get(0).properties().supportedReplicationProviders().get(0)); - Assertions.assertEquals("oellwp", model.value().get(0).location()); - Assertions.assertEquals("zbn", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectableItemCollection model - = new ProtectableItemCollection() - .withValue( - Arrays - .asList( - new ProtectableItemInner().withProperties(new ProtectableItemProperties() - .withFriendlyName("qcslyjpkiid") - .withProtectionStatus("exznelixhnr") - .withReplicationProtectedItemId("folhbnxknal") - .withRecoveryServicesProviderId("lp") - .withProtectionReadinessErrors( - Arrays.asList("dtpnapnyiropuhp", "gvpgy", "gqgitxmedjvcsl")) - .withSupportedReplicationProviders(Arrays.asList("wwncwzzhxgk", "rmgucnap")) - .withCustomDetails(new ConfigurationSettings())).withLocation("oellwp"), - new ProtectableItemInner().withProperties(new ProtectableItemProperties() - .withFriendlyName("z") - .withProtectionStatus("hzxct") - .withReplicationProtectedItemId("gbkdmoizpos") - .withRecoveryServicesProviderId("grcfb") - .withProtectionReadinessErrors(Arrays.asList("mfqjhhkxbp", "jy", "jhxxjyn", "u")) - .withSupportedReplicationProviders(Arrays.asList("krtswbxqz")) - .withCustomDetails(new ConfigurationSettings())).withLocation("jfauvjfdxxi"), - new ProtectableItemInner() - .withProperties(new ProtectableItemProperties().withFriendlyName("sfxobl") - .withProtectionStatus("k") - .withReplicationProtectedItemId("mpew") - .withRecoveryServicesProviderId("fbkrvrnsvs") - .withProtectionReadinessErrors(Arrays.asList("ohxcrsbfova", "rruvwbhsq")) - .withSupportedReplicationProviders(Arrays.asList("bcgjbirxbp", "bsrfbj", "dtws")) - .withCustomDetails(new ConfigurationSettings())) - .withLocation("ftpvjzbexil"), - new ProtectableItemInner() - .withProperties(new ProtectableItemProperties().withFriendlyName("wgdrjervnaenqp") - .withProtectionStatus("indoygmifthnzd") - .withReplicationProtectedItemId("sl") - .withRecoveryServicesProviderId("ayqigynduhav") - .withProtectionReadinessErrors(Arrays.asList("kthumaqolbgycdui", "r")) - .withSupportedReplicationProviders( - Arrays.asList("cym", "aolps", "lqlfm", "dnbbglzps")) - .withCustomDetails(new ConfigurationSettings())) - .withLocation("d"))) - .withNextLink("zbn"); - model = BinaryData.fromObject(model).toObject(ProtectableItemCollection.class); - Assertions.assertEquals("qcslyjpkiid", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("exznelixhnr", model.value().get(0).properties().protectionStatus()); - Assertions.assertEquals("folhbnxknal", model.value().get(0).properties().replicationProtectedItemId()); - Assertions.assertEquals("lp", model.value().get(0).properties().recoveryServicesProviderId()); - Assertions.assertEquals("dtpnapnyiropuhp", - model.value().get(0).properties().protectionReadinessErrors().get(0)); - Assertions.assertEquals("wwncwzzhxgk", - model.value().get(0).properties().supportedReplicationProviders().get(0)); - Assertions.assertEquals("oellwp", model.value().get(0).location()); - Assertions.assertEquals("zbn", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectableItemInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectableItemInnerTests.java deleted file mode 100644 index 91c26660a7e1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectableItemInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectableItemInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigurationSettings; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectableItemProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ProtectableItemInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProtectableItemInner model = BinaryData.fromString( - "{\"properties\":{\"friendlyName\":\"ylpstdbhhxsrzdz\",\"protectionStatus\":\"erscdntne\",\"replicationProtectedItemId\":\"iwjmygtdssls\",\"recoveryServicesProviderId\":\"mweriofzpy\",\"protectionReadinessErrors\":[\"mwabnetshhszhedp\",\"vwiwubmwmbesld\"],\"supportedReplicationProviders\":[\"wtppjflcxogaoko\",\"z\"],\"customDetails\":{\"instanceType\":\"ConfigurationSettings\"}},\"location\":\"ikvmkqzeqqk\",\"id\":\"l\",\"name\":\"fzxmhhvhgureodkw\",\"type\":\"bdagxt\"}") - .toObject(ProtectableItemInner.class); - Assertions.assertEquals("ylpstdbhhxsrzdz", model.properties().friendlyName()); - Assertions.assertEquals("erscdntne", model.properties().protectionStatus()); - Assertions.assertEquals("iwjmygtdssls", model.properties().replicationProtectedItemId()); - Assertions.assertEquals("mweriofzpy", model.properties().recoveryServicesProviderId()); - Assertions.assertEquals("mwabnetshhszhedp", model.properties().protectionReadinessErrors().get(0)); - Assertions.assertEquals("wtppjflcxogaoko", model.properties().supportedReplicationProviders().get(0)); - Assertions.assertEquals("ikvmkqzeqqk", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectableItemInner model = new ProtectableItemInner() - .withProperties(new ProtectableItemProperties().withFriendlyName("ylpstdbhhxsrzdz") - .withProtectionStatus("erscdntne") - .withReplicationProtectedItemId("iwjmygtdssls") - .withRecoveryServicesProviderId("mweriofzpy") - .withProtectionReadinessErrors(Arrays.asList("mwabnetshhszhedp", "vwiwubmwmbesld")) - .withSupportedReplicationProviders(Arrays.asList("wtppjflcxogaoko", "z")) - .withCustomDetails(new ConfigurationSettings())) - .withLocation("ikvmkqzeqqk"); - model = BinaryData.fromObject(model).toObject(ProtectableItemInner.class); - Assertions.assertEquals("ylpstdbhhxsrzdz", model.properties().friendlyName()); - Assertions.assertEquals("erscdntne", model.properties().protectionStatus()); - Assertions.assertEquals("iwjmygtdssls", model.properties().replicationProtectedItemId()); - Assertions.assertEquals("mweriofzpy", model.properties().recoveryServicesProviderId()); - Assertions.assertEquals("mwabnetshhszhedp", model.properties().protectionReadinessErrors().get(0)); - Assertions.assertEquals("wtppjflcxogaoko", model.properties().supportedReplicationProviders().get(0)); - Assertions.assertEquals("ikvmkqzeqqk", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectableItemPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectableItemPropertiesTests.java deleted file mode 100644 index 9e2187409ee3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectableItemPropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigurationSettings; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectableItemProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ProtectableItemPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProtectableItemProperties model = BinaryData.fromString( - "{\"friendlyName\":\"qdxbxwa\",\"protectionStatus\":\"ogqxndlkzgxhuri\",\"replicationProtectedItemId\":\"bpodxunkbebxm\",\"recoveryServicesProviderId\":\"yyntwl\",\"protectionReadinessErrors\":[\"tkoievseotgq\",\"l\"],\"supportedReplicationProviders\":[\"u\",\"lauwzizxbmpgcjef\",\"zmuvpbttdumorppx\",\"bmnzbtbhjpgl\"],\"customDetails\":{\"instanceType\":\"ConfigurationSettings\"}}") - .toObject(ProtectableItemProperties.class); - Assertions.assertEquals("qdxbxwa", model.friendlyName()); - Assertions.assertEquals("ogqxndlkzgxhuri", model.protectionStatus()); - Assertions.assertEquals("bpodxunkbebxm", model.replicationProtectedItemId()); - Assertions.assertEquals("yyntwl", model.recoveryServicesProviderId()); - Assertions.assertEquals("tkoievseotgq", model.protectionReadinessErrors().get(0)); - Assertions.assertEquals("u", model.supportedReplicationProviders().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectableItemProperties model = new ProtectableItemProperties().withFriendlyName("qdxbxwa") - .withProtectionStatus("ogqxndlkzgxhuri") - .withReplicationProtectedItemId("bpodxunkbebxm") - .withRecoveryServicesProviderId("yyntwl") - .withProtectionReadinessErrors(Arrays.asList("tkoievseotgq", "l")) - .withSupportedReplicationProviders( - Arrays.asList("u", "lauwzizxbmpgcjef", "zmuvpbttdumorppx", "bmnzbtbhjpgl")) - .withCustomDetails(new ConfigurationSettings()); - model = BinaryData.fromObject(model).toObject(ProtectableItemProperties.class); - Assertions.assertEquals("qdxbxwa", model.friendlyName()); - Assertions.assertEquals("ogqxndlkzgxhuri", model.protectionStatus()); - Assertions.assertEquals("bpodxunkbebxm", model.replicationProtectedItemId()); - Assertions.assertEquals("yyntwl", model.recoveryServicesProviderId()); - Assertions.assertEquals("tkoievseotgq", model.protectionReadinessErrors().get(0)); - Assertions.assertEquals("u", model.supportedReplicationProviders().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerCollectionTests.java deleted file mode 100644 index 730739fa521e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerCollectionTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerFabricSpecificDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ProtectionContainerCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProtectionContainerCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"fabricFriendlyName\":\"lpbuxwgipwhonowk\",\"friendlyName\":\"hwankixzbinjepu\",\"fabricType\":\"mryw\",\"protectedItemCount\":2134987728,\"pairingStatus\":\"qftiy\",\"role\":\"rnkcqvyxlw\",\"fabricSpecificDetails\":{\"instanceType\":\"sicohoqqnwvlry\"}},\"location\":\"w\",\"id\":\"heun\",\"name\":\"mqhgyxzkonocuk\",\"type\":\"klyaxuconu\"},{\"properties\":{\"fabricFriendlyName\":\"fkbey\",\"friendlyName\":\"wrmjmwvvjektc\",\"fabricType\":\"enhwlrs\",\"protectedItemCount\":1160903159,\"pairingStatus\":\"pwvlqdq\",\"role\":\"iqylihkaetck\",\"fabricSpecificDetails\":{\"instanceType\":\"civfsnkymuctq\"}},\"location\":\"fbebrjcxer\",\"id\":\"uwutttxfvjrbi\",\"name\":\"phxepcyvahf\",\"type\":\"ljkyqxjvuuj\"},{\"properties\":{\"fabricFriendlyName\":\"dokgjl\",\"friendlyName\":\"oxgvclt\",\"fabricType\":\"sncghkjeszz\",\"protectedItemCount\":1537141479,\"pairingStatus\":\"htxfvgxbfsmxnehm\",\"role\":\"ec\",\"fabricSpecificDetails\":{\"instanceType\":\"debfqkkrbmpukgri\"}},\"location\":\"lzlfbxzpuz\",\"id\":\"cispnqzahmgkbr\",\"name\":\"yydhibnuqqk\",\"type\":\"ik\"},{\"properties\":{\"fabricFriendlyName\":\"gvtqagnbuynh\",\"friendlyName\":\"gg\",\"fabricType\":\"bfs\",\"protectedItemCount\":600405260,\"pairingStatus\":\"utrc\",\"role\":\"na\",\"fabricSpecificDetails\":{\"instanceType\":\"hj\"}},\"location\":\"nmpxttdb\",\"id\":\"rbnlankxmyskp\",\"name\":\"henbtkcxywnytn\",\"type\":\"synlqidybyxczfc\"}],\"nextLink\":\"aaxdbabphlwrq\"}") - .toObject(ProtectionContainerCollection.class); - Assertions.assertEquals("lpbuxwgipwhonowk", model.value().get(0).properties().fabricFriendlyName()); - Assertions.assertEquals("hwankixzbinjepu", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("mryw", model.value().get(0).properties().fabricType()); - Assertions.assertEquals(2134987728, model.value().get(0).properties().protectedItemCount()); - Assertions.assertEquals("qftiy", model.value().get(0).properties().pairingStatus()); - Assertions.assertEquals("rnkcqvyxlw", model.value().get(0).properties().role()); - Assertions.assertEquals("w", model.value().get(0).location()); - Assertions.assertEquals("aaxdbabphlwrq", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectionContainerCollection model - = new ProtectionContainerCollection() - .withValue(Arrays.asList( - new ProtectionContainerInner() - .withProperties(new ProtectionContainerProperties().withFabricFriendlyName("lpbuxwgipwhonowk") - .withFriendlyName("hwankixzbinjepu") - .withFabricType("mryw") - .withProtectedItemCount(2134987728) - .withPairingStatus("qftiy") - .withRole("rnkcqvyxlw") - .withFabricSpecificDetails(new ProtectionContainerFabricSpecificDetails())) - .withLocation("w"), - new ProtectionContainerInner() - .withProperties(new ProtectionContainerProperties().withFabricFriendlyName("fkbey") - .withFriendlyName("wrmjmwvvjektc") - .withFabricType("enhwlrs") - .withProtectedItemCount(1160903159) - .withPairingStatus("pwvlqdq") - .withRole("iqylihkaetck") - .withFabricSpecificDetails(new ProtectionContainerFabricSpecificDetails())) - .withLocation("fbebrjcxer"), - new ProtectionContainerInner() - .withProperties(new ProtectionContainerProperties().withFabricFriendlyName("dokgjl") - .withFriendlyName("oxgvclt") - .withFabricType("sncghkjeszz") - .withProtectedItemCount(1537141479) - .withPairingStatus("htxfvgxbfsmxnehm") - .withRole("ec") - .withFabricSpecificDetails(new ProtectionContainerFabricSpecificDetails())) - .withLocation("lzlfbxzpuz"), - new ProtectionContainerInner() - .withProperties(new ProtectionContainerProperties().withFabricFriendlyName("gvtqagnbuynh") - .withFriendlyName("gg") - .withFabricType("bfs") - .withProtectedItemCount(600405260) - .withPairingStatus("utrc") - .withRole("na") - .withFabricSpecificDetails(new ProtectionContainerFabricSpecificDetails())) - .withLocation("nmpxttdb"))) - .withNextLink("aaxdbabphlwrq"); - model = BinaryData.fromObject(model).toObject(ProtectionContainerCollection.class); - Assertions.assertEquals("lpbuxwgipwhonowk", model.value().get(0).properties().fabricFriendlyName()); - Assertions.assertEquals("hwankixzbinjepu", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("mryw", model.value().get(0).properties().fabricType()); - Assertions.assertEquals(2134987728, model.value().get(0).properties().protectedItemCount()); - Assertions.assertEquals("qftiy", model.value().get(0).properties().pairingStatus()); - Assertions.assertEquals("rnkcqvyxlw", model.value().get(0).properties().role()); - Assertions.assertEquals("w", model.value().get(0).location()); - Assertions.assertEquals("aaxdbabphlwrq", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerFabricSpecificDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerFabricSpecificDetailsTests.java deleted file mode 100644 index 02b47b6de145..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerFabricSpecificDetailsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerFabricSpecificDetails; - -public final class ProtectionContainerFabricSpecificDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProtectionContainerFabricSpecificDetails model = BinaryData.fromString("{\"instanceType\":\"vmkfssxqu\"}") - .toObject(ProtectionContainerFabricSpecificDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectionContainerFabricSpecificDetails model = new ProtectionContainerFabricSpecificDetails(); - model = BinaryData.fromObject(model).toObject(ProtectionContainerFabricSpecificDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerInnerTests.java deleted file mode 100644 index 39b6c850e24e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerFabricSpecificDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerProperties; -import org.junit.jupiter.api.Assertions; - -public final class ProtectionContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProtectionContainerInner model = BinaryData.fromString( - "{\"properties\":{\"fabricFriendlyName\":\"tsthsucocm\",\"friendlyName\":\"yazttbtwwrqpue\",\"fabricType\":\"kzywbiex\",\"protectedItemCount\":1206070255,\"pairingStatus\":\"ue\",\"role\":\"ibx\",\"fabricSpecificDetails\":{\"instanceType\":\"bhqwalmuzyoxa\"}},\"location\":\"dkzjancuxrh\",\"id\":\"wbavxbniwdj\",\"name\":\"wz\",\"type\":\"s\"}") - .toObject(ProtectionContainerInner.class); - Assertions.assertEquals("tsthsucocm", model.properties().fabricFriendlyName()); - Assertions.assertEquals("yazttbtwwrqpue", model.properties().friendlyName()); - Assertions.assertEquals("kzywbiex", model.properties().fabricType()); - Assertions.assertEquals(1206070255, model.properties().protectedItemCount()); - Assertions.assertEquals("ue", model.properties().pairingStatus()); - Assertions.assertEquals("ibx", model.properties().role()); - Assertions.assertEquals("dkzjancuxrh", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectionContainerInner model - = new ProtectionContainerInner() - .withProperties(new ProtectionContainerProperties().withFabricFriendlyName("tsthsucocm") - .withFriendlyName("yazttbtwwrqpue") - .withFabricType("kzywbiex") - .withProtectedItemCount(1206070255) - .withPairingStatus("ue") - .withRole("ibx") - .withFabricSpecificDetails(new ProtectionContainerFabricSpecificDetails())) - .withLocation("dkzjancuxrh"); - model = BinaryData.fromObject(model).toObject(ProtectionContainerInner.class); - Assertions.assertEquals("tsthsucocm", model.properties().fabricFriendlyName()); - Assertions.assertEquals("yazttbtwwrqpue", model.properties().friendlyName()); - Assertions.assertEquals("kzywbiex", model.properties().fabricType()); - Assertions.assertEquals(1206070255, model.properties().protectedItemCount()); - Assertions.assertEquals("ue", model.properties().pairingStatus()); - Assertions.assertEquals("ibx", model.properties().role()); - Assertions.assertEquals("dkzjancuxrh", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerMappingProviderSpecificDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerMappingProviderSpecificDetailsTests.java deleted file mode 100644 index 182e475e00df..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerMappingProviderSpecificDetailsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerMappingProviderSpecificDetails; - -public final class ProtectionContainerMappingProviderSpecificDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProtectionContainerMappingProviderSpecificDetails model - = BinaryData.fromString("{\"instanceType\":\"ProtectionContainerMappingProviderSpecificDetails\"}") - .toObject(ProtectionContainerMappingProviderSpecificDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectionContainerMappingProviderSpecificDetails model - = new ProtectionContainerMappingProviderSpecificDetails(); - model = BinaryData.fromObject(model).toObject(ProtectionContainerMappingProviderSpecificDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerPropertiesTests.java deleted file mode 100644 index e169c59690c4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionContainerPropertiesTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerFabricSpecificDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerProperties; -import org.junit.jupiter.api.Assertions; - -public final class ProtectionContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProtectionContainerProperties model = BinaryData.fromString( - "{\"fabricFriendlyName\":\"pgn\",\"friendlyName\":\"txhp\",\"fabricType\":\"bzpfzab\",\"protectedItemCount\":687811406,\"pairingStatus\":\"hxw\",\"role\":\"tyq\",\"fabricSpecificDetails\":{\"instanceType\":\"bbovplwzbhvgyugu\"}}") - .toObject(ProtectionContainerProperties.class); - Assertions.assertEquals("pgn", model.fabricFriendlyName()); - Assertions.assertEquals("txhp", model.friendlyName()); - Assertions.assertEquals("bzpfzab", model.fabricType()); - Assertions.assertEquals(687811406, model.protectedItemCount()); - Assertions.assertEquals("hxw", model.pairingStatus()); - Assertions.assertEquals("tyq", model.role()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectionContainerProperties model = new ProtectionContainerProperties().withFabricFriendlyName("pgn") - .withFriendlyName("txhp") - .withFabricType("bzpfzab") - .withProtectedItemCount(687811406) - .withPairingStatus("hxw") - .withRole("tyq") - .withFabricSpecificDetails(new ProtectionContainerFabricSpecificDetails()); - model = BinaryData.fromObject(model).toObject(ProtectionContainerProperties.class); - Assertions.assertEquals("pgn", model.fabricFriendlyName()); - Assertions.assertEquals("txhp", model.friendlyName()); - Assertions.assertEquals("bzpfzab", model.fabricType()); - Assertions.assertEquals(687811406, model.protectedItemCount()); - Assertions.assertEquals("hxw", model.pairingStatus()); - Assertions.assertEquals("tyq", model.role()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionProfileCustomDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionProfileCustomDetailsTests.java deleted file mode 100644 index 5ad224bc70db..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProtectionProfileCustomDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionProfileCustomDetails; - -public final class ProtectionProfileCustomDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProtectionProfileCustomDetails model - = BinaryData.fromString("{\"resourceType\":\"ProtectionProfileCustomDetails\"}") - .toObject(ProtectionProfileCustomDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectionProfileCustomDetails model = new ProtectionProfileCustomDetails(); - model = BinaryData.fromObject(model).toObject(ProtectionProfileCustomDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProviderSpecificRecoveryPointDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProviderSpecificRecoveryPointDetailsTests.java deleted file mode 100644 index d135e8ac335a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ProviderSpecificRecoveryPointDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProviderSpecificRecoveryPointDetails; - -public final class ProviderSpecificRecoveryPointDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProviderSpecificRecoveryPointDetails model - = BinaryData.fromString("{\"instanceType\":\"ProviderSpecificRecoveryPointDetails\"}") - .toObject(ProviderSpecificRecoveryPointDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProviderSpecificRecoveryPointDetails model = new ProviderSpecificRecoveryPointDetails(); - model = BinaryData.fromObject(model).toObject(ProviderSpecificRecoveryPointDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryAvailabilitySetCustomDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryAvailabilitySetCustomDetailsTests.java deleted file mode 100644 index 8e2ef44dbe4f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryAvailabilitySetCustomDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryAvailabilitySetCustomDetails; - -public final class RecoveryAvailabilitySetCustomDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryAvailabilitySetCustomDetails model - = BinaryData.fromString("{\"resourceType\":\"RecoveryAvailabilitySetCustomDetails\"}") - .toObject(RecoveryAvailabilitySetCustomDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryAvailabilitySetCustomDetails model = new RecoveryAvailabilitySetCustomDetails(); - model = BinaryData.fromObject(model).toObject(RecoveryAvailabilitySetCustomDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanA2ADetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanA2ADetailsTests.java deleted file mode 100644 index aac3f86be508..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanA2ADetailsTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExtendedLocation; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExtendedLocationType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanA2ADetails; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanA2ADetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanA2ADetails model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"primaryZone\":\"tnsugisno\",\"recoveryZone\":\"nwnghojov\",\"primaryExtendedLocation\":{\"name\":\"y\",\"type\":\"EdgeZone\"},\"recoveryExtendedLocation\":{\"name\":\"cjixxf\",\"type\":\"EdgeZone\"}}") - .toObject(RecoveryPlanA2ADetails.class); - Assertions.assertEquals("tnsugisno", model.primaryZone()); - Assertions.assertEquals("nwnghojov", model.recoveryZone()); - Assertions.assertEquals("y", model.primaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.primaryExtendedLocation().type()); - Assertions.assertEquals("cjixxf", model.recoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.recoveryExtendedLocation().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanA2ADetails model = new RecoveryPlanA2ADetails().withPrimaryZone("tnsugisno") - .withRecoveryZone("nwnghojov") - .withPrimaryExtendedLocation(new ExtendedLocation().withName("y").withType(ExtendedLocationType.EDGE_ZONE)) - .withRecoveryExtendedLocation( - new ExtendedLocation().withName("cjixxf").withType(ExtendedLocationType.EDGE_ZONE)); - model = BinaryData.fromObject(model).toObject(RecoveryPlanA2ADetails.class); - Assertions.assertEquals("tnsugisno", model.primaryZone()); - Assertions.assertEquals("nwnghojov", model.recoveryZone()); - Assertions.assertEquals("y", model.primaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.primaryExtendedLocation().type()); - Assertions.assertEquals("cjixxf", model.recoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.recoveryExtendedLocation().type()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanA2AFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanA2AFailoverInputTests.java deleted file mode 100644 index 2b4902b3fb4a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanA2AFailoverInputTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.A2ARpRecoveryPointType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.MultiVmSyncPointOption; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanA2AFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanA2AFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanA2AFailoverInput model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"recoveryPointType\":\"LatestApplicationConsistent\",\"cloudServiceCreationOption\":\"rtnuguefxxijteb\",\"multiVmSyncPointOption\":\"UsePerVmRecoveryPoint\"}") - .toObject(RecoveryPlanA2AFailoverInput.class); - Assertions.assertEquals(A2ARpRecoveryPointType.LATEST_APPLICATION_CONSISTENT, model.recoveryPointType()); - Assertions.assertEquals("rtnuguefxxijteb", model.cloudServiceCreationOption()); - Assertions.assertEquals(MultiVmSyncPointOption.USE_PER_VM_RECOVERY_POINT, model.multiVmSyncPointOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanA2AFailoverInput model = new RecoveryPlanA2AFailoverInput() - .withRecoveryPointType(A2ARpRecoveryPointType.LATEST_APPLICATION_CONSISTENT) - .withCloudServiceCreationOption("rtnuguefxxijteb") - .withMultiVmSyncPointOption(MultiVmSyncPointOption.USE_PER_VM_RECOVERY_POINT); - model = BinaryData.fromObject(model).toObject(RecoveryPlanA2AFailoverInput.class); - Assertions.assertEquals(A2ARpRecoveryPointType.LATEST_APPLICATION_CONSISTENT, model.recoveryPointType()); - Assertions.assertEquals("rtnuguefxxijteb", model.cloudServiceCreationOption()); - Assertions.assertEquals(MultiVmSyncPointOption.USE_PER_VM_RECOVERY_POINT, model.multiVmSyncPointOption()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanA2AInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanA2AInputTests.java deleted file mode 100644 index 9fe4566d3243..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanA2AInputTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExtendedLocation; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ExtendedLocationType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanA2AInput; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanA2AInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanA2AInput model = BinaryData.fromString( - "{\"instanceType\":\"A2A\",\"primaryZone\":\"wetkrhlolmc\",\"recoveryZone\":\"epfgsvbbvaqdl\",\"primaryExtendedLocation\":{\"name\":\"petlrn\",\"type\":\"EdgeZone\"},\"recoveryExtendedLocation\":{\"name\":\"tawevxehu\",\"type\":\"EdgeZone\"}}") - .toObject(RecoveryPlanA2AInput.class); - Assertions.assertEquals("wetkrhlolmc", model.primaryZone()); - Assertions.assertEquals("epfgsvbbvaqdl", model.recoveryZone()); - Assertions.assertEquals("petlrn", model.primaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.primaryExtendedLocation().type()); - Assertions.assertEquals("tawevxehu", model.recoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.recoveryExtendedLocation().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanA2AInput model = new RecoveryPlanA2AInput().withPrimaryZone("wetkrhlolmc") - .withRecoveryZone("epfgsvbbvaqdl") - .withPrimaryExtendedLocation( - new ExtendedLocation().withName("petlrn").withType(ExtendedLocationType.EDGE_ZONE)) - .withRecoveryExtendedLocation( - new ExtendedLocation().withName("tawevxehu").withType(ExtendedLocationType.EDGE_ZONE)); - model = BinaryData.fromObject(model).toObject(RecoveryPlanA2AInput.class); - Assertions.assertEquals("wetkrhlolmc", model.primaryZone()); - Assertions.assertEquals("epfgsvbbvaqdl", model.recoveryZone()); - Assertions.assertEquals("petlrn", model.primaryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.primaryExtendedLocation().type()); - Assertions.assertEquals("tawevxehu", model.recoveryExtendedLocation().name()); - Assertions.assertEquals(ExtendedLocationType.EDGE_ZONE, model.recoveryExtendedLocation().type()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanActionDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanActionDetailsTests.java deleted file mode 100644 index d9d8b038eee1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanActionDetailsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionDetails; - -public final class RecoveryPlanActionDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanActionDetails model = BinaryData.fromString("{\"instanceType\":\"RecoveryPlanActionDetails\"}") - .toObject(RecoveryPlanActionDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanActionDetails model = new RecoveryPlanActionDetails(); - model = BinaryData.fromObject(model).toObject(RecoveryPlanActionDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanActionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanActionTests.java deleted file mode 100644 index b24c53c0f475..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanActionTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanAction; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItemOperation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanAction model = BinaryData.fromString( - "{\"actionName\":\"tod\",\"failoverTypes\":[\"RepairReplication\",\"UnplannedFailover\",\"TestFailoverCleanup\",\"PlannedFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}") - .toObject(RecoveryPlanAction.class); - Assertions.assertEquals("tod", model.actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.REPAIR_REPLICATION, model.failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, model.failoverDirections().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanAction model = new RecoveryPlanAction().withActionName("tod") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.REPAIR_REPLICATION, - ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.PLANNED_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()); - model = BinaryData.fromObject(model).toObject(RecoveryPlanAction.class); - Assertions.assertEquals("tod", model.actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.REPAIR_REPLICATION, model.failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, model.failoverDirections().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanAutomationRunbookActionDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanAutomationRunbookActionDetailsTests.java deleted file mode 100644 index bc7c06b23dad..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanAutomationRunbookActionDetailsTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionLocation; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanAutomationRunbookActionDetails; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanAutomationRunbookActionDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanAutomationRunbookActionDetails model = BinaryData.fromString( - "{\"instanceType\":\"AutomationRunbookActionDetails\",\"runbookId\":\"xljzvdovbrbl\",\"timeout\":\"lprdaqccddcbnygd\",\"fabricLocation\":\"Primary\"}") - .toObject(RecoveryPlanAutomationRunbookActionDetails.class); - Assertions.assertEquals("xljzvdovbrbl", model.runbookId()); - Assertions.assertEquals("lprdaqccddcbnygd", model.timeout()); - Assertions.assertEquals(RecoveryPlanActionLocation.PRIMARY, model.fabricLocation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanAutomationRunbookActionDetails model - = new RecoveryPlanAutomationRunbookActionDetails().withRunbookId("xljzvdovbrbl") - .withTimeout("lprdaqccddcbnygd") - .withFabricLocation(RecoveryPlanActionLocation.PRIMARY); - model = BinaryData.fromObject(model).toObject(RecoveryPlanAutomationRunbookActionDetails.class); - Assertions.assertEquals("xljzvdovbrbl", model.runbookId()); - Assertions.assertEquals("lprdaqccddcbnygd", model.timeout()); - Assertions.assertEquals(RecoveryPlanActionLocation.PRIMARY, model.fabricLocation()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanCollectionTests.java deleted file mode 100644 index 433aec21d3c9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanCollectionTests.java +++ /dev/null @@ -1,529 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPlanInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CurrentScenarioDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanAction; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroup; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificDetails; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"friendlyName\":\"khgb\",\"primaryFabricId\":\"ta\",\"primaryFabricFriendlyName\":\"rfdl\",\"recoveryFabricId\":\"kh\",\"recoveryFabricFriendlyName\":\"rne\",\"failoverDeploymentModel\":\"jcpeogkhnmg\",\"replicationProviders\":[\"uxddbhfh\",\"fpazjzoywjxhpd\",\"lontacnpq\",\"tehtuevrhrljyoog\"],\"allowedOperations\":[\"nsduugwbsre\",\"rfqkfuar\",\"nlvhhtklnvnafvv\",\"yfedevjbo\"],\"lastPlannedFailoverTime\":\"2021-06-07T05:21:39Z\",\"lastUnplannedFailoverTime\":\"2021-09-09T03:44:16Z\",\"lastTestFailoverTime\":\"2021-02-13T17:58:26Z\",\"currentScenario\":{\"scenarioName\":\"khminqcymc\",\"jobId\":\"gn\",\"startTime\":\"2021-04-29T07:37:31Z\"},\"currentScenarioStatus\":\"ewuninvud\",\"currentScenarioStatusDescription\":\"h\",\"groups\":[{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{},{},{}],\"startGroupActions\":[{\"actionName\":\"rqctmxxdtdd\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"flhuytxzv\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"zna\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"xbannovvoxc\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"prwnwvroevytlyo\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"rrrouuxvnsa\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Shutdown\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"o\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"izrxklob\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"xnazpmkml\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"vevfxz\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"hbzxli\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"hrdd\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"tfgxqbawpcb\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"nzqcy\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"qofyuicdhzbdy\",\"id\":\"wwgbdv\",\"name\":\"bid\",\"type\":\"hmwffplfmuv\"},{\"properties\":{\"friendlyName\":\"kccrrvwey\",\"primaryFabricId\":\"oy\",\"primaryFabricFriendlyName\":\"k\",\"recoveryFabricId\":\"aimmoiroqb\",\"recoveryFabricFriendlyName\":\"hbragapyyr\",\"failoverDeploymentModel\":\"svbpavbopfppdbwn\",\"replicationProviders\":[\"ahxku\",\"asjcaacfdmmcpu\",\"mehqepvufh\",\"zeh\"],\"allowedOperations\":[\"oqhnlb\",\"nbldxeaclgschori\"],\"lastPlannedFailoverTime\":\"2021-03-13T23:48:24Z\",\"lastUnplannedFailoverTime\":\"2021-07-09T02:56:18Z\",\"lastTestFailoverTime\":\"2021-11-28T04:18:19Z\",\"currentScenario\":{\"scenarioName\":\"cso\",\"jobId\":\"dpuviyf\",\"startTime\":\"2021-07-10T14:09:36Z\"},\"currentScenarioStatus\":\"eolhbhlvbmx\",\"currentScenarioStatusDescription\":\"ibsxtkcud\",\"groups\":[{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{},{},{}],\"startGroupActions\":[{\"actionName\":\"iowl\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jxnqp\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"wgfstmhqykizm\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"aoaf\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"luqvoxmycjimryv\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"gc\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"mzgwe\",\"id\":\"ydsx\",\"name\":\"efoh\",\"type\":\"cbvopwndyqleallk\"},{\"properties\":{\"friendlyName\":\"khlowkxxpv\",\"primaryFabricId\":\"dfjmzsyzfhotlh\",\"primaryFabricFriendlyName\":\"cyychunsjlp\",\"recoveryFabricId\":\"twszhvvuic\",\"recoveryFabricFriendlyName\":\"vtrrmhwrbfdpyflu\",\"failoverDeploymentModel\":\"vjglrocuyzlwhhme\",\"replicationProviders\":[\"oclu\",\"n\"],\"allowedOperations\":[\"emc\",\"jk\",\"mykyujxsglhs\"],\"lastPlannedFailoverTime\":\"2021-06-30T11:59:37Z\",\"lastUnplannedFailoverTime\":\"2021-09-26T10:44:20Z\",\"lastTestFailoverTime\":\"2021-04-08T08:51:31Z\",\"currentScenario\":{\"scenarioName\":\"bkzudnigrfihot\",\"jobId\":\"wlpxuzzjg\",\"startTime\":\"2021-05-28T23:16:03Z\"},\"currentScenarioStatus\":\"qyhqo\",\"currentScenarioStatusDescription\":\"ihiqakydiw\",\"groups\":[{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{},{},{}],\"startGroupActions\":[{\"actionName\":\"qtvhcspodaqax\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ipietgbe\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"ulbmoichdlp\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"fpubntnbatz\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"iqsowsaaelc\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{},{},{}],\"startGroupActions\":[{\"actionName\":\"hplrvkmjcwmjvlg\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ggcvk\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"y\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"izrzb\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"fxsfuztlvtmv\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"gbwidqlvh\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"fizr\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jfnmjmvlwyz\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"iblkujr\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"lfojuidjp\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"jucejikzoeovvtz\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"je\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jklntikyj\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{},{},{},{}],\"startGroupActions\":[{\"actionName\":\"zolxrzvhqjwtr\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"tgvgzp\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"rrkolawjmjs\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"okcdxfzzzwyjaf\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"tlhguynuchl\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"mltx\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"whmozusgzvlnsnnj\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"folpymwamxqzra\",\"id\":\"p\",\"name\":\"dphtv\",\"type\":\"ulajvlejchc\"},{\"properties\":{\"friendlyName\":\"zknmzlanrupd\",\"primaryFabricId\":\"nphcnzqtpjhmqrh\",\"primaryFabricFriendlyName\":\"hlaiwd\",\"recoveryFabricId\":\"smlzzhzdtxetlgy\",\"recoveryFabricFriendlyName\":\"hqvlnnpxybafiqg\",\"failoverDeploymentModel\":\"arbgjekgl\",\"replicationProviders\":[\"yulidwcwvm\"],\"allowedOperations\":[\"jonfhjirwgdnqzbr\"],\"lastPlannedFailoverTime\":\"2021-08-15T23:23:18Z\",\"lastUnplannedFailoverTime\":\"2021-02-01T12:15:25Z\",\"lastTestFailoverTime\":\"2021-01-01T19:33:39Z\",\"currentScenario\":{\"scenarioName\":\"ksjcitdigs\",\"jobId\":\"dglj\",\"startTime\":\"2021-04-10T15:56:09Z\"},\"currentScenarioStatus\":\"ua\",\"currentScenarioStatusDescription\":\"tomflrytswfpf\",\"groups\":[{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"skw\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"qjjyslurl\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"shhkvpedw\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"srhmpqvww\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"kondcb\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"wimuvqej\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"so\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{},{}],\"startGroupActions\":[{\"actionName\":\"a\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"sinuqtljqobbpih\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"ecybmrqbrj\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"bmpxdlvykfrexc\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"s\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"qwjksghudgz\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Shutdown\",\"replicationProtectedItems\":[{},{}],\"startGroupActions\":[{\"actionName\":\"gsv\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"u\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"kxibdafh\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"kmdyomkxfbvfbh\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"rhpw\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{},{},{}],\"startGroupActions\":[{\"actionName\":\"mawzovgk\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"ui\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jcjcazt\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"wsnsqowx\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"comlikytwvczc\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"cvejyfdvlvhbwrn\",\"id\":\"xt\",\"name\":\"ddpqt\",\"type\":\"ehnmnaoyankco\"}],\"nextLink\":\"swankltytmh\"}") - .toObject(RecoveryPlanCollection.class); - Assertions.assertEquals("khgb", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("ta", model.value().get(0).properties().primaryFabricId()); - Assertions.assertEquals("rfdl", model.value().get(0).properties().primaryFabricFriendlyName()); - Assertions.assertEquals("kh", model.value().get(0).properties().recoveryFabricId()); - Assertions.assertEquals("rne", model.value().get(0).properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("jcpeogkhnmg", model.value().get(0).properties().failoverDeploymentModel()); - Assertions.assertEquals("uxddbhfh", model.value().get(0).properties().replicationProviders().get(0)); - Assertions.assertEquals("nsduugwbsre", model.value().get(0).properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-07T05:21:39Z"), - model.value().get(0).properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-09T03:44:16Z"), - model.value().get(0).properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T17:58:26Z"), - model.value().get(0).properties().lastTestFailoverTime()); - Assertions.assertEquals("khminqcymc", model.value().get(0).properties().currentScenario().scenarioName()); - Assertions.assertEquals("gn", model.value().get(0).properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T07:37:31Z"), - model.value().get(0).properties().currentScenario().startTime()); - Assertions.assertEquals("ewuninvud", model.value().get(0).properties().currentScenarioStatus()); - Assertions.assertEquals("h", model.value().get(0).properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.FAILOVER, - model.value().get(0).properties().groups().get(0).groupType()); - Assertions.assertEquals("rqctmxxdtdd", - model.value().get(0).properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals("prwnwvroevytlyo", - model.value().get(0).properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals("qofyuicdhzbdy", model.value().get(0).location()); - Assertions.assertEquals("swankltytmh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanCollection model - = new RecoveryPlanCollection() - .withValue( - Arrays - .asList( - new RecoveryPlanInner() - .withProperties( - new RecoveryPlanProperties().withFriendlyName("khgb") - .withPrimaryFabricId("ta") - .withPrimaryFabricFriendlyName("rfdl") - .withRecoveryFabricId("kh") - .withRecoveryFabricFriendlyName("rne") - .withFailoverDeploymentModel("jcpeogkhnmg") - .withReplicationProviders(Arrays.asList("uxddbhfh", "fpazjzoywjxhpd", - "lontacnpq", "tehtuevrhrljyoog")) - .withAllowedOperations( - Arrays.asList("nsduugwbsre", "rfqkfuar", "nlvhhtklnvnafvv", "yfedevjbo")) - .withLastPlannedFailoverTime(OffsetDateTime.parse("2021-06-07T05:21:39Z")) - .withLastUnplannedFailoverTime(OffsetDateTime.parse("2021-09-09T03:44:16Z")) - .withLastTestFailoverTime(OffsetDateTime.parse("2021-02-13T17:58:26Z")) - .withCurrentScenario(new CurrentScenarioDetails().withScenarioName("khminqcymc") - .withJobId("gn") - .withStartTime(OffsetDateTime.parse("2021-04-29T07:37:31Z"))) - .withCurrentScenarioStatus("ewuninvud") - .withCurrentScenarioStatusDescription("h") - .withGroups(Arrays.asList( - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem(), new RecoveryPlanProtectedItem(), - new RecoveryPlanProtectedItem())) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("rqctmxxdtdd") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("flhuytxzv") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("zna") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("xbannovvoxc") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("prwnwvroevytlyo") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("rrrouuxvnsa") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.SHUTDOWN) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem())) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("o") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("izrxklob") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("xnazpmkml") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("vevfxz") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("hbzxli") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("hrdd") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("tfgxqbawpcb") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("nzqcy") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))))) - .withProviderSpecificDetails( - Arrays.asList(new RecoveryPlanProviderSpecificDetails(), - new RecoveryPlanProviderSpecificDetails(), - new RecoveryPlanProviderSpecificDetails()))) - .withLocation("qofyuicdhzbdy"), - new RecoveryPlanInner() - .withProperties(new RecoveryPlanProperties().withFriendlyName("kccrrvwey") - .withPrimaryFabricId("oy") - .withPrimaryFabricFriendlyName("k") - .withRecoveryFabricId("aimmoiroqb") - .withRecoveryFabricFriendlyName("hbragapyyr") - .withFailoverDeploymentModel("svbpavbopfppdbwn") - .withReplicationProviders( - Arrays.asList("ahxku", "asjcaacfdmmcpu", "mehqepvufh", "zeh")) - .withAllowedOperations(Arrays.asList("oqhnlb", "nbldxeaclgschori")) - .withLastPlannedFailoverTime(OffsetDateTime.parse("2021-03-13T23:48:24Z")) - .withLastUnplannedFailoverTime(OffsetDateTime.parse("2021-07-09T02:56:18Z")) - .withLastTestFailoverTime(OffsetDateTime.parse("2021-11-28T04:18:19Z")) - .withCurrentScenario(new CurrentScenarioDetails() - .withScenarioName("cso") - .withJobId("dpuviyf") - .withStartTime(OffsetDateTime.parse("2021-07-10T14:09:36Z"))) - .withCurrentScenarioStatus("eolhbhlvbmx") - .withCurrentScenarioStatusDescription("ibsxtkcud") - .withGroups(Arrays.asList(new RecoveryPlanGroup() - .withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems(Arrays.asList(new RecoveryPlanProtectedItem(), - new RecoveryPlanProtectedItem(), new RecoveryPlanProtectedItem())) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("iowl") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("jxnqp") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("wgfstmhqykizm") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("aoaf") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("luqvoxmycjimryv") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("gc") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))))) - .withProviderSpecificDetails( - Arrays.asList(new RecoveryPlanProviderSpecificDetails()))) - .withLocation("mzgwe"), - new RecoveryPlanInner() - .withProperties(new RecoveryPlanProperties().withFriendlyName("khlowkxxpv") - .withPrimaryFabricId("dfjmzsyzfhotlh") - .withPrimaryFabricFriendlyName("cyychunsjlp") - .withRecoveryFabricId("twszhvvuic") - .withRecoveryFabricFriendlyName("vtrrmhwrbfdpyflu") - .withFailoverDeploymentModel("vjglrocuyzlwhhme") - .withReplicationProviders(Arrays.asList("oclu", "n")) - .withAllowedOperations(Arrays.asList("emc", "jk", "mykyujxsglhs")) - .withLastPlannedFailoverTime(OffsetDateTime.parse("2021-06-30T11:59:37Z")) - .withLastUnplannedFailoverTime(OffsetDateTime.parse("2021-09-26T10:44:20Z")) - .withLastTestFailoverTime(OffsetDateTime.parse("2021-04-08T08:51:31Z")) - .withCurrentScenario(new CurrentScenarioDetails() - .withScenarioName("bkzudnigrfihot") - .withJobId("wlpxuzzjg") - .withStartTime(OffsetDateTime.parse("2021-05-28T23:16:03Z"))) - .withCurrentScenarioStatus("qyhqo") - .withCurrentScenarioStatusDescription("ihiqakydiw") - .withGroups(Arrays.asList(new RecoveryPlanGroup() - .withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems(Arrays.asList(new RecoveryPlanProtectedItem(), - new RecoveryPlanProtectedItem(), new RecoveryPlanProtectedItem())) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("qtvhcspodaqax") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("ipietgbe") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions( - Arrays.asList( - new RecoveryPlanAction().withActionName("ulbmoichdlp") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("fpubntnbatz") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction() - .withActionName("iqsowsaaelc") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems( - Arrays.asList(new RecoveryPlanProtectedItem(), - new RecoveryPlanProtectedItem(), new RecoveryPlanProtectedItem())) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("hplrvkmjcwmjvlg") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("ggcvk") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("y") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("izrzb") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions( - Arrays.asList( - new RecoveryPlanAction().withActionName("fxsfuztlvtmv") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction() - .withActionName("gbwidqlvh") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems( - Arrays.asList(new RecoveryPlanProtectedItem())) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("fizr") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("jfnmjmvlwyz") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("iblkujr") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("lfojuidjp") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("jucejikzoeovvtz") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("je") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("jklntikyj") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup() - .withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem(), new RecoveryPlanProtectedItem(), - new RecoveryPlanProtectedItem(), new RecoveryPlanProtectedItem())) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("zolxrzvhqjwtr") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("tgvgzp") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("rrkolawjmjs") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions( - Arrays.asList( - new RecoveryPlanAction().withActionName("okcdxfzzzwyjaf") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("tlhguynuchl") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("mltx") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("whmozusgzvlnsnnj") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))))) - .withProviderSpecificDetails( - Arrays.asList( - new RecoveryPlanProviderSpecificDetails(), - new RecoveryPlanProviderSpecificDetails()))) - .withLocation("folpymwamxqzra"), - new RecoveryPlanInner() - .withProperties(new RecoveryPlanProperties().withFriendlyName("zknmzlanrupd") - .withPrimaryFabricId("nphcnzqtpjhmqrh") - .withPrimaryFabricFriendlyName("hlaiwd") - .withRecoveryFabricId("smlzzhzdtxetlgy") - .withRecoveryFabricFriendlyName("hqvlnnpxybafiqg") - .withFailoverDeploymentModel("arbgjekgl") - .withReplicationProviders(Arrays.asList("yulidwcwvm")) - .withAllowedOperations(Arrays.asList("jonfhjirwgdnqzbr")) - .withLastPlannedFailoverTime(OffsetDateTime.parse("2021-08-15T23:23:18Z")) - .withLastUnplannedFailoverTime(OffsetDateTime.parse("2021-02-01T12:15:25Z")) - .withLastTestFailoverTime(OffsetDateTime.parse("2021-01-01T19:33:39Z")) - .withCurrentScenario(new CurrentScenarioDetails() - .withScenarioName("ksjcitdigs") - .withJobId("dglj") - .withStartTime(OffsetDateTime.parse("2021-04-10T15:56:09Z"))) - .withCurrentScenarioStatus("ua") - .withCurrentScenarioStatusDescription("tomflrytswfpf") - .withGroups(Arrays.asList( - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems( - Arrays.asList(new RecoveryPlanProtectedItem())) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("skw") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("qjjyslurl") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("shhkvpedw") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("srhmpqvww") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("kondcb") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("wimuvqej") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("so") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem(), new RecoveryPlanProtectedItem())) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("a") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("sinuqtljqobbpih") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions( - Arrays.asList(new RecoveryPlanAction().withActionName("ecybmrqbrj") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("bmpxdlvykfrexc") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("s") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("qwjksghudgz") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup() - .withGroupType(RecoveryPlanGroupType.SHUTDOWN) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem(), new RecoveryPlanProtectedItem())) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("gsv") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("u") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("kxibdafh") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("kmdyomkxfbvfbh") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays - .asList(new RecoveryPlanAction().withActionName("rhpw") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems( - Arrays.asList(new RecoveryPlanProtectedItem(), - new RecoveryPlanProtectedItem(), new RecoveryPlanProtectedItem())) - .withStartGroupActions( - Arrays.asList(new RecoveryPlanAction().withActionName("mawzovgk") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("ui") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("jcjcazt") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("wsnsqowx") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("comlikytwvczc") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))))) - .withProviderSpecificDetails( - Arrays.asList(new RecoveryPlanProviderSpecificDetails()))) - .withLocation("cvejyfdvlvhbwrn"))) - .withNextLink("swankltytmh"); - model = BinaryData.fromObject(model).toObject(RecoveryPlanCollection.class); - Assertions.assertEquals("khgb", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("ta", model.value().get(0).properties().primaryFabricId()); - Assertions.assertEquals("rfdl", model.value().get(0).properties().primaryFabricFriendlyName()); - Assertions.assertEquals("kh", model.value().get(0).properties().recoveryFabricId()); - Assertions.assertEquals("rne", model.value().get(0).properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("jcpeogkhnmg", model.value().get(0).properties().failoverDeploymentModel()); - Assertions.assertEquals("uxddbhfh", model.value().get(0).properties().replicationProviders().get(0)); - Assertions.assertEquals("nsduugwbsre", model.value().get(0).properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-07T05:21:39Z"), - model.value().get(0).properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-09T03:44:16Z"), - model.value().get(0).properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T17:58:26Z"), - model.value().get(0).properties().lastTestFailoverTime()); - Assertions.assertEquals("khminqcymc", model.value().get(0).properties().currentScenario().scenarioName()); - Assertions.assertEquals("gn", model.value().get(0).properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T07:37:31Z"), - model.value().get(0).properties().currentScenario().startTime()); - Assertions.assertEquals("ewuninvud", model.value().get(0).properties().currentScenarioStatus()); - Assertions.assertEquals("h", model.value().get(0).properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.FAILOVER, - model.value().get(0).properties().groups().get(0).groupType()); - Assertions.assertEquals("rqctmxxdtdd", - model.value().get(0).properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals("prwnwvroevytlyo", - model.value().get(0).properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals("qofyuicdhzbdy", model.value().get(0).location()); - Assertions.assertEquals("swankltytmh", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanGroupTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanGroupTests.java deleted file mode 100644 index 9305b869dee9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanGroupTests.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanAction; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroup; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItemOperation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanGroupTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanGroup model = BinaryData.fromString( - "{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{\"id\":\"zdcgdzbenr\",\"virtualMachineId\":\"cawetzqddt\"},{\"id\":\"fljhznamtua\",\"virtualMachineId\":\"zwcjjncqtj\"}],\"startGroupActions\":[{\"actionName\":\"zvgbgat\",\"failoverTypes\":[\"ChangePit\",\"ChangePit\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"rebwggahtt\",\"failoverTypes\":[\"TestFailover\",\"ChangePit\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jqfutlxj\",\"failoverTypes\":[\"SwitchProtection\",\"CancelFailover\",\"TestFailoverCleanup\",\"ReverseReplicate\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"j\",\"failoverTypes\":[\"RepairReplication\",\"CompleteMigration\",\"TestFailoverCleanup\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"cmbuocnjrohmbpy\",\"failoverTypes\":[\"SwitchProtection\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}") - .toObject(RecoveryPlanGroup.class); - Assertions.assertEquals(RecoveryPlanGroupType.BOOT, model.groupType()); - Assertions.assertEquals("zdcgdzbenr", model.replicationProtectedItems().get(0).id()); - Assertions.assertEquals("cawetzqddt", model.replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("zvgbgat", model.startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.CHANGE_PIT, - model.startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("rebwggahtt", model.endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.TEST_FAILOVER, - model.endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.endGroupActions().get(0).failoverDirections().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanGroup model - = new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem().withId("zdcgdzbenr").withVirtualMachineId("cawetzqddt"), - new RecoveryPlanProtectedItem().withId("fljhznamtua").withVirtualMachineId("zwcjjncqtj"))) - .withStartGroupActions(Arrays.asList(new RecoveryPlanAction().withActionName("zvgbgat") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.CHANGE_PIT, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("rebwggahtt") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.TEST_FAILOVER, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("jqfutlxj") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.SWITCH_PROTECTION, - ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.REVERSE_REPLICATE)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("j") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.REPAIR_REPLICATION, - ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("cmbuocnjrohmbpy") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.SWITCH_PROTECTION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))); - model = BinaryData.fromObject(model).toObject(RecoveryPlanGroup.class); - Assertions.assertEquals(RecoveryPlanGroupType.BOOT, model.groupType()); - Assertions.assertEquals("zdcgdzbenr", model.replicationProtectedItems().get(0).id()); - Assertions.assertEquals("cawetzqddt", model.replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("zvgbgat", model.startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.CHANGE_PIT, - model.startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("rebwggahtt", model.endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.TEST_FAILOVER, - model.endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.endGroupActions().get(0).failoverDirections().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanHyperVReplicaAzureFailbackInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanHyperVReplicaAzureFailbackInputTests.java deleted file mode 100644 index 16373d7e2c0f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanHyperVReplicaAzureFailbackInputTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AlternateLocationRecoveryOption; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DataSyncStatus; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanHyperVReplicaAzureFailbackInput; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanHyperVReplicaAzureFailbackInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanHyperVReplicaAzureFailbackInput model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzureFailback\",\"dataSyncOption\":\"ForSynchronization\",\"recoveryVmCreationOption\":\"CreateVmIfNotFound\"}") - .toObject(RecoveryPlanHyperVReplicaAzureFailbackInput.class); - Assertions.assertEquals(DataSyncStatus.FOR_SYNCHRONIZATION, model.dataSyncOption()); - Assertions.assertEquals(AlternateLocationRecoveryOption.CREATE_VM_IF_NOT_FOUND, - model.recoveryVmCreationOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanHyperVReplicaAzureFailbackInput model - = new RecoveryPlanHyperVReplicaAzureFailbackInput().withDataSyncOption(DataSyncStatus.FOR_SYNCHRONIZATION) - .withRecoveryVmCreationOption(AlternateLocationRecoveryOption.CREATE_VM_IF_NOT_FOUND); - model = BinaryData.fromObject(model).toObject(RecoveryPlanHyperVReplicaAzureFailbackInput.class); - Assertions.assertEquals(DataSyncStatus.FOR_SYNCHRONIZATION, model.dataSyncOption()); - Assertions.assertEquals(AlternateLocationRecoveryOption.CREATE_VM_IF_NOT_FOUND, - model.recoveryVmCreationOption()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanHyperVReplicaAzureFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanHyperVReplicaAzureFailoverInputTests.java deleted file mode 100644 index 801ecdcac107..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanHyperVReplicaAzureFailoverInputTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.HyperVReplicaAzureRpRecoveryPointType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanHyperVReplicaAzureFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanHyperVReplicaAzureFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanHyperVReplicaAzureFailoverInput model = BinaryData.fromString( - "{\"instanceType\":\"HyperVReplicaAzure\",\"primaryKekCertificatePfx\":\"vtzldzchubagwn\",\"secondaryKekCertificatePfx\":\"uvigv\",\"recoveryPointType\":\"Latest\"}") - .toObject(RecoveryPlanHyperVReplicaAzureFailoverInput.class); - Assertions.assertEquals("vtzldzchubagwn", model.primaryKekCertificatePfx()); - Assertions.assertEquals("uvigv", model.secondaryKekCertificatePfx()); - Assertions.assertEquals(HyperVReplicaAzureRpRecoveryPointType.LATEST, model.recoveryPointType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanHyperVReplicaAzureFailoverInput model - = new RecoveryPlanHyperVReplicaAzureFailoverInput().withPrimaryKekCertificatePfx("vtzldzchubagwn") - .withSecondaryKekCertificatePfx("uvigv") - .withRecoveryPointType(HyperVReplicaAzureRpRecoveryPointType.LATEST); - model = BinaryData.fromObject(model).toObject(RecoveryPlanHyperVReplicaAzureFailoverInput.class); - Assertions.assertEquals("vtzldzchubagwn", model.primaryKekCertificatePfx()); - Assertions.assertEquals("uvigv", model.secondaryKekCertificatePfx()); - Assertions.assertEquals(HyperVReplicaAzureRpRecoveryPointType.LATEST, model.recoveryPointType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInMageAzureV2FailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInMageAzureV2FailoverInputTests.java deleted file mode 100644 index cf385aa84ccc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInMageAzureV2FailoverInputTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageV2RpRecoveryPointType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanInMageAzureV2FailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanInMageAzureV2FailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanInMageAzureV2FailoverInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageAzureV2\",\"recoveryPointType\":\"LatestApplicationConsistent\",\"useMultiVmSyncPoint\":\"bzakp\"}") - .toObject(RecoveryPlanInMageAzureV2FailoverInput.class); - Assertions.assertEquals(InMageV2RpRecoveryPointType.LATEST_APPLICATION_CONSISTENT, model.recoveryPointType()); - Assertions.assertEquals("bzakp", model.useMultiVmSyncPoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanInMageAzureV2FailoverInput model = new RecoveryPlanInMageAzureV2FailoverInput() - .withRecoveryPointType(InMageV2RpRecoveryPointType.LATEST_APPLICATION_CONSISTENT) - .withUseMultiVmSyncPoint("bzakp"); - model = BinaryData.fromObject(model).toObject(RecoveryPlanInMageAzureV2FailoverInput.class); - Assertions.assertEquals(InMageV2RpRecoveryPointType.LATEST_APPLICATION_CONSISTENT, model.recoveryPointType()); - Assertions.assertEquals("bzakp", model.useMultiVmSyncPoint()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInMageFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInMageFailoverInputTests.java deleted file mode 100644 index b052aafe83de..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInMageFailoverInputTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanInMageFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RpInMageRecoveryPointType; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanInMageFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanInMageFailoverInput model - = BinaryData.fromString("{\"instanceType\":\"InMage\",\"recoveryPointType\":\"LatestTag\"}") - .toObject(RecoveryPlanInMageFailoverInput.class); - Assertions.assertEquals(RpInMageRecoveryPointType.LATEST_TAG, model.recoveryPointType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanInMageFailoverInput model - = new RecoveryPlanInMageFailoverInput().withRecoveryPointType(RpInMageRecoveryPointType.LATEST_TAG); - model = BinaryData.fromObject(model).toObject(RecoveryPlanInMageFailoverInput.class); - Assertions.assertEquals(RpInMageRecoveryPointType.LATEST_TAG, model.recoveryPointType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInMageRcmFailbackFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInMageRcmFailbackFailoverInputTests.java deleted file mode 100644 index e044ab1d2f3e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInMageRcmFailbackFailoverInputTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.InMageRcmFailbackRecoveryPointType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanInMageRcmFailbackFailoverInput; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanInMageRcmFailbackFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanInMageRcmFailbackFailoverInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcmFailback\",\"recoveryPointType\":\"ApplicationConsistent\",\"useMultiVmSyncPoint\":\"raqp\"}") - .toObject(RecoveryPlanInMageRcmFailbackFailoverInput.class); - Assertions.assertEquals(InMageRcmFailbackRecoveryPointType.APPLICATION_CONSISTENT, model.recoveryPointType()); - Assertions.assertEquals("raqp", model.useMultiVmSyncPoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanInMageRcmFailbackFailoverInput model = new RecoveryPlanInMageRcmFailbackFailoverInput() - .withRecoveryPointType(InMageRcmFailbackRecoveryPointType.APPLICATION_CONSISTENT) - .withUseMultiVmSyncPoint("raqp"); - model = BinaryData.fromObject(model).toObject(RecoveryPlanInMageRcmFailbackFailoverInput.class); - Assertions.assertEquals(InMageRcmFailbackRecoveryPointType.APPLICATION_CONSISTENT, model.recoveryPointType()); - Assertions.assertEquals("raqp", model.useMultiVmSyncPoint()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInMageRcmFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInMageRcmFailoverInputTests.java deleted file mode 100644 index 4a3b0c030144..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInMageRcmFailoverInputTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanInMageRcmFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanPointType; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanInMageRcmFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanInMageRcmFailoverInput model = BinaryData.fromString( - "{\"instanceType\":\"InMageRcm\",\"recoveryPointType\":\"LatestApplicationConsistent\",\"useMultiVmSyncPoint\":\"suc\"}") - .toObject(RecoveryPlanInMageRcmFailoverInput.class); - Assertions.assertEquals(RecoveryPlanPointType.LATEST_APPLICATION_CONSISTENT, model.recoveryPointType()); - Assertions.assertEquals("suc", model.useMultiVmSyncPoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanInMageRcmFailoverInput model = new RecoveryPlanInMageRcmFailoverInput() - .withRecoveryPointType(RecoveryPlanPointType.LATEST_APPLICATION_CONSISTENT) - .withUseMultiVmSyncPoint("suc"); - model = BinaryData.fromObject(model).toObject(RecoveryPlanInMageRcmFailoverInput.class); - Assertions.assertEquals(RecoveryPlanPointType.LATEST_APPLICATION_CONSISTENT, model.recoveryPointType()); - Assertions.assertEquals("suc", model.useMultiVmSyncPoint()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInnerTests.java deleted file mode 100644 index c1179d103385..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanInnerTests.java +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPlanInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CurrentScenarioDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanAction; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroup; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItemOperation; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanInner model = BinaryData.fromString( - "{\"properties\":{\"friendlyName\":\"znnhd\",\"primaryFabricId\":\"ktgj\",\"primaryFabricFriendlyName\":\"gguxhemlwyw\",\"recoveryFabricId\":\"eczgfb\",\"recoveryFabricFriendlyName\":\"klelssxb\",\"failoverDeploymentModel\":\"c\",\"replicationProviders\":[\"ujksrlsmdesqplpv\",\"jcdoewb\",\"dyvt\"],\"allowedOperations\":[\"xvgpiude\",\"gfsxzec\",\"axwk\",\"fykhvuhxepmru\"],\"lastPlannedFailoverTime\":\"2021-01-01T13:09:47Z\",\"lastUnplannedFailoverTime\":\"2021-01-21T20:15:20Z\",\"lastTestFailoverTime\":\"2021-07-09T17:03:36Z\",\"currentScenario\":{\"scenarioName\":\"slujdjltym\",\"jobId\":\"vguihywar\",\"startTime\":\"2021-09-29T23:23Z\"},\"currentScenarioStatus\":\"hkixkykxdssj\",\"currentScenarioStatusDescription\":\"mmuc\",\"groups\":[{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{\"id\":\"lrmymyincqlhri\",\"virtualMachineId\":\"sl\"},{\"id\":\"iiovgqcgxu\",\"virtualMachineId\":\"qkctotiowlxte\"}],\"startGroupActions\":[{\"actionName\":\"tjgwdtguk\",\"failoverTypes\":[\"DisableProtection\",\"Commit\",\"CancelFailover\",\"Commit\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"kccuzgy\",\"failoverTypes\":[\"PlannedFailover\",\"SwitchProtection\"],\"failoverDirections\":[\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"lwgniiprglvawu\",\"failoverTypes\":[\"CancelFailover\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"pivlsbbjpm\",\"failoverTypes\":[\"TestFailoverCleanup\",\"CancelFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"xxkubvphavp\",\"failoverTypes\":[\"RepairReplication\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"gvgovpbbttefjo\",\"failoverTypes\":[\"Commit\",\"DisableProtection\",\"FinalizeFailback\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{\"id\":\"frdbiqmrjgeihf\",\"virtualMachineId\":\"ggwfiwz\"},{\"id\":\"mjpb\",\"virtualMachineId\":\"phmgtvljvrcmyfq\"},{\"id\":\"gxhnpomyqwcabv\",\"virtualMachineId\":\"ilee\"},{\"id\":\"swlpaugmrmfj\",\"virtualMachineId\":\"xwtoaukhfkvc\"}],\"startGroupActions\":[{\"actionName\":\"zmoaeds\",\"failoverTypes\":[\"Commit\",\"ChangePit\"],\"failoverDirections\":[\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"edwcgyee\",\"failoverTypes\":[\"Commit\",\"FinalizeFailback\",\"ChangePit\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"g\",\"failoverTypes\":[\"PlannedFailover\",\"SwitchProtection\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"l\",\"failoverTypes\":[\"DisableProtection\",\"TestFailoverCleanup\",\"DisableProtection\",\"RepairReplication\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{\"id\":\"hvn\",\"virtualMachineId\":\"gnxkympqan\"},{\"id\":\"jk\",\"virtualMachineId\":\"tw\"},{\"id\":\"aoypny\",\"virtualMachineId\":\"shxcylhkg\"}],\"startGroupActions\":[{\"actionName\":\"ghpxycphdr\",\"failoverTypes\":[\"CompleteMigration\",\"RepairReplication\",\"ChangePit\"],\"failoverDirections\":[\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"omacluzvxnqmhr\",\"failoverTypes\":[\"FinalizeFailback\"],\"failoverDirections\":[\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"kois\",\"failoverTypes\":[\"DisableProtection\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"xuifmcsypobkdqz\",\"failoverTypes\":[\"CompleteMigration\",\"Commit\",\"ChangePit\",\"TestFailoverCleanup\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"lgtrczzy\",\"failoverTypes\":[\"DisableProtection\",\"UnplannedFailover\",\"TestFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"rkihcirld\",\"id\":\"fx\",\"name\":\"dcoxnbk\",\"type\":\"ja\"}") - .toObject(RecoveryPlanInner.class); - Assertions.assertEquals("znnhd", model.properties().friendlyName()); - Assertions.assertEquals("ktgj", model.properties().primaryFabricId()); - Assertions.assertEquals("gguxhemlwyw", model.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("eczgfb", model.properties().recoveryFabricId()); - Assertions.assertEquals("klelssxb", model.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("c", model.properties().failoverDeploymentModel()); - Assertions.assertEquals("ujksrlsmdesqplpv", model.properties().replicationProviders().get(0)); - Assertions.assertEquals("xvgpiude", model.properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T13:09:47Z"), - model.properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-21T20:15:20Z"), - model.properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-09T17:03:36Z"), - model.properties().lastTestFailoverTime()); - Assertions.assertEquals("slujdjltym", model.properties().currentScenario().scenarioName()); - Assertions.assertEquals("vguihywar", model.properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-29T23:23Z"), - model.properties().currentScenario().startTime()); - Assertions.assertEquals("hkixkykxdssj", model.properties().currentScenarioStatus()); - Assertions.assertEquals("mmuc", model.properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.FAILOVER, model.properties().groups().get(0).groupType()); - Assertions.assertEquals("lrmymyincqlhri", - model.properties().groups().get(0).replicationProtectedItems().get(0).id()); - Assertions.assertEquals("sl", - model.properties().groups().get(0).replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("tjgwdtguk", - model.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.DISABLE_PROTECTION, - model.properties().groups().get(0).startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.properties().groups().get(0).startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("lwgniiprglvawu", - model.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.CANCEL_FAILOVER, - model.properties().groups().get(0).endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.properties().groups().get(0).endGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("rkihcirld", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanInner model = new RecoveryPlanInner() - .withProperties(new RecoveryPlanProperties().withFriendlyName("znnhd") - .withPrimaryFabricId("ktgj") - .withPrimaryFabricFriendlyName("gguxhemlwyw") - .withRecoveryFabricId("eczgfb") - .withRecoveryFabricFriendlyName("klelssxb") - .withFailoverDeploymentModel("c") - .withReplicationProviders(Arrays.asList("ujksrlsmdesqplpv", "jcdoewb", "dyvt")) - .withAllowedOperations(Arrays.asList("xvgpiude", "gfsxzec", "axwk", "fykhvuhxepmru")) - .withLastPlannedFailoverTime(OffsetDateTime.parse("2021-01-01T13:09:47Z")) - .withLastUnplannedFailoverTime(OffsetDateTime.parse("2021-01-21T20:15:20Z")) - .withLastTestFailoverTime(OffsetDateTime.parse("2021-07-09T17:03:36Z")) - .withCurrentScenario(new CurrentScenarioDetails().withScenarioName("slujdjltym") - .withJobId("vguihywar") - .withStartTime(OffsetDateTime.parse("2021-09-29T23:23Z"))) - .withCurrentScenarioStatus("hkixkykxdssj") - .withCurrentScenarioStatusDescription("mmuc") - .withGroups(Arrays.asList( - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem().withId("lrmymyincqlhri").withVirtualMachineId("sl"), - new RecoveryPlanProtectedItem().withId("iiovgqcgxu").withVirtualMachineId("qkctotiowlxte"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("tjgwdtguk") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.DISABLE_PROTECTION, - ReplicationProtectedItemOperation.COMMIT, - ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.COMMIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction() - .withActionName("kccuzgy") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.PLANNED_FAILOVER, - ReplicationProtectedItemOperation.SWITCH_PROTECTION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("lwgniiprglvawu") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.CANCEL_FAILOVER)) - .withFailoverDirections(Arrays.asList( - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("pivlsbbjpm") - .withFailoverTypes( - Arrays.asList(ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.CANCEL_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("xxkubvphavp") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.REPAIR_REPLICATION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction() - .withActionName("gvgovpbbttefjo") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMMIT, - ReplicationProtectedItemOperation.DISABLE_PROTECTION, - ReplicationProtectedItemOperation.FINALIZE_FAILBACK)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem().withId("frdbiqmrjgeihf").withVirtualMachineId("ggwfiwz"), - new RecoveryPlanProtectedItem().withId("mjpb").withVirtualMachineId("phmgtvljvrcmyfq"), - new RecoveryPlanProtectedItem().withId("gxhnpomyqwcabv").withVirtualMachineId("ilee"), - new RecoveryPlanProtectedItem().withId("swlpaugmrmfj") - .withVirtualMachineId("xwtoaukhfkvc"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("zmoaeds") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMMIT, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("edwcgyee") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMMIT, - ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("g") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.PLANNED_FAILOVER, - ReplicationProtectedItemOperation.SWITCH_PROTECTION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("l") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.DISABLE_PROTECTION, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.DISABLE_PROTECTION, - ReplicationProtectedItemOperation.REPAIR_REPLICATION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem().withId("hvn").withVirtualMachineId("gnxkympqan"), - new RecoveryPlanProtectedItem().withId("jk").withVirtualMachineId("tw"), - new RecoveryPlanProtectedItem().withId("aoypny").withVirtualMachineId("shxcylhkg"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("ghpxycphdr") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - ReplicationProtectedItemOperation.REPAIR_REPLICATION, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction() - .withActionName("omacluzvxnqmhr") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.FINALIZE_FAILBACK)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("kois") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.DISABLE_PROTECTION)) - .withFailoverDirections(Arrays.asList( - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("xuifmcsypobkdqz") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - ReplicationProtectedItemOperation.COMMIT, - ReplicationProtectedItemOperation.CHANGE_PIT, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("lgtrczzy") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.DISABLE_PROTECTION, - ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.TEST_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))))) - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanProviderSpecificDetails(), - new RecoveryPlanProviderSpecificDetails(), new RecoveryPlanProviderSpecificDetails()))) - .withLocation("rkihcirld"); - model = BinaryData.fromObject(model).toObject(RecoveryPlanInner.class); - Assertions.assertEquals("znnhd", model.properties().friendlyName()); - Assertions.assertEquals("ktgj", model.properties().primaryFabricId()); - Assertions.assertEquals("gguxhemlwyw", model.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("eczgfb", model.properties().recoveryFabricId()); - Assertions.assertEquals("klelssxb", model.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("c", model.properties().failoverDeploymentModel()); - Assertions.assertEquals("ujksrlsmdesqplpv", model.properties().replicationProviders().get(0)); - Assertions.assertEquals("xvgpiude", model.properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T13:09:47Z"), - model.properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-21T20:15:20Z"), - model.properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-09T17:03:36Z"), - model.properties().lastTestFailoverTime()); - Assertions.assertEquals("slujdjltym", model.properties().currentScenario().scenarioName()); - Assertions.assertEquals("vguihywar", model.properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-29T23:23Z"), - model.properties().currentScenario().startTime()); - Assertions.assertEquals("hkixkykxdssj", model.properties().currentScenarioStatus()); - Assertions.assertEquals("mmuc", model.properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.FAILOVER, model.properties().groups().get(0).groupType()); - Assertions.assertEquals("lrmymyincqlhri", - model.properties().groups().get(0).replicationProtectedItems().get(0).id()); - Assertions.assertEquals("sl", - model.properties().groups().get(0).replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("tjgwdtguk", - model.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.DISABLE_PROTECTION, - model.properties().groups().get(0).startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.properties().groups().get(0).startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("lwgniiprglvawu", - model.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.CANCEL_FAILOVER, - model.properties().groups().get(0).endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.properties().groups().get(0).endGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("rkihcirld", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanManualActionDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanManualActionDetailsTests.java deleted file mode 100644 index 6d685f5db114..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanManualActionDetailsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanManualActionDetails; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanManualActionDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanManualActionDetails model - = BinaryData.fromString("{\"instanceType\":\"ManualActionDetails\",\"description\":\"imcwqxynqjgsa\"}") - .toObject(RecoveryPlanManualActionDetails.class); - Assertions.assertEquals("imcwqxynqjgsa", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanManualActionDetails model = new RecoveryPlanManualActionDetails().withDescription("imcwqxynqjgsa"); - model = BinaryData.fromObject(model).toObject(RecoveryPlanManualActionDetails.class); - Assertions.assertEquals("imcwqxynqjgsa", model.description()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanPlannedFailoverInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanPlannedFailoverInputPropertiesTests.java deleted file mode 100644 index 0a53f91190c5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanPlannedFailoverInputPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificFailoverInput; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanPlannedFailoverInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanPlannedFailoverInputProperties model = BinaryData.fromString( - "{\"failoverDirection\":\"PrimaryToRecovery\",\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"},{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"},{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"}]}") - .toObject(RecoveryPlanPlannedFailoverInputProperties.class); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, model.failoverDirection()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanPlannedFailoverInputProperties model = new RecoveryPlanPlannedFailoverInputProperties() - .withFailoverDirection(PossibleOperationsDirections.PRIMARY_TO_RECOVERY) - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanProviderSpecificFailoverInput(), - new RecoveryPlanProviderSpecificFailoverInput(), new RecoveryPlanProviderSpecificFailoverInput())); - model = BinaryData.fromObject(model).toObject(RecoveryPlanPlannedFailoverInputProperties.class); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, model.failoverDirection()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanPlannedFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanPlannedFailoverInputTests.java deleted file mode 100644 index c9e82e8061f3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanPlannedFailoverInputTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificFailoverInput; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanPlannedFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanPlannedFailoverInput model = BinaryData.fromString( - "{\"properties\":{\"failoverDirection\":\"PrimaryToRecovery\",\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"}]}}") - .toObject(RecoveryPlanPlannedFailoverInput.class); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.properties().failoverDirection()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanPlannedFailoverInput model - = new RecoveryPlanPlannedFailoverInput().withProperties(new RecoveryPlanPlannedFailoverInputProperties() - .withFailoverDirection(PossibleOperationsDirections.PRIMARY_TO_RECOVERY) - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanProviderSpecificFailoverInput()))); - model = BinaryData.fromObject(model).toObject(RecoveryPlanPlannedFailoverInput.class); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.properties().failoverDirection()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanPropertiesTests.java deleted file mode 100644 index cda18b3d6a82..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanPropertiesTests.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CurrentScenarioDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanAction; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroup; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItemOperation; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanProperties model = BinaryData.fromString( - "{\"friendlyName\":\"rnnqb\",\"primaryFabricId\":\"bpizxqltgr\",\"primaryFabricFriendlyName\":\"gypxrxvbfihwuhvc\",\"recoveryFabricId\":\"fsrb\",\"recoveryFabricFriendlyName\":\"blml\",\"failoverDeploymentModel\":\"wxihs\",\"replicationProviders\":[\"wqagnepzwa\",\"lsbs\",\"qqqagwwrxaomzi\"],\"allowedOperations\":[\"rrczezkhhltnj\",\"dhqoawj\"],\"lastPlannedFailoverTime\":\"2021-05-12T17:36:56Z\",\"lastUnplannedFailoverTime\":\"2021-09-19T04:55:50Z\",\"lastTestFailoverTime\":\"2021-07-31T20:48:08Z\",\"currentScenario\":{\"scenarioName\":\"pcmsplbyrrueqth\",\"jobId\":\"gnmbscbbxigdhx\",\"startTime\":\"2021-10-27T05:31:04Z\"},\"currentScenarioStatus\":\"opedbwdpyqyybxub\",\"currentScenarioStatusDescription\":\"nafcbq\",\"groups\":[{\"groupType\":\"Shutdown\",\"replicationProtectedItems\":[{\"id\":\"aqacigeleohd\",\"virtualMachineId\":\"qvwzkjopwbeonrl\"}],\"startGroupActions\":[{\"actionName\":\"dqybx\",\"failoverTypes\":[\"TestFailoverCleanup\",\"PlannedFailover\",\"PlannedFailover\",\"RepairReplication\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"qfyiaseqchkr\",\"failoverTypes\":[\"CompleteMigration\",\"UnplannedFailover\",\"UnplannedFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"uem\",\"failoverTypes\":[\"FinalizeFailback\",\"CancelFailover\",\"Commit\",\"TestFailoverCleanup\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"mnrxxbsojkl\",\"failoverTypes\":[\"CompleteMigration\",\"Failback\",\"TestFailoverCleanup\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"sprqsgnzxojpslsv\",\"failoverTypes\":[\"ReverseReplicate\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"iqwoyxqvapcoh\",\"failoverTypes\":[\"TestFailoverCleanup\",\"FinalizeFailback\",\"ReverseReplicate\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]}") - .toObject(RecoveryPlanProperties.class); - Assertions.assertEquals("rnnqb", model.friendlyName()); - Assertions.assertEquals("bpizxqltgr", model.primaryFabricId()); - Assertions.assertEquals("gypxrxvbfihwuhvc", model.primaryFabricFriendlyName()); - Assertions.assertEquals("fsrb", model.recoveryFabricId()); - Assertions.assertEquals("blml", model.recoveryFabricFriendlyName()); - Assertions.assertEquals("wxihs", model.failoverDeploymentModel()); - Assertions.assertEquals("wqagnepzwa", model.replicationProviders().get(0)); - Assertions.assertEquals("rrczezkhhltnj", model.allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-12T17:36:56Z"), model.lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-19T04:55:50Z"), model.lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-31T20:48:08Z"), model.lastTestFailoverTime()); - Assertions.assertEquals("pcmsplbyrrueqth", model.currentScenario().scenarioName()); - Assertions.assertEquals("gnmbscbbxigdhx", model.currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T05:31:04Z"), model.currentScenario().startTime()); - Assertions.assertEquals("opedbwdpyqyybxub", model.currentScenarioStatus()); - Assertions.assertEquals("nafcbq", model.currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.SHUTDOWN, model.groups().get(0).groupType()); - Assertions.assertEquals("aqacigeleohd", model.groups().get(0).replicationProtectedItems().get(0).id()); - Assertions.assertEquals("qvwzkjopwbeonrl", - model.groups().get(0).replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("dqybx", model.groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - model.groups().get(0).startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.groups().get(0).startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("uem", model.groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - model.groups().get(0).endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.groups().get(0).endGroupActions().get(0).failoverDirections().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanProperties model = new RecoveryPlanProperties().withFriendlyName("rnnqb") - .withPrimaryFabricId("bpizxqltgr") - .withPrimaryFabricFriendlyName("gypxrxvbfihwuhvc") - .withRecoveryFabricId("fsrb") - .withRecoveryFabricFriendlyName("blml") - .withFailoverDeploymentModel("wxihs") - .withReplicationProviders(Arrays.asList("wqagnepzwa", "lsbs", "qqqagwwrxaomzi")) - .withAllowedOperations(Arrays.asList("rrczezkhhltnj", "dhqoawj")) - .withLastPlannedFailoverTime(OffsetDateTime.parse("2021-05-12T17:36:56Z")) - .withLastUnplannedFailoverTime(OffsetDateTime.parse("2021-09-19T04:55:50Z")) - .withLastTestFailoverTime(OffsetDateTime.parse("2021-07-31T20:48:08Z")) - .withCurrentScenario(new CurrentScenarioDetails().withScenarioName("pcmsplbyrrueqth") - .withJobId("gnmbscbbxigdhx") - .withStartTime(OffsetDateTime.parse("2021-10-27T05:31:04Z"))) - .withCurrentScenarioStatus("opedbwdpyqyybxub") - .withCurrentScenarioStatusDescription("nafcbq") - .withGroups(Arrays.asList(new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.SHUTDOWN) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem().withId("aqacigeleohd").withVirtualMachineId("qvwzkjopwbeonrl"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("dqybx") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.PLANNED_FAILOVER, - ReplicationProtectedItemOperation.PLANNED_FAILOVER, - ReplicationProtectedItemOperation.REPAIR_REPLICATION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("qfyiaseqchkr") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.UNPLANNED_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("uem") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.CANCEL_FAILOVER, ReplicationProtectedItemOperation.COMMIT, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("mnrxxbsojkl") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - ReplicationProtectedItemOperation.FAILBACK, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("sprqsgnzxojpslsv") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.REVERSE_REPLICATE)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("iqwoyxqvapcoh") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.REVERSE_REPLICATE)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))))) - .withProviderSpecificDetails( - Arrays.asList(new RecoveryPlanProviderSpecificDetails(), new RecoveryPlanProviderSpecificDetails(), - new RecoveryPlanProviderSpecificDetails(), new RecoveryPlanProviderSpecificDetails())); - model = BinaryData.fromObject(model).toObject(RecoveryPlanProperties.class); - Assertions.assertEquals("rnnqb", model.friendlyName()); - Assertions.assertEquals("bpizxqltgr", model.primaryFabricId()); - Assertions.assertEquals("gypxrxvbfihwuhvc", model.primaryFabricFriendlyName()); - Assertions.assertEquals("fsrb", model.recoveryFabricId()); - Assertions.assertEquals("blml", model.recoveryFabricFriendlyName()); - Assertions.assertEquals("wxihs", model.failoverDeploymentModel()); - Assertions.assertEquals("wqagnepzwa", model.replicationProviders().get(0)); - Assertions.assertEquals("rrczezkhhltnj", model.allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-12T17:36:56Z"), model.lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-19T04:55:50Z"), model.lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-31T20:48:08Z"), model.lastTestFailoverTime()); - Assertions.assertEquals("pcmsplbyrrueqth", model.currentScenario().scenarioName()); - Assertions.assertEquals("gnmbscbbxigdhx", model.currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T05:31:04Z"), model.currentScenario().startTime()); - Assertions.assertEquals("opedbwdpyqyybxub", model.currentScenarioStatus()); - Assertions.assertEquals("nafcbq", model.currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.SHUTDOWN, model.groups().get(0).groupType()); - Assertions.assertEquals("aqacigeleohd", model.groups().get(0).replicationProtectedItems().get(0).id()); - Assertions.assertEquals("qvwzkjopwbeonrl", - model.groups().get(0).replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("dqybx", model.groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - model.groups().get(0).startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.groups().get(0).startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("uem", model.groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - model.groups().get(0).endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.groups().get(0).endGroupActions().get(0).failoverDirections().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanProtectedItemTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanProtectedItemTests.java deleted file mode 100644 index 91923e7f7a94..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanProtectedItemTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProtectedItem; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanProtectedItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanProtectedItem model - = BinaryData.fromString("{\"id\":\"blydyvkf\",\"virtualMachineId\":\"rocxnehvs\"}") - .toObject(RecoveryPlanProtectedItem.class); - Assertions.assertEquals("blydyvkf", model.id()); - Assertions.assertEquals("rocxnehvs", model.virtualMachineId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanProtectedItem model - = new RecoveryPlanProtectedItem().withId("blydyvkf").withVirtualMachineId("rocxnehvs"); - model = BinaryData.fromObject(model).toObject(RecoveryPlanProtectedItem.class); - Assertions.assertEquals("blydyvkf", model.id()); - Assertions.assertEquals("rocxnehvs", model.virtualMachineId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanProviderSpecificDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanProviderSpecificDetailsTests.java deleted file mode 100644 index 95dfae67d5c2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanProviderSpecificDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificDetails; - -public final class RecoveryPlanProviderSpecificDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanProviderSpecificDetails model - = BinaryData.fromString("{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}") - .toObject(RecoveryPlanProviderSpecificDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanProviderSpecificDetails model = new RecoveryPlanProviderSpecificDetails(); - model = BinaryData.fromObject(model).toObject(RecoveryPlanProviderSpecificDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanProviderSpecificFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanProviderSpecificFailoverInputTests.java deleted file mode 100644 index 8e6dab3003f6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanProviderSpecificFailoverInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificFailoverInput; - -public final class RecoveryPlanProviderSpecificFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanProviderSpecificFailoverInput model - = BinaryData.fromString("{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"}") - .toObject(RecoveryPlanProviderSpecificFailoverInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanProviderSpecificFailoverInput model = new RecoveryPlanProviderSpecificFailoverInput(); - model = BinaryData.fromObject(model).toObject(RecoveryPlanProviderSpecificFailoverInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanProviderSpecificInputTests.java deleted file mode 100644 index e875ecb9c4d1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificInput; - -public final class RecoveryPlanProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"RecoveryPlanProviderSpecificInput\"}") - .toObject(RecoveryPlanProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanProviderSpecificInput model = new RecoveryPlanProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(RecoveryPlanProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanScriptActionDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanScriptActionDetailsTests.java deleted file mode 100644 index ebf71184c0c1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanScriptActionDetailsTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionLocation; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanScriptActionDetails; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanScriptActionDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanScriptActionDetails model = BinaryData.fromString( - "{\"instanceType\":\"ScriptActionDetails\",\"path\":\"kyvscbgngcrus\",\"timeout\":\"ircpgcvsvkk\",\"fabricLocation\":\"Recovery\"}") - .toObject(RecoveryPlanScriptActionDetails.class); - Assertions.assertEquals("kyvscbgngcrus", model.path()); - Assertions.assertEquals("ircpgcvsvkk", model.timeout()); - Assertions.assertEquals(RecoveryPlanActionLocation.RECOVERY, model.fabricLocation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanScriptActionDetails model = new RecoveryPlanScriptActionDetails().withPath("kyvscbgngcrus") - .withTimeout("ircpgcvsvkk") - .withFabricLocation(RecoveryPlanActionLocation.RECOVERY); - model = BinaryData.fromObject(model).toObject(RecoveryPlanScriptActionDetails.class); - Assertions.assertEquals("kyvscbgngcrus", model.path()); - Assertions.assertEquals("ircpgcvsvkk", model.timeout()); - Assertions.assertEquals(RecoveryPlanActionLocation.RECOVERY, model.fabricLocation()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanTestFailoverCleanupInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanTestFailoverCleanupInputPropertiesTests.java deleted file mode 100644 index 3efd91189356..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanTestFailoverCleanupInputPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanTestFailoverCleanupInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanTestFailoverCleanupInputProperties model = BinaryData.fromString("{\"comments\":\"d\"}") - .toObject(RecoveryPlanTestFailoverCleanupInputProperties.class); - Assertions.assertEquals("d", model.comments()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanTestFailoverCleanupInputProperties model - = new RecoveryPlanTestFailoverCleanupInputProperties().withComments("d"); - model = BinaryData.fromObject(model).toObject(RecoveryPlanTestFailoverCleanupInputProperties.class); - Assertions.assertEquals("d", model.comments()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanTestFailoverCleanupInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanTestFailoverCleanupInputTests.java deleted file mode 100644 index 41c24a1f0557..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanTestFailoverCleanupInputTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanTestFailoverCleanupInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanTestFailoverCleanupInput model - = BinaryData.fromString("{\"properties\":{\"comments\":\"ysfaqegplwrysh\"}}") - .toObject(RecoveryPlanTestFailoverCleanupInput.class); - Assertions.assertEquals("ysfaqegplwrysh", model.properties().comments()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanTestFailoverCleanupInput model = new RecoveryPlanTestFailoverCleanupInput() - .withProperties(new RecoveryPlanTestFailoverCleanupInputProperties().withComments("ysfaqegplwrysh")); - model = BinaryData.fromObject(model).toObject(RecoveryPlanTestFailoverCleanupInput.class); - Assertions.assertEquals("ysfaqegplwrysh", model.properties().comments()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanTestFailoverInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanTestFailoverInputPropertiesTests.java deleted file mode 100644 index 0e71d800fc08..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanTestFailoverInputPropertiesTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInputProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanTestFailoverInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanTestFailoverInputProperties model = BinaryData.fromString( - "{\"failoverDirection\":\"RecoveryToPrimary\",\"networkType\":\"vqmtdwckygroejn\",\"networkId\":\"ljdjuskbrreqy\",\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"},{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"},{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"}]}") - .toObject(RecoveryPlanTestFailoverInputProperties.class); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, model.failoverDirection()); - Assertions.assertEquals("vqmtdwckygroejn", model.networkType()); - Assertions.assertEquals("ljdjuskbrreqy", model.networkId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanTestFailoverInputProperties model = new RecoveryPlanTestFailoverInputProperties() - .withFailoverDirection(PossibleOperationsDirections.RECOVERY_TO_PRIMARY) - .withNetworkType("vqmtdwckygroejn") - .withNetworkId("ljdjuskbrreqy") - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanProviderSpecificFailoverInput(), - new RecoveryPlanProviderSpecificFailoverInput(), new RecoveryPlanProviderSpecificFailoverInput())); - model = BinaryData.fromObject(model).toObject(RecoveryPlanTestFailoverInputProperties.class); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, model.failoverDirection()); - Assertions.assertEquals("vqmtdwckygroejn", model.networkType()); - Assertions.assertEquals("ljdjuskbrreqy", model.networkId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanTestFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanTestFailoverInputTests.java deleted file mode 100644 index 2a5fcb3a5249..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanTestFailoverInputTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInputProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanTestFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanTestFailoverInput model = BinaryData.fromString( - "{\"properties\":{\"failoverDirection\":\"RecoveryToPrimary\",\"networkType\":\"eshoygzcb\",\"networkId\":\"qxkfaoytehqp\",\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"},{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"}]}}") - .toObject(RecoveryPlanTestFailoverInput.class); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.properties().failoverDirection()); - Assertions.assertEquals("eshoygzcb", model.properties().networkType()); - Assertions.assertEquals("qxkfaoytehqp", model.properties().networkId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanTestFailoverInput model - = new RecoveryPlanTestFailoverInput().withProperties(new RecoveryPlanTestFailoverInputProperties() - .withFailoverDirection(PossibleOperationsDirections.RECOVERY_TO_PRIMARY) - .withNetworkType("eshoygzcb") - .withNetworkId("qxkfaoytehqp") - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanProviderSpecificFailoverInput(), - new RecoveryPlanProviderSpecificFailoverInput()))); - model = BinaryData.fromObject(model).toObject(RecoveryPlanTestFailoverInput.class); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.properties().failoverDirection()); - Assertions.assertEquals("eshoygzcb", model.properties().networkType()); - Assertions.assertEquals("qxkfaoytehqp", model.properties().networkId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanUnplannedFailoverInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanUnplannedFailoverInputPropertiesTests.java deleted file mode 100644 index 33cd2774a55c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanUnplannedFailoverInputPropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SourceSiteOperations; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanUnplannedFailoverInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanUnplannedFailoverInputProperties model = BinaryData.fromString( - "{\"failoverDirection\":\"RecoveryToPrimary\",\"sourceSiteOperations\":\"NotRequired\",\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"},{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"},{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"}]}") - .toObject(RecoveryPlanUnplannedFailoverInputProperties.class); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, model.failoverDirection()); - Assertions.assertEquals(SourceSiteOperations.NOT_REQUIRED, model.sourceSiteOperations()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanUnplannedFailoverInputProperties model = new RecoveryPlanUnplannedFailoverInputProperties() - .withFailoverDirection(PossibleOperationsDirections.RECOVERY_TO_PRIMARY) - .withSourceSiteOperations(SourceSiteOperations.NOT_REQUIRED) - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanProviderSpecificFailoverInput(), - new RecoveryPlanProviderSpecificFailoverInput(), new RecoveryPlanProviderSpecificFailoverInput())); - model = BinaryData.fromObject(model).toObject(RecoveryPlanUnplannedFailoverInputProperties.class); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, model.failoverDirection()); - Assertions.assertEquals(SourceSiteOperations.NOT_REQUIRED, model.sourceSiteOperations()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanUnplannedFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanUnplannedFailoverInputTests.java deleted file mode 100644 index 3ac8b6f1ee94..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPlanUnplannedFailoverInputTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SourceSiteOperations; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPlanUnplannedFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPlanUnplannedFailoverInput model = BinaryData.fromString( - "{\"properties\":{\"failoverDirection\":\"RecoveryToPrimary\",\"sourceSiteOperations\":\"Required\",\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificFailoverInput\"}]}}") - .toObject(RecoveryPlanUnplannedFailoverInput.class); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.properties().failoverDirection()); - Assertions.assertEquals(SourceSiteOperations.REQUIRED, model.properties().sourceSiteOperations()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPlanUnplannedFailoverInput model - = new RecoveryPlanUnplannedFailoverInput().withProperties(new RecoveryPlanUnplannedFailoverInputProperties() - .withFailoverDirection(PossibleOperationsDirections.RECOVERY_TO_PRIMARY) - .withSourceSiteOperations(SourceSiteOperations.REQUIRED) - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanProviderSpecificFailoverInput()))); - model = BinaryData.fromObject(model).toObject(RecoveryPlanUnplannedFailoverInput.class); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.properties().failoverDirection()); - Assertions.assertEquals(SourceSiteOperations.REQUIRED, model.properties().sourceSiteOperations()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointCollectionTests.java deleted file mode 100644 index 7a1a2f914afb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointCollectionTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPointInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProviderSpecificRecoveryPointDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPointCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPointProperties; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPointCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPointCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"recoveryPointTime\":\"2021-08-08T17:45:14Z\",\"recoveryPointType\":\"zhonnxkrlgnyhmo\",\"providerSpecificDetails\":{\"instanceType\":\"ProviderSpecificRecoveryPointDetails\"}},\"location\":\"kkgthr\",\"id\":\"gh\",\"name\":\"jbdhqxvc\",\"type\":\"gf\"},{\"properties\":{\"recoveryPointTime\":\"2021-05-21T09:29:43Z\",\"recoveryPointType\":\"fbshrnsvbuswd\",\"providerSpecificDetails\":{\"instanceType\":\"ProviderSpecificRecoveryPointDetails\"}},\"location\":\"ybycnunvj\",\"id\":\"rtkfawnopq\",\"name\":\"ikyzirtxdy\",\"type\":\"x\"},{\"properties\":{\"recoveryPointTime\":\"2021-06-25T00:23:13Z\",\"recoveryPointType\":\"psew\",\"providerSpecificDetails\":{\"instanceType\":\"ProviderSpecificRecoveryPointDetails\"}},\"location\":\"ilqu\",\"id\":\"rydxtqm\",\"name\":\"eoxorggufhyao\",\"type\":\"tbghhavgrvkf\"}],\"nextLink\":\"vjzhpjbib\"}") - .toObject(RecoveryPointCollection.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-08T17:45:14Z"), - model.value().get(0).properties().recoveryPointTime()); - Assertions.assertEquals("zhonnxkrlgnyhmo", model.value().get(0).properties().recoveryPointType()); - Assertions.assertEquals("kkgthr", model.value().get(0).location()); - Assertions.assertEquals("vjzhpjbib", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPointCollection model - = new RecoveryPointCollection() - .withValue(Arrays.asList( - new RecoveryPointInner() - .withProperties(new RecoveryPointProperties() - .withRecoveryPointTime(OffsetDateTime.parse("2021-08-08T17:45:14Z")) - .withRecoveryPointType("zhonnxkrlgnyhmo") - .withProviderSpecificDetails(new ProviderSpecificRecoveryPointDetails())) - .withLocation("kkgthr"), - new RecoveryPointInner() - .withProperties(new RecoveryPointProperties() - .withRecoveryPointTime(OffsetDateTime.parse("2021-05-21T09:29:43Z")) - .withRecoveryPointType("fbshrnsvbuswd") - .withProviderSpecificDetails(new ProviderSpecificRecoveryPointDetails())) - .withLocation("ybycnunvj"), - new RecoveryPointInner() - .withProperties(new RecoveryPointProperties() - .withRecoveryPointTime(OffsetDateTime.parse("2021-06-25T00:23:13Z")) - .withRecoveryPointType("psew") - .withProviderSpecificDetails(new ProviderSpecificRecoveryPointDetails())) - .withLocation("ilqu"))) - .withNextLink("vjzhpjbib"); - model = BinaryData.fromObject(model).toObject(RecoveryPointCollection.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-08T17:45:14Z"), - model.value().get(0).properties().recoveryPointTime()); - Assertions.assertEquals("zhonnxkrlgnyhmo", model.value().get(0).properties().recoveryPointType()); - Assertions.assertEquals("kkgthr", model.value().get(0).location()); - Assertions.assertEquals("vjzhpjbib", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointInnerTests.java deleted file mode 100644 index df943e6bd5f5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointInnerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryPointInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProviderSpecificRecoveryPointDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPointProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPointInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPointInner model = BinaryData.fromString( - "{\"properties\":{\"recoveryPointTime\":\"2021-05-29T05:16:16Z\",\"recoveryPointType\":\"umvfclu\",\"providerSpecificDetails\":{\"instanceType\":\"ProviderSpecificRecoveryPointDetails\"}},\"location\":\"wxnb\",\"id\":\"fezzxscyhwzdg\",\"name\":\"rujbzbomvzzbtdc\",\"type\":\"vp\"}") - .toObject(RecoveryPointInner.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T05:16:16Z"), model.properties().recoveryPointTime()); - Assertions.assertEquals("umvfclu", model.properties().recoveryPointType()); - Assertions.assertEquals("wxnb", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPointInner model - = new RecoveryPointInner() - .withProperties( - new RecoveryPointProperties().withRecoveryPointTime(OffsetDateTime.parse("2021-05-29T05:16:16Z")) - .withRecoveryPointType("umvfclu") - .withProviderSpecificDetails(new ProviderSpecificRecoveryPointDetails())) - .withLocation("wxnb"); - model = BinaryData.fromObject(model).toObject(RecoveryPointInner.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T05:16:16Z"), model.properties().recoveryPointTime()); - Assertions.assertEquals("umvfclu", model.properties().recoveryPointType()); - Assertions.assertEquals("wxnb", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointPropertiesTests.java deleted file mode 100644 index 7e2d093fff8d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProviderSpecificRecoveryPointDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPointProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPointPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPointProperties model = BinaryData.fromString( - "{\"recoveryPointTime\":\"2021-04-01T22:39:22Z\",\"recoveryPointType\":\"jviylwdshfs\",\"providerSpecificDetails\":{\"instanceType\":\"ProviderSpecificRecoveryPointDetails\"}}") - .toObject(RecoveryPointProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T22:39:22Z"), model.recoveryPointTime()); - Assertions.assertEquals("jviylwdshfs", model.recoveryPointType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPointProperties model - = new RecoveryPointProperties().withRecoveryPointTime(OffsetDateTime.parse("2021-04-01T22:39:22Z")) - .withRecoveryPointType("jviylwdshfs") - .withProviderSpecificDetails(new ProviderSpecificRecoveryPointDetails()); - model = BinaryData.fromObject(model).toObject(RecoveryPointProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T22:39:22Z"), model.recoveryPointTime()); - Assertions.assertEquals("jviylwdshfs", model.recoveryPointType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointsGetWithResponseMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointsGetWithResponseMockTests.java deleted file mode 100644 index 16676a50ec82..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointsGetWithResponseMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPoint; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RecoveryPointsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"recoveryPointTime\":\"2021-04-11T08:38:28Z\",\"recoveryPointType\":\"hadxjvvl\",\"providerSpecificDetails\":{\"instanceType\":\"ProviderSpecificRecoveryPointDetails\"}},\"location\":\"weuaugtxlzncoqxt\",\"id\":\"ytz\",\"name\":\"lyldjv\",\"type\":\"mxyrazzstjvcszbd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RecoveryPoint response = manager.recoveryPoints() - .getWithResponse("szopeuku", "dswbsskgq", "emosq", "fsjbpwjwz", "gipdzym", "khxfpz", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(OffsetDateTime.parse("2021-04-11T08:38:28Z"), - response.properties().recoveryPointTime()); - Assertions.assertEquals("hadxjvvl", response.properties().recoveryPointType()); - Assertions.assertEquals("weuaugtxlzncoqxt", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointsListByReplicationProtectedMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointsListByReplicationProtectedMockTests.java deleted file mode 100644 index a553ba67b6ca..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryPointsListByReplicationProtectedMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPoint; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RecoveryPointsListByReplicationProtectedMockTests { - @Test - public void testListByReplicationProtectedItems() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"recoveryPointTime\":\"2021-08-10T18:08:27Z\",\"recoveryPointType\":\"utyjukkedputocr\",\"providerSpecificDetails\":{\"instanceType\":\"ProviderSpecificRecoveryPointDetails\"}},\"location\":\"qicmdrgcuzjmvk\",\"id\":\"wrjcqhgcmljzk\",\"name\":\"qimybqjvfio\",\"type\":\"hcaqpv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.recoveryPoints() - .listByReplicationProtectedItems("ehdhjofywwna", "oxlorxgsl", "c", "u", "hvpaglyyhrgma", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(OffsetDateTime.parse("2021-08-10T18:08:27Z"), - response.iterator().next().properties().recoveryPointTime()); - Assertions.assertEquals("utyjukkedputocr", response.iterator().next().properties().recoveryPointType()); - Assertions.assertEquals("qicmdrgcuzjmvk", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryProximityPlacementGroupCustomDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryProximityPlacementGroupCustomDetailsTests.java deleted file mode 100644 index 4dcc3d7ca9be..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryProximityPlacementGroupCustomDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryProximityPlacementGroupCustomDetails; - -public final class RecoveryProximityPlacementGroupCustomDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryProximityPlacementGroupCustomDetails model - = BinaryData.fromString("{\"resourceType\":\"RecoveryProximityPlacementGroupCustomDetails\"}") - .toObject(RecoveryProximityPlacementGroupCustomDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryProximityPlacementGroupCustomDetails model = new RecoveryProximityPlacementGroupCustomDetails(); - model = BinaryData.fromObject(model).toObject(RecoveryProximityPlacementGroupCustomDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryResourceGroupCustomDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryResourceGroupCustomDetailsTests.java deleted file mode 100644 index 379d3d21dcaa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryResourceGroupCustomDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryResourceGroupCustomDetails; - -public final class RecoveryResourceGroupCustomDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryResourceGroupCustomDetails model - = BinaryData.fromString("{\"resourceType\":\"RecoveryResourceGroupCustomDetails\"}") - .toObject(RecoveryResourceGroupCustomDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryResourceGroupCustomDetails model = new RecoveryResourceGroupCustomDetails(); - model = BinaryData.fromObject(model).toObject(RecoveryResourceGroupCustomDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryVirtualNetworkCustomDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryVirtualNetworkCustomDetailsTests.java deleted file mode 100644 index 1dd2376918a3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RecoveryVirtualNetworkCustomDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryVirtualNetworkCustomDetails; - -public final class RecoveryVirtualNetworkCustomDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryVirtualNetworkCustomDetails model - = BinaryData.fromString("{\"resourceType\":\"RecoveryVirtualNetworkCustomDetails\"}") - .toObject(RecoveryVirtualNetworkCustomDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryVirtualNetworkCustomDetails model = new RecoveryVirtualNetworkCustomDetails(); - model = BinaryData.fromObject(model).toObject(RecoveryVirtualNetworkCustomDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveDisksInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveDisksInputPropertiesTests.java deleted file mode 100644 index 390999519481..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveDisksInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveDisksInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveDisksProviderSpecificInput; - -public final class RemoveDisksInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RemoveDisksInputProperties model = BinaryData - .fromString("{\"providerSpecificDetails\":{\"instanceType\":\"RemoveDisksProviderSpecificInput\"}}") - .toObject(RemoveDisksInputProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RemoveDisksInputProperties model - = new RemoveDisksInputProperties().withProviderSpecificDetails(new RemoveDisksProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(RemoveDisksInputProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveDisksInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveDisksInputTests.java deleted file mode 100644 index 3ca601b7359f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveDisksInputTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveDisksInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveDisksInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveDisksProviderSpecificInput; - -public final class RemoveDisksInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RemoveDisksInput model = BinaryData.fromString( - "{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"RemoveDisksProviderSpecificInput\"}}}") - .toObject(RemoveDisksInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RemoveDisksInput model = new RemoveDisksInput().withProperties( - new RemoveDisksInputProperties().withProviderSpecificDetails(new RemoveDisksProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(RemoveDisksInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveDisksProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveDisksProviderSpecificInputTests.java deleted file mode 100644 index 96f7283cee79..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveDisksProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveDisksProviderSpecificInput; - -public final class RemoveDisksProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RemoveDisksProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"RemoveDisksProviderSpecificInput\"}") - .toObject(RemoveDisksProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RemoveDisksProviderSpecificInput model = new RemoveDisksProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(RemoveDisksProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveProtectionContainerMappingInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveProtectionContainerMappingInputPropertiesTests.java deleted file mode 100644 index fd032ad6019e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveProtectionContainerMappingInputPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveProtectionContainerMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderContainerUnmappingInput; -import org.junit.jupiter.api.Assertions; - -public final class RemoveProtectionContainerMappingInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RemoveProtectionContainerMappingInputProperties model - = BinaryData.fromString("{\"providerSpecificInput\":{\"instanceType\":\"dao\"}}") - .toObject(RemoveProtectionContainerMappingInputProperties.class); - Assertions.assertEquals("dao", model.providerSpecificInput().instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RemoveProtectionContainerMappingInputProperties model = new RemoveProtectionContainerMappingInputProperties() - .withProviderSpecificInput(new ReplicationProviderContainerUnmappingInput().withInstanceType("dao")); - model = BinaryData.fromObject(model).toObject(RemoveProtectionContainerMappingInputProperties.class); - Assertions.assertEquals("dao", model.providerSpecificInput().instanceType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveProtectionContainerMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveProtectionContainerMappingInputTests.java deleted file mode 100644 index c513b9acf0ed..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RemoveProtectionContainerMappingInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveProtectionContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveProtectionContainerMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderContainerUnmappingInput; -import org.junit.jupiter.api.Assertions; - -public final class RemoveProtectionContainerMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RemoveProtectionContainerMappingInput model - = BinaryData.fromString("{\"properties\":{\"providerSpecificInput\":{\"instanceType\":\"fhoqca\"}}}") - .toObject(RemoveProtectionContainerMappingInput.class); - Assertions.assertEquals("fhoqca", model.properties().providerSpecificInput().instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RemoveProtectionContainerMappingInput model = new RemoveProtectionContainerMappingInput() - .withProperties(new RemoveProtectionContainerMappingInputProperties().withProviderSpecificInput( - new ReplicationProviderContainerUnmappingInput().withInstanceType("fhoqca"))); - model = BinaryData.fromObject(model).toObject(RemoveProtectionContainerMappingInput.class); - Assertions.assertEquals("fhoqca", model.properties().providerSpecificInput().instanceType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RenewCertificateInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RenewCertificateInputPropertiesTests.java deleted file mode 100644 index 23f601cfd4e9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RenewCertificateInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RenewCertificateInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class RenewCertificateInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RenewCertificateInputProperties model = BinaryData.fromString("{\"renewCertificateType\":\"glu\"}") - .toObject(RenewCertificateInputProperties.class); - Assertions.assertEquals("glu", model.renewCertificateType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RenewCertificateInputProperties model = new RenewCertificateInputProperties().withRenewCertificateType("glu"); - model = BinaryData.fromObject(model).toObject(RenewCertificateInputProperties.class); - Assertions.assertEquals("glu", model.renewCertificateType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RenewCertificateInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RenewCertificateInputTests.java deleted file mode 100644 index 39da51b88369..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RenewCertificateInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RenewCertificateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RenewCertificateInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class RenewCertificateInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RenewCertificateInput model = BinaryData.fromString("{\"properties\":{\"renewCertificateType\":\"aierhhb\"}}") - .toObject(RenewCertificateInput.class); - Assertions.assertEquals("aierhhb", model.properties().renewCertificateType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RenewCertificateInput model = new RenewCertificateInput() - .withProperties(new RenewCertificateInputProperties().withRenewCertificateType("aierhhb")); - model = BinaryData.fromObject(model).toObject(RenewCertificateInput.class); - Assertions.assertEquals("aierhhb", model.properties().renewCertificateType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsCreateWithResponMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsCreateWithResponMockTests.java deleted file mode 100644 index 4cca7f6e501c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsCreateWithResponMockTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Alert; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ConfigureAlertRequestProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationAlertSettingsCreateWithResponMockTests { - @Test - public void testCreateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"sendToOwners\":\"xbvkvwzdmvdd\",\"customEmailAddresses\":[\"rugyozzzawnjdv\"],\"locale\":\"rho\"},\"location\":\"kkvxu\",\"id\":\"dqzbvbpsuvqhx\",\"name\":\"ozf\",\"type\":\"dkwbkurklpiig\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Alert response = manager.replicationAlertSettings() - .define("derjennmk") - .withExistingVault("ustihtgrafjajvky", "mmjczvog") - .withProperties(new ConfigureAlertRequestProperties().withSendToOwners("uwqdwxhhlbmyphf") - .withCustomEmailAddresses(Arrays.asList("pdhewokyqs", "kx", "sy")) - .withLocale("ihqbtod")) - .create(); - - Assertions.assertEquals("xbvkvwzdmvdd", response.properties().sendToOwners()); - Assertions.assertEquals("rugyozzzawnjdv", response.properties().customEmailAddresses().get(0)); - Assertions.assertEquals("rho", response.properties().locale()); - Assertions.assertEquals("kkvxu", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsGetWithResponseMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsGetWithResponseMockTests.java deleted file mode 100644 index 5dbb0fc947be..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsGetWithResponseMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Alert; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationAlertSettingsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"sendToOwners\":\"xsgcemegd\",\"customEmailAddresses\":[\"y\",\"jubvfjyzuf\",\"difnivlutgg\",\"aacxauhvc\"],\"locale\":\"xhklsqxt\"},\"location\":\"yygktsrjyxxoxwf\",\"id\":\"bkvecnxfxphsowbe\",\"name\":\"snbwutlvuwm\",\"type\":\"u\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Alert response = manager.replicationAlertSettings() - .getWithResponse("mqmbwpp", "irxbkitzmnhit", "xjucl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xsgcemegd", response.properties().sendToOwners()); - Assertions.assertEquals("y", response.properties().customEmailAddresses().get(0)); - Assertions.assertEquals("xhklsqxt", response.properties().locale()); - Assertions.assertEquals("yygktsrjyxxoxwf", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsListMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsListMockTests.java deleted file mode 100644 index 013ba29462e4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAlertSettingsListMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Alert; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationAlertSettingsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"sendToOwners\":\"tgp\",\"customEmailAddresses\":[\"wgfqvj\"],\"locale\":\"hpak\"},\"location\":\"yhls\",\"id\":\"rnfbmeqagkn\",\"name\":\"jm\",\"type\":\"bnyevztnjawrhule\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.replicationAlertSettings() - .list("tzuaedrlhxgcq", "yrhkvxzzmiem", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tgp", response.iterator().next().properties().sendToOwners()); - Assertions.assertEquals("wgfqvj", response.iterator().next().properties().customEmailAddresses().get(0)); - Assertions.assertEquals("hpak", response.iterator().next().properties().locale()); - Assertions.assertEquals("yhls", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationApplianceInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationApplianceInnerTests.java deleted file mode 100644 index e26d58a233ed..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationApplianceInnerTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationApplianceInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplianceSpecificDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationApplianceProperties; - -public final class ReplicationApplianceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationApplianceInner model = BinaryData - .fromString( - "{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"ApplianceSpecificDetails\"}}}") - .toObject(ReplicationApplianceInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationApplianceInner model = new ReplicationApplianceInner().withProperties( - new ReplicationApplianceProperties().withProviderSpecificDetails(new ApplianceSpecificDetails())); - model = BinaryData.fromObject(model).toObject(ReplicationApplianceInner.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAppliancePropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAppliancePropertiesTests.java deleted file mode 100644 index 4113e0f56d7a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAppliancePropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ApplianceSpecificDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationApplianceProperties; - -public final class ReplicationAppliancePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationApplianceProperties model - = BinaryData.fromString("{\"providerSpecificDetails\":{\"instanceType\":\"ApplianceSpecificDetails\"}}") - .toObject(ReplicationApplianceProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationApplianceProperties model - = new ReplicationApplianceProperties().withProviderSpecificDetails(new ApplianceSpecificDetails()); - model = BinaryData.fromObject(model).toObject(ReplicationApplianceProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAppliancesListMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAppliancesListMockTests.java deleted file mode 100644 index 20d4adb59027..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationAppliancesListMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationAppliance; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationAppliancesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"ApplianceSpecificDetails\"}}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.replicationAppliances() - .list("uzkeutuip", "clzjwaqdz", "ydewuwxyll", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEligibilityResultsOperationsLMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEligibilityResultsOperationsLMockTests.java deleted file mode 100644 index 2350dbfbe47c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationEligibilityResultsOperationsLMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationEligibilityResultsCollection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationEligibilityResultsOperationsLMockTests { - @Test - public void testListWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"bek\",\"type\":\"ynfpkyvnhiysdho\",\"id\":\"slhraqkiwlwkff\",\"properties\":{\"clientRequestId\":\"wmwqoguflte\",\"errors\":[{},{}]}},{\"name\":\"gefzj\",\"type\":\"jtqbgysi\",\"id\":\"hnvxwtd\",\"properties\":{\"clientRequestId\":\"bjdbtqyhkxu\",\"errors\":[{},{},{}]}},{\"name\":\"jqgbbjvov\",\"type\":\"whgjsmbcsl\",\"id\":\"gsabdgdheronsdu\",\"properties\":{\"clientRequestId\":\"zvzuat\",\"errors\":[{},{}]}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ReplicationEligibilityResultsCollection response = manager.replicationEligibilityResultsOperations() - .listWithResponse("evt", "qwcz", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationGroupDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationGroupDetailsTests.java deleted file mode 100644 index 63abd5feb585..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationGroupDetailsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationGroupDetails; - -public final class ReplicationGroupDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationGroupDetails model = BinaryData.fromString("{\"instanceType\":\"ReplicationGroupDetails\"}") - .toObject(ReplicationGroupDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationGroupDetails model = new ReplicationGroupDetails(); - model = BinaryData.fromObject(model).toObject(ReplicationGroupDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationLogicalNetworksGetWithResponseMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationLogicalNetworksGetWithResponseMockTests.java deleted file mode 100644 index d135233bde98..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationLogicalNetworksGetWithResponseMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LogicalNetwork; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationLogicalNetworksGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"xwvegenlrj\",\"networkVirtualizationStatus\":\"mwevguyflnxel\",\"logicalNetworkUsage\":\"kfzcdetowwezhy\",\"logicalNetworkDefinitionsStatus\":\"di\"},\"location\":\"wqlqacs\",\"id\":\"qb\",\"name\":\"rtybcel\",\"type\":\"jnxodnjyhzfax\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LogicalNetwork response = manager.replicationLogicalNetworks() - .getWithResponse("kwwnq", "qlq", "pwxtvc", "bav", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xwvegenlrj", response.properties().friendlyName()); - Assertions.assertEquals("mwevguyflnxel", response.properties().networkVirtualizationStatus()); - Assertions.assertEquals("kfzcdetowwezhy", response.properties().logicalNetworkUsage()); - Assertions.assertEquals("di", response.properties().logicalNetworkDefinitionsStatus()); - Assertions.assertEquals("wqlqacs", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationLogicalNetworksListByReplicatMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationLogicalNetworksListByReplicatMockTests.java deleted file mode 100644 index 9325c278c80a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationLogicalNetworksListByReplicatMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LogicalNetwork; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationLogicalNetworksListByReplicatMockTests { - @Test - public void testListByReplicationFabrics() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"friendlyName\":\"whcamwuynfxkc\",\"networkVirtualizationStatus\":\"fcmvhadrpb\",\"logicalNetworkUsage\":\"vyrkljqkq\",\"logicalNetworkDefinitionsStatus\":\"yjtvjkowggxaw\"},\"location\":\"mbypnkteiidl\",\"id\":\"ov\",\"name\":\"bclprgeganihk\",\"type\":\"cnerekyjul\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.replicationLogicalNetworks() - .listByReplicationFabrics("qd", "a", "iunyevdyzdsytc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("whcamwuynfxkc", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals("fcmvhadrpb", response.iterator().next().properties().networkVirtualizationStatus()); - Assertions.assertEquals("vyrkljqkq", response.iterator().next().properties().logicalNetworkUsage()); - Assertions.assertEquals("yjtvjkowggxaw", - response.iterator().next().properties().logicalNetworkDefinitionsStatus()); - Assertions.assertEquals("mbypnkteiidl", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsCreateMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsCreateMockTests.java deleted file mode 100644 index e7f6d09173ad..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsCreateMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateNetworkMappingInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricSpecificCreateNetworkMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMapping; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationNetworkMappingsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"state\":\"k\",\"primaryNetworkFriendlyName\":\"iksy\",\"primaryNetworkId\":\"rrbnhylsbhujcydy\",\"primaryFabricFriendlyName\":\"mxvps\",\"recoveryNetworkFriendlyName\":\"zsyqagqllcbrvaid\",\"recoveryNetworkId\":\"kyhtrrqwfyyb\",\"recoveryFabricArmId\":\"mjjrnogyk\",\"recoveryFabricFriendlyName\":\"dlavsavgthk\",\"fabricSpecificSettings\":{\"instanceType\":\"NetworkMappingFabricSpecificSettings\"}},\"location\":\"euufk\",\"id\":\"zb\",\"name\":\"bxjblajybdnb\",\"type\":\"csbto\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkMapping response = manager.replicationNetworkMappings() - .define("xyxxhwr") - .withExistingReplicationNetwork("brhfiwltkfysunte", "hkl", "whcv", "syyhgqokjbmsrk") - .withProperties(new CreateNetworkMappingInputProperties().withRecoveryFabricName("omaqsyilpzzb") - .withRecoveryNetworkId("wnrzozsxa") - .withFabricSpecificDetails(new FabricSpecificCreateNetworkMappingInput())) - .create(); - - Assertions.assertEquals("k", response.properties().state()); - Assertions.assertEquals("iksy", response.properties().primaryNetworkFriendlyName()); - Assertions.assertEquals("rrbnhylsbhujcydy", response.properties().primaryNetworkId()); - Assertions.assertEquals("mxvps", response.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("zsyqagqllcbrvaid", response.properties().recoveryNetworkFriendlyName()); - Assertions.assertEquals("kyhtrrqwfyyb", response.properties().recoveryNetworkId()); - Assertions.assertEquals("mjjrnogyk", response.properties().recoveryFabricArmId()); - Assertions.assertEquals("dlavsavgthk", response.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("euufk", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsGetWithResponseMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsGetWithResponseMockTests.java deleted file mode 100644 index 43e0d796fb1d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsGetWithResponseMockTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMapping; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationNetworkMappingsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"state\":\"ciagvkdlhu\",\"primaryNetworkFriendlyName\":\"klbjoafmjfe\",\"primaryNetworkId\":\"lvoepknarse\",\"primaryFabricFriendlyName\":\"ncsqoacbuqd\",\"recoveryNetworkFriendlyName\":\"apleq\",\"recoveryNetworkId\":\"kxen\",\"recoveryFabricArmId\":\"z\",\"recoveryFabricFriendlyName\":\"vya\",\"fabricSpecificSettings\":{\"instanceType\":\"NetworkMappingFabricSpecificSettings\"}},\"location\":\"z\",\"id\":\"uuvu\",\"name\":\"aqcwggchxvlqgf\",\"type\":\"rvecica\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkMapping response = manager.replicationNetworkMappings() - .getWithResponse("jbvyezjwjkqo", "bwh", "ieyozvrcwfpucwnb", "gqefgzjvbxqcb", "oarx", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ciagvkdlhu", response.properties().state()); - Assertions.assertEquals("klbjoafmjfe", response.properties().primaryNetworkFriendlyName()); - Assertions.assertEquals("lvoepknarse", response.properties().primaryNetworkId()); - Assertions.assertEquals("ncsqoacbuqd", response.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("apleq", response.properties().recoveryNetworkFriendlyName()); - Assertions.assertEquals("kxen", response.properties().recoveryNetworkId()); - Assertions.assertEquals("z", response.properties().recoveryFabricArmId()); - Assertions.assertEquals("vya", response.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("z", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsListByReplicatMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsListByReplicatMockTests.java deleted file mode 100644 index 60987bad4896..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsListByReplicatMockTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMapping; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationNetworkMappingsListByReplicatMockTests { - @Test - public void testListByReplicationNetworks() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"state\":\"phifkfrp\",\"primaryNetworkFriendlyName\":\"lubpebrmjjnfpght\",\"primaryNetworkId\":\"tpkimskhnkkhbykr\",\"primaryFabricFriendlyName\":\"hrcmelycpgokuth\",\"recoveryNetworkFriendlyName\":\"ybnzbnvmsh\",\"recoveryNetworkId\":\"zzlapyixlvzc\",\"recoveryFabricArmId\":\"laebxiau\",\"recoveryFabricFriendlyName\":\"uptessjlwjta\",\"fabricSpecificSettings\":{\"instanceType\":\"NetworkMappingFabricSpecificSettings\"}},\"location\":\"blskxgxqa\",\"id\":\"g\",\"name\":\"slkvcvwp\",\"type\":\"l\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.replicationNetworkMappings() - .listByReplicationNetworks("vqbugihcdvfoizo", "bloejzsaxzgkq", "vde", "p", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("phifkfrp", response.iterator().next().properties().state()); - Assertions.assertEquals("lubpebrmjjnfpght", - response.iterator().next().properties().primaryNetworkFriendlyName()); - Assertions.assertEquals("tpkimskhnkkhbykr", response.iterator().next().properties().primaryNetworkId()); - Assertions.assertEquals("hrcmelycpgokuth", response.iterator().next().properties().primaryFabricFriendlyName()); - Assertions.assertEquals("ybnzbnvmsh", response.iterator().next().properties().recoveryNetworkFriendlyName()); - Assertions.assertEquals("zzlapyixlvzc", response.iterator().next().properties().recoveryNetworkId()); - Assertions.assertEquals("laebxiau", response.iterator().next().properties().recoveryFabricArmId()); - Assertions.assertEquals("uptessjlwjta", response.iterator().next().properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("blskxgxqa", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsListMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsListMockTests.java deleted file mode 100644 index 50b3de89023b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworkMappingsListMockTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.NetworkMapping; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationNetworkMappingsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"state\":\"zzkueruwcjomi\",\"primaryNetworkFriendlyName\":\"wkau\",\"primaryNetworkId\":\"twykoxvbw\",\"primaryFabricFriendlyName\":\"xxdplrelfkvga\",\"recoveryNetworkFriendlyName\":\"btuxlbpxrhrfje\",\"recoveryNetworkId\":\"azwef\",\"recoveryFabricArmId\":\"tlhqas\",\"recoveryFabricFriendlyName\":\"ostjixyz\",\"fabricSpecificSettings\":{\"instanceType\":\"NetworkMappingFabricSpecificSettings\"}},\"location\":\"i\",\"id\":\"zzdw\",\"name\":\"tacfvvtdpcbp\",\"type\":\"fomcsau\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.replicationNetworkMappings().list("vphirlzbip", "unnep", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zzkueruwcjomi", response.iterator().next().properties().state()); - Assertions.assertEquals("wkau", response.iterator().next().properties().primaryNetworkFriendlyName()); - Assertions.assertEquals("twykoxvbw", response.iterator().next().properties().primaryNetworkId()); - Assertions.assertEquals("xxdplrelfkvga", response.iterator().next().properties().primaryFabricFriendlyName()); - Assertions.assertEquals("btuxlbpxrhrfje", - response.iterator().next().properties().recoveryNetworkFriendlyName()); - Assertions.assertEquals("azwef", response.iterator().next().properties().recoveryNetworkId()); - Assertions.assertEquals("tlhqas", response.iterator().next().properties().recoveryFabricArmId()); - Assertions.assertEquals("ostjixyz", response.iterator().next().properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("i", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksGetWithResponseMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksGetWithResponseMockTests.java deleted file mode 100644 index 5dd21c44eace..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksGetWithResponseMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Network; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationNetworksGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"fabricType\":\"pgve\",\"subnets\":[{\"name\":\"ujnjgybuxmq\",\"friendlyName\":\"gid\",\"addressList\":[\"njgcp\"]},{\"name\":\"grh\",\"friendlyName\":\"tslgsazuqznghx\",\"addressList\":[\"qzjsdkpvnr\"]},{\"name\":\"wpffxsfybn\",\"friendlyName\":\"vehoh\",\"addressList\":[\"uvbgtzqzqweuy\",\"ybnai\",\"vhpqsvbzeogeatrc\",\"qnvncprfcsjvjn\"]}],\"friendlyName\":\"iznzs\",\"networkType\":\"ibaaugicovjtm\"},\"location\":\"rmjxyvuodnxc\",\"id\":\"bassqfyylwpp\",\"name\":\"ygkbzb\",\"type\":\"o\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Network response = manager.replicationNetworks() - .getWithResponse("lhihqkn", "vkmnbzkopaiil", "cpu", "khquxsy", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("pgve", response.properties().fabricType()); - Assertions.assertEquals("ujnjgybuxmq", response.properties().subnets().get(0).name()); - Assertions.assertEquals("gid", response.properties().subnets().get(0).friendlyName()); - Assertions.assertEquals("njgcp", response.properties().subnets().get(0).addressList().get(0)); - Assertions.assertEquals("iznzs", response.properties().friendlyName()); - Assertions.assertEquals("ibaaugicovjtm", response.properties().networkType()); - Assertions.assertEquals("rmjxyvuodnxc", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksListByReplicationFabrMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksListByReplicationFabrMockTests.java deleted file mode 100644 index 34fe77c3a5c4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksListByReplicationFabrMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Network; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationNetworksListByReplicationFabrMockTests { - @Test - public void testListByReplicationFabrics() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"fabricType\":\"sorch\",\"subnets\":[{\"name\":\"o\",\"friendlyName\":\"yhl\",\"addressList\":[\"vhs\",\"b\",\"pwxslaj\"]},{\"name\":\"fzga\",\"friendlyName\":\"hawkmibuydwi\",\"addressList\":[\"icupdyt\",\"qmiuvjpl\"]},{\"name\":\"ebmhhtuq\",\"friendlyName\":\"xynof\",\"addressList\":[\"bfix\",\"gxebihexhnk\",\"ng\"]},{\"name\":\"cdolrpgupsjlbsmn\",\"friendlyName\":\"fbncuyje\",\"addressList\":[\"nhpplzhcfzxjzi\",\"ucrln\",\"wnuwkkfzzetl\",\"hdyxz\"]}],\"friendlyName\":\"wywjvrlgqpwwlzp\",\"networkType\":\"arcbcdwhslxebaja\"},\"location\":\"n\",\"id\":\"stbdoprwkampyh\",\"name\":\"pbldz\",\"type\":\"iudrcycmwhuzym\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.replicationNetworks() - .listByReplicationFabrics("kdv", "el", "modpe", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("sorch", response.iterator().next().properties().fabricType()); - Assertions.assertEquals("o", response.iterator().next().properties().subnets().get(0).name()); - Assertions.assertEquals("yhl", response.iterator().next().properties().subnets().get(0).friendlyName()); - Assertions.assertEquals("vhs", response.iterator().next().properties().subnets().get(0).addressList().get(0)); - Assertions.assertEquals("wywjvrlgqpwwlzp", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals("arcbcdwhslxebaja", response.iterator().next().properties().networkType()); - Assertions.assertEquals("n", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksListMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksListMockTests.java deleted file mode 100644 index 9721955c3373..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationNetworksListMockTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Network; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationNetworksListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"fabricType\":\"gxqbfkce\",\"subnets\":[{\"name\":\"recjb\",\"friendlyName\":\"wevsfgdrmnszdosm\",\"addressList\":[\"svz\",\"mxtc\",\"ghndae\"]},{\"name\":\"gsulwvgseufigvfj\",\"friendlyName\":\"zkilmciwuh\",\"addressList\":[\"kypy\",\"vljlbzdlby\",\"paxhpz\"]}],\"friendlyName\":\"ov\",\"networkType\":\"wbh\"},\"location\":\"zges\",\"id\":\"hshagpa\",\"name\":\"nezpby\",\"type\":\"yvynpmggqgage\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.replicationNetworks().list("sybxhqvov", "pmhttuvsqjsrvjnq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gxqbfkce", response.iterator().next().properties().fabricType()); - Assertions.assertEquals("recjb", response.iterator().next().properties().subnets().get(0).name()); - Assertions.assertEquals("wevsfgdrmnszdosm", - response.iterator().next().properties().subnets().get(0).friendlyName()); - Assertions.assertEquals("svz", response.iterator().next().properties().subnets().get(0).addressList().get(0)); - Assertions.assertEquals("ov", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals("wbh", response.iterator().next().properties().networkType()); - Assertions.assertEquals("zges", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesCreateMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesCreateMockTests.java deleted file mode 100644 index 83c0df3a081c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesCreateMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreatePolicyInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Policy; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProviderSpecificInput; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationPoliciesCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"gouxnro\",\"providerSpecificDetails\":{\"instanceType\":\"PolicyProviderSpecificDetails\"}},\"location\":\"hesywyw\",\"id\":\"vg\",\"name\":\"o\",\"type\":\"c\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Policy response = manager.replicationPolicies() - .define("pxwwblscrmzqu") - .withExistingVault("vgppp", "ilbdvxlfhlzzgap") - .withProperties( - new CreatePolicyInputProperties().withProviderSpecificInput(new PolicyProviderSpecificInput())) - .create(); - - Assertions.assertEquals("gouxnro", response.properties().friendlyName()); - Assertions.assertEquals("hesywyw", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesGetWithResponseMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesGetWithResponseMockTests.java deleted file mode 100644 index 5623a660d41f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Policy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"sychdcjggcmpncj\",\"providerSpecificDetails\":{\"instanceType\":\"PolicyProviderSpecificDetails\"}},\"location\":\"bnoq\",\"id\":\"owvfxe\",\"name\":\"tzgwjeky\",\"type\":\"irvcpol\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Policy response = manager.replicationPolicies() - .getWithResponse("rs", "vvmrn", "rdijox", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("sychdcjggcmpncj", response.properties().friendlyName()); - Assertions.assertEquals("bnoq", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesListMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesListMockTests.java deleted file mode 100644 index 97c59acd33e3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationPoliciesListMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Policy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationPoliciesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"friendlyName\":\"trvgioguox\",\"providerSpecificDetails\":{\"instanceType\":\"PolicyProviderSpecificDetails\"}},\"location\":\"qo\",\"id\":\"hde\",\"name\":\"mjogxgr\",\"type\":\"gyciwbnqi\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.replicationPolicies().list("u", "riemorszffi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("trvgioguox", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals("qo", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectableItemsGetWithResponMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectableItemsGetWithResponMockTests.java deleted file mode 100644 index e7ce83e9d51f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectableItemsGetWithResponMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectableItem; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationProtectableItemsGetWithResponMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"dahyclxrsidoeb\",\"protectionStatus\":\"poiaffjkrtn\",\"replicationProtectedItemId\":\"evimxmaxcj\",\"recoveryServicesProviderId\":\"itygvdwds\",\"protectionReadinessErrors\":[\"bf\"],\"supportedReplicationProviders\":[\"ozbzchnqekwan\"],\"customDetails\":{\"instanceType\":\"ConfigurationSettings\"}},\"location\":\"urlcydjhtkjs\",\"id\":\"rwiyndurdonkgobx\",\"name\":\"lr\",\"type\":\"olenrswknpdr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ProtectableItem response = manager.replicationProtectableItems() - .getWithResponse("wdalisd", "qngca", "dz", "nloou", "p", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dahyclxrsidoeb", response.properties().friendlyName()); - Assertions.assertEquals("poiaffjkrtn", response.properties().protectionStatus()); - Assertions.assertEquals("evimxmaxcj", response.properties().replicationProtectedItemId()); - Assertions.assertEquals("itygvdwds", response.properties().recoveryServicesProviderId()); - Assertions.assertEquals("bf", response.properties().protectionReadinessErrors().get(0)); - Assertions.assertEquals("ozbzchnqekwan", response.properties().supportedReplicationProviders().get(0)); - Assertions.assertEquals("urlcydjhtkjs", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectableItemsListByReplicaMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectableItemsListByReplicaMockTests.java deleted file mode 100644 index 34cc7a9edfab..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectableItemsListByReplicaMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectableItem; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationProtectableItemsListByReplicaMockTests { - @Test - public void testListByReplicationProtectionContainers() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"friendlyName\":\"mmij\",\"protectionStatus\":\"qfkwnaeikczscymq\",\"replicationProtectedItemId\":\"xgwpq\",\"recoveryServicesProviderId\":\"umz\",\"protectionReadinessErrors\":[\"okez\",\"pe\"],\"supportedReplicationProviders\":[\"fzqnzbflbqmhbiyx\",\"vwe\",\"hag\",\"bbsesea\"],\"customDetails\":{\"instanceType\":\"ConfigurationSettings\"}},\"location\":\"lmsy\",\"id\":\"zdcrolrzesbomphz\",\"name\":\"ymunwjivt\",\"type\":\"uszbdjrdfeuj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.replicationProtectableItems() - .listByReplicationProtectionContainers("qwwuhyqkaaptbs", "vkbcbptwyb", "oc", "u", "plxzbnsshvqnpszb", - "uybutcdzjfjt", "peyxdyuxurxr", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mmij", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals("qfkwnaeikczscymq", response.iterator().next().properties().protectionStatus()); - Assertions.assertEquals("xgwpq", response.iterator().next().properties().replicationProtectedItemId()); - Assertions.assertEquals("umz", response.iterator().next().properties().recoveryServicesProviderId()); - Assertions.assertEquals("okez", response.iterator().next().properties().protectionReadinessErrors().get(0)); - Assertions.assertEquals("fzqnzbflbqmhbiyx", - response.iterator().next().properties().supportedReplicationProviders().get(0)); - Assertions.assertEquals("lmsy", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersCreateMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersCreateMockTests.java deleted file mode 100644 index 9c80ef49d7e3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersCreateMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainer; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderSpecificContainerCreationInput; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationProtectionContainersCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"fabricFriendlyName\":\"ia\",\"friendlyName\":\"twskkfkuyikmxhh\",\"fabricType\":\"xjbjkewriglbqt\",\"protectedItemCount\":1590059701,\"pairingStatus\":\"clflxcjffzw\",\"role\":\"vdef\",\"fabricSpecificDetails\":{\"instanceType\":\"ztpcjptnntqrcjq\"}},\"location\":\"jvnpjrrh\",\"id\":\"gsjbi\",\"name\":\"agwviqehmdqvaoli\",\"type\":\"xdfsfvkjc\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ProtectionContainer response = manager.replicationProtectionContainers() - .define("ntjna") - .withExistingReplicationFabric("dvt", "urmd", "a") - .withProperties(new CreateProtectionContainerInputProperties() - .withProviderSpecificInput(Arrays.asList(new ReplicationProviderSpecificContainerCreationInput(), - new ReplicationProviderSpecificContainerCreationInput()))) - .create(); - - Assertions.assertEquals("ia", response.properties().fabricFriendlyName()); - Assertions.assertEquals("twskkfkuyikmxhh", response.properties().friendlyName()); - Assertions.assertEquals("xjbjkewriglbqt", response.properties().fabricType()); - Assertions.assertEquals(1590059701, response.properties().protectedItemCount()); - Assertions.assertEquals("clflxcjffzw", response.properties().pairingStatus()); - Assertions.assertEquals("vdef", response.properties().role()); - Assertions.assertEquals("jvnpjrrh", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersDiscoverPMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersDiscoverPMockTests.java deleted file mode 100644 index 92d660c5b0c9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersDiscoverPMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiscoverProtectableItemRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiscoverProtectableItemRequestProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationProtectionContainersDiscoverPMockTests { - @Test - public void testDiscoverProtectableItem() throws Exception { - String responseStr - = "{\"properties\":{\"fabricFriendlyName\":\"knfmkc\",\"friendlyName\":\"thdgwuzronodvhzf\",\"fabricType\":\"nwysodcikgxkkzzf\",\"protectedItemCount\":1184745103,\"pairingStatus\":\"kebawnxzsjw\",\"role\":\"ixirgcjfaiw\",\"fabricSpecificDetails\":{\"instanceType\":\"jkakrxifqnffo\"}},\"location\":\"sqtzng\",\"id\":\"bsalewg\",\"name\":\"xcmmhipbvskcitly\",\"type\":\"kwfsaangfgbm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ProtectionContainer response = manager.replicationProtectionContainers() - .discoverProtectableItem("yjjyutomzqlna", "gwiij", "fqiywhxpsb", "pialezay", - new DiscoverProtectableItemRequest() - .withProperties(new DiscoverProtectableItemRequestProperties().withFriendlyName("zudegefxlieg") - .withIpAddress("tosmhssfnwh") - .withOsType("ah")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("knfmkc", response.properties().fabricFriendlyName()); - Assertions.assertEquals("thdgwuzronodvhzf", response.properties().friendlyName()); - Assertions.assertEquals("nwysodcikgxkkzzf", response.properties().fabricType()); - Assertions.assertEquals(1184745103, response.properties().protectedItemCount()); - Assertions.assertEquals("kebawnxzsjw", response.properties().pairingStatus()); - Assertions.assertEquals("ixirgcjfaiw", response.properties().role()); - Assertions.assertEquals("sqtzng", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersGetWithReMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersGetWithReMockTests.java deleted file mode 100644 index 37a3e94f000d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersGetWithReMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationProtectionContainersGetWithReMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"fabricFriendlyName\":\"rwxohl\",\"friendlyName\":\"snj\",\"fabricType\":\"chiypbfhm\",\"protectedItemCount\":1155099338,\"pairingStatus\":\"tqozewbrsrjzgkbr\",\"role\":\"xboufqnnqbjx\",\"fabricSpecificDetails\":{\"instanceType\":\"srerukbuudriz\"}},\"location\":\"wkjxlaaced\",\"id\":\"kq\",\"name\":\"lssybzbev\",\"type\":\"bnrommkiqhypwtm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ProtectionContainer response = manager.replicationProtectionContainers() - .getWithResponse("mwdz", "zlhcu", "x", "qpwwvmbjecfwlbgh", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rwxohl", response.properties().fabricFriendlyName()); - Assertions.assertEquals("snj", response.properties().friendlyName()); - Assertions.assertEquals("chiypbfhm", response.properties().fabricType()); - Assertions.assertEquals(1155099338, response.properties().protectedItemCount()); - Assertions.assertEquals("tqozewbrsrjzgkbr", response.properties().pairingStatus()); - Assertions.assertEquals("xboufqnnqbjx", response.properties().role()); - Assertions.assertEquals("wkjxlaaced", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersListByRepMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersListByRepMockTests.java deleted file mode 100644 index b7dec6daa7ad..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersListByRepMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationProtectionContainersListByRepMockTests { - @Test - public void testListByReplicationFabrics() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"fabricFriendlyName\":\"zcfyzq\",\"friendlyName\":\"qregfurdpagknx\",\"fabricType\":\"ovrgih\",\"protectedItemCount\":474739358,\"pairingStatus\":\"fewvqk\",\"role\":\"jcgeipqxxsdyaf\",\"fabricSpecificDetails\":{\"instanceType\":\"dsmmabh\"}},\"location\":\"lejqzhpvhxp\",\"id\":\"adj\",\"name\":\"eullgfyog\",\"type\":\"qscjpvqerqxk\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.replicationProtectionContainers() - .listByReplicationFabrics("sazdjmofsvpz", "gnywxu", "mlfjymgw", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zcfyzq", response.iterator().next().properties().fabricFriendlyName()); - Assertions.assertEquals("qregfurdpagknx", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals("ovrgih", response.iterator().next().properties().fabricType()); - Assertions.assertEquals(474739358, response.iterator().next().properties().protectedItemCount()); - Assertions.assertEquals("fewvqk", response.iterator().next().properties().pairingStatus()); - Assertions.assertEquals("jcgeipqxxsdyaf", response.iterator().next().properties().role()); - Assertions.assertEquals("lejqzhpvhxp", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersListMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersListMockTests.java deleted file mode 100644 index 6e5b9dfef931..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersListMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationProtectionContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"fabricFriendlyName\":\"w\",\"friendlyName\":\"nbmajvvyxtvvx\",\"fabricType\":\"kzixbk\",\"protectedItemCount\":2007505628,\"pairingStatus\":\"mlngfwhrm\",\"role\":\"a\",\"fabricSpecificDetails\":{\"instanceType\":\"jmwxn\"}},\"location\":\"bl\",\"id\":\"nahhs\",\"name\":\"fndcbsyhlud\",\"type\":\"jkkovohwvprj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.replicationProtectionContainers().list("dexquaw", "xizbfzet", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("w", response.iterator().next().properties().fabricFriendlyName()); - Assertions.assertEquals("nbmajvvyxtvvx", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals("kzixbk", response.iterator().next().properties().fabricType()); - Assertions.assertEquals(2007505628, response.iterator().next().properties().protectedItemCount()); - Assertions.assertEquals("mlngfwhrm", response.iterator().next().properties().pairingStatus()); - Assertions.assertEquals("a", response.iterator().next().properties().role()); - Assertions.assertEquals("bl", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersSwitchProMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersSwitchProMockTests.java deleted file mode 100644 index 5dd672e8e175..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionContainersSwitchProMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainer; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionProviderSpecificInput; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationProtectionContainersSwitchProMockTests { - @Test - public void testSwitchProtection() throws Exception { - String responseStr - = "{\"properties\":{\"fabricFriendlyName\":\"dsqyuddkhwqdm\",\"friendlyName\":\"heuyuunxmyevyi\",\"fabricType\":\"eip\",\"protectedItemCount\":967066475,\"pairingStatus\":\"ejwli\",\"role\":\"cndjzwhajo\",\"fabricSpecificDetails\":{\"instanceType\":\"qokhdyncradxs\"}},\"location\":\"bempf\",\"id\":\"pmqnmelyksygih\",\"name\":\"clmslnunkqvz\",\"type\":\"bbba\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ProtectionContainer response = manager.replicationProtectionContainers() - .switchProtection("vm", "idyli", "ajklnac", "dnxqeonm", - new SwitchProtectionInput().withProperties( - new SwitchProtectionInputProperties().withReplicationProtectedItemName("jaojpzngdrzige") - .withProviderSpecificDetails(new SwitchProtectionProviderSpecificInput())), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dsqyuddkhwqdm", response.properties().fabricFriendlyName()); - Assertions.assertEquals("heuyuunxmyevyi", response.properties().friendlyName()); - Assertions.assertEquals("eip", response.properties().fabricType()); - Assertions.assertEquals(967066475, response.properties().protectedItemCount()); - Assertions.assertEquals("ejwli", response.properties().pairingStatus()); - Assertions.assertEquals("cndjzwhajo", response.properties().role()); - Assertions.assertEquals("bempf", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentCollectionTests.java deleted file mode 100644 index cf6478f5bf25..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentCollectionTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectionIntentInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntentCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntentProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntentProviderSpecificSettings; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationProtectionIntentCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationProtectionIntentCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"friendlyName\":\"dfzantkwcegy\",\"jobId\":\"lbnseqac\",\"jobState\":\"vpilg\",\"isActive\":false,\"creationTimeUTC\":\"jagmdi\",\"providerSpecificDetails\":{\"instanceType\":\"ReplicationProtectionIntentProviderSpecificSettings\"}},\"location\":\"eiookjbsah\",\"id\":\"tdtpdelqacslmo\",\"name\":\"oebn\",\"type\":\"xofvcjk\"},{\"properties\":{\"friendlyName\":\"razftxejwabmdujt\",\"jobId\":\"cope\",\"jobState\":\"m\",\"isActive\":false,\"creationTimeUTC\":\"u\",\"providerSpecificDetails\":{\"instanceType\":\"ReplicationProtectionIntentProviderSpecificSettings\"}},\"location\":\"kyqltqsrogt\",\"id\":\"wkffdjkt\",\"name\":\"ysidfvclgl\",\"type\":\"n\"},{\"properties\":{\"friendlyName\":\"jtkbusqogsfika\",\"jobId\":\"ansharujtjiqxfz\",\"jobState\":\"qttv\",\"isActive\":true,\"creationTimeUTC\":\"hjpenuygbq\",\"providerSpecificDetails\":{\"instanceType\":\"ReplicationProtectionIntentProviderSpecificSettings\"}},\"location\":\"ekewvnqvcdlguauc\",\"id\":\"f\",\"name\":\"jwnlax\",\"type\":\"un\"}],\"nextLink\":\"ikczvvitacgxmf\"}") - .toObject(ReplicationProtectionIntentCollection.class); - Assertions.assertEquals("dfzantkwcegy", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("eiookjbsah", model.value().get(0).location()); - Assertions.assertEquals("ikczvvitacgxmf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationProtectionIntentCollection model - = new ReplicationProtectionIntentCollection().withValue(Arrays.asList( - new ReplicationProtectionIntentInner() - .withProperties(new ReplicationProtectionIntentProperties().withFriendlyName("dfzantkwcegy") - .withProviderSpecificDetails(new ReplicationProtectionIntentProviderSpecificSettings())) - .withLocation("eiookjbsah"), - new ReplicationProtectionIntentInner() - .withProperties(new ReplicationProtectionIntentProperties().withFriendlyName("razftxejwabmdujt") - .withProviderSpecificDetails(new ReplicationProtectionIntentProviderSpecificSettings())) - .withLocation("kyqltqsrogt"), - new ReplicationProtectionIntentInner() - .withProperties(new ReplicationProtectionIntentProperties().withFriendlyName("jtkbusqogsfika") - .withProviderSpecificDetails(new ReplicationProtectionIntentProviderSpecificSettings())) - .withLocation("ekewvnqvcdlguauc"))) - .withNextLink("ikczvvitacgxmf"); - model = BinaryData.fromObject(model).toObject(ReplicationProtectionIntentCollection.class); - Assertions.assertEquals("dfzantkwcegy", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("eiookjbsah", model.value().get(0).location()); - Assertions.assertEquals("ikczvvitacgxmf", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentInnerTests.java deleted file mode 100644 index 3fa9f6a01cd1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentInnerTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationProtectionIntentInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntentProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntentProviderSpecificSettings; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationProtectionIntentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationProtectionIntentInner model = BinaryData.fromString( - "{\"properties\":{\"friendlyName\":\"er\",\"jobId\":\"tvsoxhlwntsj\",\"jobState\":\"rsxypruuu\",\"isActive\":true,\"creationTimeUTC\":\"hrszi\",\"providerSpecificDetails\":{\"instanceType\":\"ReplicationProtectionIntentProviderSpecificSettings\"}},\"location\":\"uelyetndn\",\"id\":\"fqyggagflnlgmtr\",\"name\":\"ahzjmucftb\",\"type\":\"r\"}") - .toObject(ReplicationProtectionIntentInner.class); - Assertions.assertEquals("er", model.properties().friendlyName()); - Assertions.assertEquals("uelyetndn", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationProtectionIntentInner model = new ReplicationProtectionIntentInner() - .withProperties(new ReplicationProtectionIntentProperties().withFriendlyName("er") - .withProviderSpecificDetails(new ReplicationProtectionIntentProviderSpecificSettings())) - .withLocation("uelyetndn"); - model = BinaryData.fromObject(model).toObject(ReplicationProtectionIntentInner.class); - Assertions.assertEquals("er", model.properties().friendlyName()); - Assertions.assertEquals("uelyetndn", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentPropertiesTests.java deleted file mode 100644 index f6d8533c5867..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntentProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntentProviderSpecificSettings; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationProtectionIntentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationProtectionIntentProperties model = BinaryData.fromString( - "{\"friendlyName\":\"rohkpigqfusu\",\"jobId\":\"zmkw\",\"jobState\":\"snoxaxmqeqa\",\"isActive\":true,\"creationTimeUTC\":\"nhg\",\"providerSpecificDetails\":{\"instanceType\":\"ReplicationProtectionIntentProviderSpecificSettings\"}}") - .toObject(ReplicationProtectionIntentProperties.class); - Assertions.assertEquals("rohkpigqfusu", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationProtectionIntentProperties model - = new ReplicationProtectionIntentProperties().withFriendlyName("rohkpigqfusu") - .withProviderSpecificDetails(new ReplicationProtectionIntentProviderSpecificSettings()); - model = BinaryData.fromObject(model).toObject(ReplicationProtectionIntentProperties.class); - Assertions.assertEquals("rohkpigqfusu", model.friendlyName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsCreateWithReMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsCreateWithReMockTests.java deleted file mode 100644 index 5e7b11c5628c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsCreateWithReMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionIntentProviderSpecificDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntent; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationProtectionIntentsCreateWithReMockTests { - @Test - public void testCreateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"txytja\",\"jobId\":\"j\",\"jobState\":\"jlijkk\",\"isActive\":true,\"creationTimeUTC\":\"ehjjirvjqxavqm\",\"providerSpecificDetails\":{\"instanceType\":\"ReplicationProtectionIntentProviderSpecificSettings\"}},\"location\":\"ac\",\"id\":\"sffdralihhssc\",\"name\":\"gyzhcv\",\"type\":\"avyrjlnd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ReplicationProtectionIntent response = manager.replicationProtectionIntents() - .define("amzmzfnt") - .withExistingVault("gvejhmnaph", "skmpeajzzypa") - .withProperties(new CreateProtectionIntentProperties() - .withProviderSpecificDetails(new CreateProtectionIntentProviderSpecificDetails())) - .create(); - - Assertions.assertEquals("txytja", response.properties().friendlyName()); - Assertions.assertEquals("ac", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsGetWithRespoMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsGetWithRespoMockTests.java deleted file mode 100644 index ee455f8191c2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsGetWithRespoMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntent; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationProtectionIntentsGetWithRespoMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"cacwaaqakv\",\"jobId\":\"y\",\"jobState\":\"xra\",\"isActive\":false,\"creationTimeUTC\":\"eqbrcmmdtsh\",\"providerSpecificDetails\":{\"instanceType\":\"ReplicationProtectionIntentProviderSpecificSettings\"}},\"location\":\"xucznb\",\"id\":\"bowr\",\"name\":\"yrnmjw\",\"type\":\"owxqzkk\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ReplicationProtectionIntent response = manager.replicationProtectionIntents() - .getWithResponse("ilzvxotno", "lqcdvhye", "qhxytsq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("cacwaaqakv", response.properties().friendlyName()); - Assertions.assertEquals("xucznb", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsListMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsListMockTests.java deleted file mode 100644 index 5c9d9b883915..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProtectionIntentsListMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectionIntent; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationProtectionIntentsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"friendlyName\":\"mrgm\",\"jobId\":\"gtlhz\",\"jobState\":\"a\",\"isActive\":false,\"creationTimeUTC\":\"iy\",\"providerSpecificDetails\":{\"instanceType\":\"ReplicationProtectionIntentProviderSpecificSettings\"}},\"location\":\"nvzmsvzng\",\"id\":\"eqzhehgvmm\",\"name\":\"oyzgnbnypluz\",\"type\":\"pkfcdfu\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.replicationProtectionIntents() - .list("frzcwuejmxl", "zlnzyrgr", "hchraunjovlx", "tvmvzpni", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mrgm", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals("nvzmsvzng", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProviderContainerUnmappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProviderContainerUnmappingInputTests.java deleted file mode 100644 index 055166a49ada..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProviderContainerUnmappingInputTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderContainerUnmappingInput; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationProviderContainerUnmappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationProviderContainerUnmappingInput model = BinaryData.fromString("{\"instanceType\":\"jvlpjxxkzbr\"}") - .toObject(ReplicationProviderContainerUnmappingInput.class); - Assertions.assertEquals("jvlpjxxkzbr", model.instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationProviderContainerUnmappingInput model - = new ReplicationProviderContainerUnmappingInput().withInstanceType("jvlpjxxkzbr"); - model = BinaryData.fromObject(model).toObject(ReplicationProviderContainerUnmappingInput.class); - Assertions.assertEquals("jvlpjxxkzbr", model.instanceType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProviderSpecificContainerCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProviderSpecificContainerCreationInputTests.java deleted file mode 100644 index 0818dcc1aa4a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProviderSpecificContainerCreationInputTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderSpecificContainerCreationInput; - -public final class ReplicationProviderSpecificContainerCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationProviderSpecificContainerCreationInput model - = BinaryData.fromString("{\"instanceType\":\"ReplicationProviderSpecificContainerCreationInput\"}") - .toObject(ReplicationProviderSpecificContainerCreationInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationProviderSpecificContainerCreationInput model - = new ReplicationProviderSpecificContainerCreationInput(); - model = BinaryData.fromObject(model).toObject(ReplicationProviderSpecificContainerCreationInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProviderSpecificContainerMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProviderSpecificContainerMappingInputTests.java deleted file mode 100644 index 5b5f27aae03f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProviderSpecificContainerMappingInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderSpecificContainerMappingInput; - -public final class ReplicationProviderSpecificContainerMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationProviderSpecificContainerMappingInput model - = BinaryData.fromString("{\"instanceType\":\"ReplicationProviderSpecificContainerMappingInput\"}") - .toObject(ReplicationProviderSpecificContainerMappingInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationProviderSpecificContainerMappingInput model = new ReplicationProviderSpecificContainerMappingInput(); - model = BinaryData.fromObject(model).toObject(ReplicationProviderSpecificContainerMappingInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProviderSpecificSettingsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProviderSpecificSettingsTests.java deleted file mode 100644 index dccdfcc9a764..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationProviderSpecificSettingsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderSpecificSettings; - -public final class ReplicationProviderSpecificSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationProviderSpecificSettings model - = BinaryData.fromString("{\"instanceType\":\"ReplicationProviderSpecificSettings\"}") - .toObject(ReplicationProviderSpecificSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationProviderSpecificSettings model = new ReplicationProviderSpecificSettings(); - model = BinaryData.fromObject(model).toObject(ReplicationProviderSpecificSettings.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansCreateMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansCreateMockTests.java deleted file mode 100644 index a90134631d4d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansCreateMockTests.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateRecoveryPlanInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverDeploymentModel; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanAction; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroup; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificInput; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationRecoveryPlansCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"sfgb\",\"primaryFabricId\":\"tsaz\",\"primaryFabricFriendlyName\":\"cxlubrukhq\",\"recoveryFabricId\":\"oyrbdkgqd\",\"recoveryFabricFriendlyName\":\"vvj\",\"failoverDeploymentModel\":\"jjfexuvsveams\",\"replicationProviders\":[\"uuvhxiohg\",\"mufzuuyszhae\",\"mtyosdpxtsdy\",\"fgefvwgwp\"],\"allowedOperations\":[\"iavwmixaqg\"],\"lastPlannedFailoverTime\":\"2021-09-07T11:23:33Z\",\"lastUnplannedFailoverTime\":\"2021-08-07T10:56:29Z\",\"lastTestFailoverTime\":\"2021-04-15T08:30:28Z\",\"currentScenario\":{\"scenarioName\":\"umlkjsv\",\"jobId\":\"tmlixalphkg\",\"startTime\":\"2021-09-24T23:02:48Z\"},\"currentScenarioStatus\":\"e\",\"currentScenarioStatusDescription\":\"gdj\",\"groups\":[{\"groupType\":\"Shutdown\",\"replicationProtectedItems\":[{},{}],\"startGroupActions\":[{\"actionName\":\"uyrlk\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"i\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"rmrjpjthi\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"sabcylzz\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"etumzenkrd\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ues\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"oibdctjwfeb\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"qqeetsqac\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"czfro\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"raiai\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"wamptldddorz\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jhnxfkffngfpi\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"loi\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"xdbktuqnbcjknrq\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"ku\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"ii\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"inlic\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"moyoioxdwff\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"ke\",\"id\":\"curr\",\"name\":\"uecokyduqzusc\",\"type\":\"lbqv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RecoveryPlan response = manager.replicationRecoveryPlans() - .define("uvqbeyxwrmupzpe") - .withExistingVault("gynsixgzbbnug", "quarb") - .withProperties(new CreateRecoveryPlanInputProperties().withPrimaryFabricId("zbhg") - .withRecoveryFabricId("ajkvwkoc") - .withFailoverDeploymentModel(FailoverDeploymentModel.RESOURCE_MANAGER) - .withGroups(Arrays.asList(new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems( - Arrays.asList(new RecoveryPlanProtectedItem(), new RecoveryPlanProtectedItem(), - new RecoveryPlanProtectedItem(), new RecoveryPlanProtectedItem())) - .withStartGroupActions(Arrays.asList(new RecoveryPlanAction().withActionName("atbgvlp") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("gen") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("akybepsihz") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("ieoymp") - .withFailoverTypes(Arrays.asList()) - .withFailoverDirections(Arrays.asList()) - .withCustomDetails(new RecoveryPlanActionDetails()))))) - .withProviderSpecificInput(Arrays.asList(new RecoveryPlanProviderSpecificInput()))) - .create(); - - Assertions.assertEquals("sfgb", response.properties().friendlyName()); - Assertions.assertEquals("tsaz", response.properties().primaryFabricId()); - Assertions.assertEquals("cxlubrukhq", response.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("oyrbdkgqd", response.properties().recoveryFabricId()); - Assertions.assertEquals("vvj", response.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("jjfexuvsveams", response.properties().failoverDeploymentModel()); - Assertions.assertEquals("uuvhxiohg", response.properties().replicationProviders().get(0)); - Assertions.assertEquals("iavwmixaqg", response.properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-07T11:23:33Z"), - response.properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-07T10:56:29Z"), - response.properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T08:30:28Z"), - response.properties().lastTestFailoverTime()); - Assertions.assertEquals("umlkjsv", response.properties().currentScenario().scenarioName()); - Assertions.assertEquals("tmlixalphkg", response.properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-24T23:02:48Z"), - response.properties().currentScenario().startTime()); - Assertions.assertEquals("e", response.properties().currentScenarioStatus()); - Assertions.assertEquals("gdj", response.properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.SHUTDOWN, response.properties().groups().get(0).groupType()); - Assertions.assertEquals("uyrlk", response.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals("rmrjpjthi", - response.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals("ke", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansFailoverCancelMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansFailoverCancelMockTests.java deleted file mode 100644 index df99d2e0424c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansFailoverCancelMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationRecoveryPlansFailoverCancelMockTests { - @Test - public void testFailoverCancel() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"qnugtcuyuwgnyjdi\",\"primaryFabricId\":\"ticwmlf\",\"primaryFabricFriendlyName\":\"hibfmco\",\"recoveryFabricId\":\"ktuajkufp\",\"recoveryFabricFriendlyName\":\"dgnmei\",\"failoverDeploymentModel\":\"nobbai\",\"replicationProviders\":[\"bfyqz\"],\"allowedOperations\":[\"fo\",\"gvmrkmgifmyzbu\",\"dnhhc\"],\"lastPlannedFailoverTime\":\"2021-02-14T12:12:53Z\",\"lastUnplannedFailoverTime\":\"2021-07-06T10:13:19Z\",\"lastTestFailoverTime\":\"2021-11-17T02:54:07Z\",\"currentScenario\":{\"scenarioName\":\"onhbl\",\"jobId\":\"vcnuqfpz\",\"startTime\":\"2021-03-08T11:13:57Z\"},\"currentScenarioStatus\":\"pcwtwtrchk\",\"currentScenarioStatusDescription\":\"ruawqe\",\"groups\":[{\"groupType\":\"Shutdown\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"xipwqchfpt\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"kkvjjl\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"cu\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{},{},{}],\"startGroupActions\":[{\"actionName\":\"bgumu\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jxxpxxizchmb\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"zgi\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"jkngzfs\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"laybhozlsb\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"fnhbvcntpoe\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ytrsljzmzui\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{},{}],\"startGroupActions\":[{\"actionName\":\"znbppmk\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"lbbnjld\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Shutdown\",\"replicationProtectedItems\":[{},{},{}],\"startGroupActions\":[{\"actionName\":\"nefwle\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"vkya\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"foy\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"zo\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"dyaepre\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"kfalw\",\"id\":\"eechcayvqbeqp\",\"name\":\"cnusnylfhi\",\"type\":\"rjriybfbydrlqllb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RecoveryPlan response = manager.replicationRecoveryPlans() - .failoverCancel("wq", "qcowkendgrc", "ff", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qnugtcuyuwgnyjdi", response.properties().friendlyName()); - Assertions.assertEquals("ticwmlf", response.properties().primaryFabricId()); - Assertions.assertEquals("hibfmco", response.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("ktuajkufp", response.properties().recoveryFabricId()); - Assertions.assertEquals("dgnmei", response.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("nobbai", response.properties().failoverDeploymentModel()); - Assertions.assertEquals("bfyqz", response.properties().replicationProviders().get(0)); - Assertions.assertEquals("fo", response.properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-14T12:12:53Z"), - response.properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-06T10:13:19Z"), - response.properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-17T02:54:07Z"), - response.properties().lastTestFailoverTime()); - Assertions.assertEquals("onhbl", response.properties().currentScenario().scenarioName()); - Assertions.assertEquals("vcnuqfpz", response.properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-08T11:13:57Z"), - response.properties().currentScenario().startTime()); - Assertions.assertEquals("pcwtwtrchk", response.properties().currentScenarioStatus()); - Assertions.assertEquals("ruawqe", response.properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.SHUTDOWN, response.properties().groups().get(0).groupType()); - Assertions.assertEquals("xipwqchfpt", - response.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals("cu", response.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals("kfalw", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansFailoverCommitMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansFailoverCommitMockTests.java deleted file mode 100644 index af7fb718c998..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansFailoverCommitMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationRecoveryPlansFailoverCommitMockTests { - @Test - public void testFailoverCommit() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"bunvnjql\",\"primaryFabricId\":\"qqvcugusqlxlxedt\",\"primaryFabricFriendlyName\":\"wlnvqacbyfisbl\",\"recoveryFabricId\":\"mpuyypaggp\",\"recoveryFabricFriendlyName\":\"hea\",\"failoverDeploymentModel\":\"zwloqrmgdhy\",\"replicationProviders\":[\"vlxtywukhjdspl\",\"itxrrgkwiyoyh\"],\"allowedOperations\":[\"vxcodwkwoytcac\",\"hsizfuewlf\",\"fiikqcdnzsfiu\",\"gne\"],\"lastPlannedFailoverTime\":\"2021-11-17T13:52:52Z\",\"lastUnplannedFailoverTime\":\"2021-06-15T11:57:20Z\",\"lastTestFailoverTime\":\"2021-02-12T22:51:57Z\",\"currentScenario\":{\"scenarioName\":\"zoahovuf\",\"jobId\":\"rxj\",\"startTime\":\"2021-04-08T07:37:54Z\"},\"currentScenarioStatus\":\"rmdwtbrnlsy\",\"currentScenarioStatusDescription\":\"a\",\"groups\":[{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{},{}],\"startGroupActions\":[{\"actionName\":\"tclpphcs\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"mry\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"pan\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"aoiz\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"ngzzxqbgqnzm\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ctbxzj\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"pifpucvb\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ozwbs\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"afzsq\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"pxmiwtkqif\",\"id\":\"vrdukcd\",\"name\":\"zoxlabuxtwgbaws\",\"type\":\"ram\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RecoveryPlan response = manager.replicationRecoveryPlans() - .failoverCommit("fsnqocybrh", "giknrlugseiqb", "oqjfeamzkuxdgpks", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bunvnjql", response.properties().friendlyName()); - Assertions.assertEquals("qqvcugusqlxlxedt", response.properties().primaryFabricId()); - Assertions.assertEquals("wlnvqacbyfisbl", response.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("mpuyypaggp", response.properties().recoveryFabricId()); - Assertions.assertEquals("hea", response.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("zwloqrmgdhy", response.properties().failoverDeploymentModel()); - Assertions.assertEquals("vlxtywukhjdspl", response.properties().replicationProviders().get(0)); - Assertions.assertEquals("vxcodwkwoytcac", response.properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-17T13:52:52Z"), - response.properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-15T11:57:20Z"), - response.properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-12T22:51:57Z"), - response.properties().lastTestFailoverTime()); - Assertions.assertEquals("zoahovuf", response.properties().currentScenario().scenarioName()); - Assertions.assertEquals("rxj", response.properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-08T07:37:54Z"), - response.properties().currentScenario().startTime()); - Assertions.assertEquals("rmdwtbrnlsy", response.properties().currentScenarioStatus()); - Assertions.assertEquals("a", response.properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.BOOT, response.properties().groups().get(0).groupType()); - Assertions.assertEquals("tclpphcs", - response.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals("aoiz", response.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals("pxmiwtkqif", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansGetWithResponseMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansGetWithResponseMockTests.java deleted file mode 100644 index 351013f1e883..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansGetWithResponseMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationRecoveryPlansGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"urnzoytkbe\",\"primaryFabricId\":\"yfenrozoijoxcbpk\",\"primaryFabricFriendlyName\":\"seacbt\",\"recoveryFabricId\":\"dr\",\"recoveryFabricFriendlyName\":\"nhsxwhxrztd\",\"failoverDeploymentModel\":\"r\",\"replicationProviders\":[\"k\"],\"allowedOperations\":[\"ysyajmm\"],\"lastPlannedFailoverTime\":\"2021-05-25T05:51:57Z\",\"lastUnplannedFailoverTime\":\"2021-05-15T00:16:15Z\",\"lastTestFailoverTime\":\"2021-03-10T10:19:04Z\",\"currentScenario\":{\"scenarioName\":\"ufsdbkuxkdiu\",\"jobId\":\"s\",\"startTime\":\"2020-12-22T21:14:43Z\"},\"currentScenarioStatus\":\"kscwbshfihvl\",\"currentScenarioStatusDescription\":\"ceylaulpuexyigxz\",\"groups\":[{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"spgnnd\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"fyhsb\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"hwlvsvs\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ltaprq\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"mvzrkpmonx\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"wfcuhbgftfvqukkm\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"zene\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"pdq\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{},{},{}],\"startGroupActions\":[{\"actionName\":\"qsem\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"hhxlsube\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ztbejrdzwyktd\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"fzwufifnjwjhmj\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"qflk\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"cyk\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"bndnrihpjaxh\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"ejnoignyd\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Shutdown\",\"replicationProtectedItems\":[{},{},{},{}],\"startGroupActions\":[{\"actionName\":\"bnmrmhkipjardvdp\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"gwdxmiael\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"pbie\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"l\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"dvjlpbjszqjfs\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jvaycxrwknsb\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"brzwiypz\",\"id\":\"yhkecebt\",\"name\":\"gv\",\"type\":\"tbsusfd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RecoveryPlan response = manager.replicationRecoveryPlans() - .getWithResponse("voyjdgfkrq", "jrvpakxrdeexw", "juguvnxbo", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("urnzoytkbe", response.properties().friendlyName()); - Assertions.assertEquals("yfenrozoijoxcbpk", response.properties().primaryFabricId()); - Assertions.assertEquals("seacbt", response.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("dr", response.properties().recoveryFabricId()); - Assertions.assertEquals("nhsxwhxrztd", response.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("r", response.properties().failoverDeploymentModel()); - Assertions.assertEquals("k", response.properties().replicationProviders().get(0)); - Assertions.assertEquals("ysyajmm", response.properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-25T05:51:57Z"), - response.properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T00:16:15Z"), - response.properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-10T10:19:04Z"), - response.properties().lastTestFailoverTime()); - Assertions.assertEquals("ufsdbkuxkdiu", response.properties().currentScenario().scenarioName()); - Assertions.assertEquals("s", response.properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-22T21:14:43Z"), - response.properties().currentScenario().startTime()); - Assertions.assertEquals("kscwbshfihvl", response.properties().currentScenarioStatus()); - Assertions.assertEquals("ceylaulpuexyigxz", response.properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.BOOT, response.properties().groups().get(0).groupType()); - Assertions.assertEquals("spgnnd", - response.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals("mvzrkpmonx", - response.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals("brzwiypz", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansListMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansListMockTests.java deleted file mode 100644 index c935fc2483cb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansListMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationRecoveryPlansListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"friendlyName\":\"p\",\"primaryFabricId\":\"u\",\"primaryFabricFriendlyName\":\"ax\",\"recoveryFabricId\":\"j\",\"recoveryFabricFriendlyName\":\"utwe\",\"failoverDeploymentModel\":\"givkteccxfnatntm\",\"replicationProviders\":[\"bqpmfhjik\",\"cnbdq\",\"tghnmelzvrchm\",\"ucgrmwyv\"],\"allowedOperations\":[\"yplgq\",\"qgrbrhhv\",\"pgtipaaoylwh\",\"mkbweasgyp\"],\"lastPlannedFailoverTime\":\"2021-09-01T04:35:06Z\",\"lastUnplannedFailoverTime\":\"2021-07-31T10:34:51Z\",\"lastTestFailoverTime\":\"2021-10-24T03:31:42Z\",\"currentScenario\":{\"scenarioName\":\"ydwqeuwdvcls\",\"jobId\":\"qdchnzib\",\"startTime\":\"2021-03-05T02:41:17Z\"},\"currentScenarioStatus\":\"srwx\",\"currentScenarioStatusDescription\":\"kwargcbgdg\",\"groups\":[{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{},{},{},{}],\"startGroupActions\":[{\"actionName\":\"qwq\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"kmvugflhd\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"oxu\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"nnkvthwtamvmbgy\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"xh\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"muhkezuucqicocd\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"j\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"tutpdwnee\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"my\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"lxug\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"nffaofkvfruxzkfb\",\"id\":\"hgykzovstvymdqa\",\"name\":\"mqm\",\"type\":\"rnzgubqkfnox\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.replicationRecoveryPlans().list("rm", "zvti", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("p", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals("u", response.iterator().next().properties().primaryFabricId()); - Assertions.assertEquals("ax", response.iterator().next().properties().primaryFabricFriendlyName()); - Assertions.assertEquals("j", response.iterator().next().properties().recoveryFabricId()); - Assertions.assertEquals("utwe", response.iterator().next().properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("givkteccxfnatntm", response.iterator().next().properties().failoverDeploymentModel()); - Assertions.assertEquals("bqpmfhjik", response.iterator().next().properties().replicationProviders().get(0)); - Assertions.assertEquals("yplgq", response.iterator().next().properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-01T04:35:06Z"), - response.iterator().next().properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-31T10:34:51Z"), - response.iterator().next().properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-24T03:31:42Z"), - response.iterator().next().properties().lastTestFailoverTime()); - Assertions.assertEquals("ydwqeuwdvcls", - response.iterator().next().properties().currentScenario().scenarioName()); - Assertions.assertEquals("qdchnzib", response.iterator().next().properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-05T02:41:17Z"), - response.iterator().next().properties().currentScenario().startTime()); - Assertions.assertEquals("srwx", response.iterator().next().properties().currentScenarioStatus()); - Assertions.assertEquals("kwargcbgdg", - response.iterator().next().properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.FAILOVER, - response.iterator().next().properties().groups().get(0).groupType()); - Assertions.assertEquals("qwq", - response.iterator().next().properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals("nnkvthwtamvmbgy", - response.iterator().next().properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals("nffaofkvfruxzkfb", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansPlannedFailoverMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansPlannedFailoverMockTests.java deleted file mode 100644 index f5993fc96711..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansPlannedFailoverMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificFailoverInput; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationRecoveryPlansPlannedFailoverMockTests { - @Test - public void testPlannedFailover() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"mcer\",\"primaryFabricId\":\"feiqb\",\"primaryFabricFriendlyName\":\"thzw\",\"recoveryFabricId\":\"pssvnonij\",\"recoveryFabricFriendlyName\":\"cj\",\"failoverDeploymentModel\":\"zjku\",\"replicationProviders\":[\"qqbt\",\"kvocu\"],\"allowedOperations\":[\"lbpwarhwettohg\",\"z\",\"xyvtkzbhizxp\",\"sddmwnfhmju\"],\"lastPlannedFailoverTime\":\"2021-03-26T04:51:04Z\",\"lastUnplannedFailoverTime\":\"2021-01-08T10:12:47Z\",\"lastTestFailoverTime\":\"2021-08-31T12:11:02Z\",\"currentScenario\":{\"scenarioName\":\"lxudhek\",\"jobId\":\"nirmidtvhjc\",\"startTime\":\"2021-06-10T15:34:30Z\"},\"currentScenarioStatus\":\"bqygkxr\",\"currentScenarioStatusDescription\":\"ojlclpumveybodhr\",\"groups\":[{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{},{}],\"startGroupActions\":[{\"actionName\":\"bcumjv\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"gpdxtsaujtco\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jybolqoxupt\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"l\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"mlkwk\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"linvamtykxsz\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ekfxcs\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"ozkt\",\"id\":\"dpcz\",\"name\":\"ohplrgcnbvmhvq\",\"type\":\"kedaxkuyorfj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RecoveryPlan response = manager.replicationRecoveryPlans() - .plannedFailover("sugqcglma", "fzto", "xvqlauu", - new RecoveryPlanPlannedFailoverInput().withProperties(new RecoveryPlanPlannedFailoverInputProperties() - .withFailoverDirection(PossibleOperationsDirections.PRIMARY_TO_RECOVERY) - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanProviderSpecificFailoverInput(), - new RecoveryPlanProviderSpecificFailoverInput(), - new RecoveryPlanProviderSpecificFailoverInput(), - new RecoveryPlanProviderSpecificFailoverInput()))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mcer", response.properties().friendlyName()); - Assertions.assertEquals("feiqb", response.properties().primaryFabricId()); - Assertions.assertEquals("thzw", response.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("pssvnonij", response.properties().recoveryFabricId()); - Assertions.assertEquals("cj", response.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("zjku", response.properties().failoverDeploymentModel()); - Assertions.assertEquals("qqbt", response.properties().replicationProviders().get(0)); - Assertions.assertEquals("lbpwarhwettohg", response.properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-26T04:51:04Z"), - response.properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-08T10:12:47Z"), - response.properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-31T12:11:02Z"), - response.properties().lastTestFailoverTime()); - Assertions.assertEquals("lxudhek", response.properties().currentScenario().scenarioName()); - Assertions.assertEquals("nirmidtvhjc", response.properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-10T15:34:30Z"), - response.properties().currentScenario().startTime()); - Assertions.assertEquals("bqygkxr", response.properties().currentScenarioStatus()); - Assertions.assertEquals("ojlclpumveybodhr", response.properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.BOOT, response.properties().groups().get(0).groupType()); - Assertions.assertEquals("bcumjv", - response.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals("mlkwk", response.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals("ozkt", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansReprotectMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansReprotectMockTests.java deleted file mode 100644 index a480eb90c422..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansReprotectMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationRecoveryPlansReprotectMockTests { - @Test - public void testReprotect() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"pwnyfjcypazwiimd\",\"primaryFabricId\":\"gkooagr\",\"primaryFabricFriendlyName\":\"pamesi\",\"recoveryFabricId\":\"qadewhuwxk\",\"recoveryFabricFriendlyName\":\"iatfamrnaifllxcc\",\"failoverDeploymentModel\":\"kiyfo\",\"replicationProviders\":[\"omy\",\"xgtu\"],\"allowedOperations\":[\"fquzihirqvv\",\"e\"],\"lastPlannedFailoverTime\":\"2021-08-16T07:33:38Z\",\"lastUnplannedFailoverTime\":\"2021-05-16T08:15:32Z\",\"lastTestFailoverTime\":\"2020-12-21T05:22:34Z\",\"currentScenario\":{\"scenarioName\":\"ssgvq\",\"jobId\":\"rxrmhrraqgbbjlv\",\"startTime\":\"2021-10-25T17:42:29Z\"},\"currentScenarioStatus\":\"rxsiyzsyiumtit\",\"currentScenarioStatusDescription\":\"ycfvernnkq\",\"groups\":[{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{},{},{}],\"startGroupActions\":[{\"actionName\":\"igdrqgzetboyz\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"gnmuxp\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"wpcfmgr\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"whzbbdwrjencof\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ii\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"wibdtpljo\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Shutdown\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"bxxcdkhxjwtkftg\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ljuepme\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"pgbmlbxjhgvtepvr\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"nudmakkshrna\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"kwohdig\",\"id\":\"yuo\",\"name\":\"ftsamo\",\"type\":\"wqbak\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RecoveryPlan response - = manager.replicationRecoveryPlans().reprotect("dq", "dawe", "gavfyihu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pwnyfjcypazwiimd", response.properties().friendlyName()); - Assertions.assertEquals("gkooagr", response.properties().primaryFabricId()); - Assertions.assertEquals("pamesi", response.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("qadewhuwxk", response.properties().recoveryFabricId()); - Assertions.assertEquals("iatfamrnaifllxcc", response.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("kiyfo", response.properties().failoverDeploymentModel()); - Assertions.assertEquals("omy", response.properties().replicationProviders().get(0)); - Assertions.assertEquals("fquzihirqvv", response.properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-16T07:33:38Z"), - response.properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T08:15:32Z"), - response.properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-21T05:22:34Z"), - response.properties().lastTestFailoverTime()); - Assertions.assertEquals("ssgvq", response.properties().currentScenario().scenarioName()); - Assertions.assertEquals("rxrmhrraqgbbjlv", response.properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-25T17:42:29Z"), - response.properties().currentScenario().startTime()); - Assertions.assertEquals("rxsiyzsyiumtit", response.properties().currentScenarioStatus()); - Assertions.assertEquals("ycfvernnkq", response.properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.BOOT, response.properties().groups().get(0).groupType()); - Assertions.assertEquals("igdrqgzetboyz", - response.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals("whzbbdwrjencof", - response.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals("kwohdig", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansTestFailoverCleaMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansTestFailoverCleaMockTests.java deleted file mode 100644 index 2c8c6665fe27..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansTestFailoverCleaMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInputProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationRecoveryPlansTestFailoverCleaMockTests { - @Test - public void testTestFailoverCleanup() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"lbiqq\",\"primaryFabricId\":\"arxknfvbsym\",\"primaryFabricFriendlyName\":\"bahdbtjm\",\"recoveryFabricId\":\"zonrklbizrxh\",\"recoveryFabricFriendlyName\":\"fvpanloqovvcxgq\",\"failoverDeploymentModel\":\"uirgopgzatucu\",\"replicationProviders\":[\"uzvyjxuxchquoqhq\",\"csksxqf\",\"lrvuvdagv\"],\"allowedOperations\":[\"d\"],\"lastPlannedFailoverTime\":\"2021-04-28T08:18:31Z\",\"lastUnplannedFailoverTime\":\"2021-02-19T21:32:29Z\",\"lastTestFailoverTime\":\"2020-12-25T04:39:30Z\",\"currentScenario\":{\"scenarioName\":\"odiijcsapqhip\",\"jobId\":\"snivnmevljbcu\",\"startTime\":\"2021-08-10T00:42:25Z\"},\"currentScenarioStatus\":\"pjf\",\"currentScenarioStatusDescription\":\"wkseodvlmd\",\"groups\":[{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{},{},{}],\"startGroupActions\":[{\"actionName\":\"u\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"yg\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"bmum\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jvvcrsmwojm\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"wcvumnrut\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"f\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"vltjo\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"vpkbz\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"tnowpajfhxsmu\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"dzglmuuzpsuhsyp\",\"id\":\"muldhfr\",\"name\":\"rkqpyfjxkby\",\"type\":\"sbuqfm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RecoveryPlan response = manager.replicationRecoveryPlans() - .testFailoverCleanup("p", "addpxqrxipe", "rplf", - new RecoveryPlanTestFailoverCleanupInput() - .withProperties(new RecoveryPlanTestFailoverCleanupInputProperties().withComments("vmjjfz")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lbiqq", response.properties().friendlyName()); - Assertions.assertEquals("arxknfvbsym", response.properties().primaryFabricId()); - Assertions.assertEquals("bahdbtjm", response.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("zonrklbizrxh", response.properties().recoveryFabricId()); - Assertions.assertEquals("fvpanloqovvcxgq", response.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("uirgopgzatucu", response.properties().failoverDeploymentModel()); - Assertions.assertEquals("uzvyjxuxchquoqhq", response.properties().replicationProviders().get(0)); - Assertions.assertEquals("d", response.properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-28T08:18:31Z"), - response.properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-19T21:32:29Z"), - response.properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-25T04:39:30Z"), - response.properties().lastTestFailoverTime()); - Assertions.assertEquals("odiijcsapqhip", response.properties().currentScenario().scenarioName()); - Assertions.assertEquals("snivnmevljbcu", response.properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-10T00:42:25Z"), - response.properties().currentScenario().startTime()); - Assertions.assertEquals("pjf", response.properties().currentScenarioStatus()); - Assertions.assertEquals("wkseodvlmd", response.properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.FAILOVER, response.properties().groups().get(0).groupType()); - Assertions.assertEquals("u", response.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals("yg", response.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals("dzglmuuzpsuhsyp", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansTestFailoverMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansTestFailoverMockTests.java deleted file mode 100644 index 3f2a80c28631..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansTestFailoverMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInputProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationRecoveryPlansTestFailoverMockTests { - @Test - public void testTestFailover() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"pmdmwiwevves\",\"primaryFabricId\":\"hh\",\"primaryFabricFriendlyName\":\"qhdldargkwimtcce\",\"recoveryFabricId\":\"uqu\",\"recoveryFabricFriendlyName\":\"czzc\",\"failoverDeploymentModel\":\"wxvbkirgknhfw\",\"replicationProviders\":[\"wdajyd\",\"bjgipvspe\"],\"allowedOperations\":[\"hydtkbmt\",\"sd\"],\"lastPlannedFailoverTime\":\"2021-02-01T04:36:15Z\",\"lastUnplannedFailoverTime\":\"2021-10-07T22:01:48Z\",\"lastTestFailoverTime\":\"2021-11-11T09:35:50Z\",\"currentScenario\":{\"scenarioName\":\"mawo\",\"jobId\":\"cnev\",\"startTime\":\"2021-09-22T15:27:40Z\"},\"currentScenarioStatus\":\"b\",\"currentScenarioStatusDescription\":\"sclwbjgi\",\"groups\":[{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"weofvsxauphzefi\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"eyydx\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"gtiivzkd\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"exccwldgfq\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"mwtacrscfcn\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{},{}],\"startGroupActions\":[{\"actionName\":\"llmfwfpo\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"oszzw\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"xvchmubyguqh\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"nmsvj\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"grpry\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ircbajxjrbvyr\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"atxkznlwlmbx\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"gkev\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ay\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"x\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{}],\"startGroupActions\":[{\"actionName\":\"zgrgkja\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"waezplybspsbomt\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"epzimfc\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"suiwexpasckpg\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"mlyxbwslx\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"toejtqv\",\"id\":\"ctm\",\"name\":\"idkxz\",\"type\":\"oluznt\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RecoveryPlan response = manager.replicationRecoveryPlans() - .testFailover("vxerowuzvrnnbeg", "af", "onmtoj", - new RecoveryPlanTestFailoverInput().withProperties(new RecoveryPlanTestFailoverInputProperties() - .withFailoverDirection(PossibleOperationsDirections.PRIMARY_TO_RECOVERY) - .withNetworkType("dofmazhk") - .withNetworkId("sjknaq") - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanProviderSpecificFailoverInput(), - new RecoveryPlanProviderSpecificFailoverInput()))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pmdmwiwevves", response.properties().friendlyName()); - Assertions.assertEquals("hh", response.properties().primaryFabricId()); - Assertions.assertEquals("qhdldargkwimtcce", response.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("uqu", response.properties().recoveryFabricId()); - Assertions.assertEquals("czzc", response.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("wxvbkirgknhfw", response.properties().failoverDeploymentModel()); - Assertions.assertEquals("wdajyd", response.properties().replicationProviders().get(0)); - Assertions.assertEquals("hydtkbmt", response.properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-01T04:36:15Z"), - response.properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-07T22:01:48Z"), - response.properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-11T09:35:50Z"), - response.properties().lastTestFailoverTime()); - Assertions.assertEquals("mawo", response.properties().currentScenario().scenarioName()); - Assertions.assertEquals("cnev", response.properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-22T15:27:40Z"), - response.properties().currentScenario().startTime()); - Assertions.assertEquals("b", response.properties().currentScenarioStatus()); - Assertions.assertEquals("sclwbjgi", response.properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.BOOT, response.properties().groups().get(0).groupType()); - Assertions.assertEquals("weofvsxauphzefi", - response.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals("mwtacrscfcn", - response.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals("toejtqv", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansUnplannedFailoverMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansUnplannedFailoverMockTests.java deleted file mode 100644 index 6bef33311493..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationRecoveryPlansUnplannedFailoverMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlan; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProviderSpecificFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SourceSiteOperations; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationRecoveryPlansUnplannedFailoverMockTests { - @Test - public void testUnplannedFailover() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"ikh\",\"primaryFabricId\":\"thypepxshmrd\",\"primaryFabricFriendlyName\":\"csdvkymktc\",\"recoveryFabricId\":\"ivoxgzegnglafnf\",\"recoveryFabricFriendlyName\":\"zaghddc\",\"failoverDeploymentModel\":\"wxuxor\",\"replicationProviders\":[\"uhvemgxlss\",\"lqypvwxl\"],\"allowedOperations\":[\"vrkqv\",\"vgdojcvzfcmxmjp\"],\"lastPlannedFailoverTime\":\"2021-11-18T03:57:06Z\",\"lastUnplannedFailoverTime\":\"2021-01-12T06:14:49Z\",\"lastTestFailoverTime\":\"2021-06-13T19:20:39Z\",\"currentScenario\":{\"scenarioName\":\"ocgquqx\",\"jobId\":\"xp\",\"startTime\":\"2021-08-14T00:33Z\"},\"currentScenarioStatus\":\"qniiontqikdipk\",\"currentScenarioStatusDescription\":\"qkuzabrsoihataj\",\"groups\":[{\"groupType\":\"Shutdown\",\"replicationProtectedItems\":[{},{}],\"startGroupActions\":[{\"actionName\":\"ssxylsu\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"oadoh\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jyiehkxgfuzqqnz\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"xqds\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ipdnl\",\"failoverTypes\":[],\"failoverDirections\":[],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}],\"providerSpecificDetails\":[{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"},{\"instanceType\":\"RecoveryPlanProviderSpecificDetails\"}]},\"location\":\"f\",\"id\":\"pwwgzeylzp\",\"name\":\"imxacrkt\",\"type\":\"o\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RecoveryPlan response = manager.replicationRecoveryPlans() - .unplannedFailover("bdjkmnxsggnow", "hyvdbrdvsv", "hbtyc", - new RecoveryPlanUnplannedFailoverInput() - .withProperties(new RecoveryPlanUnplannedFailoverInputProperties() - .withFailoverDirection(PossibleOperationsDirections.PRIMARY_TO_RECOVERY) - .withSourceSiteOperations(SourceSiteOperations.REQUIRED) - .withProviderSpecificDetails(Arrays.asList(new RecoveryPlanProviderSpecificFailoverInput(), - new RecoveryPlanProviderSpecificFailoverInput()))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ikh", response.properties().friendlyName()); - Assertions.assertEquals("thypepxshmrd", response.properties().primaryFabricId()); - Assertions.assertEquals("csdvkymktc", response.properties().primaryFabricFriendlyName()); - Assertions.assertEquals("ivoxgzegnglafnf", response.properties().recoveryFabricId()); - Assertions.assertEquals("zaghddc", response.properties().recoveryFabricFriendlyName()); - Assertions.assertEquals("wxuxor", response.properties().failoverDeploymentModel()); - Assertions.assertEquals("uhvemgxlss", response.properties().replicationProviders().get(0)); - Assertions.assertEquals("vrkqv", response.properties().allowedOperations().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T03:57:06Z"), - response.properties().lastPlannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-12T06:14:49Z"), - response.properties().lastUnplannedFailoverTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-13T19:20:39Z"), - response.properties().lastTestFailoverTime()); - Assertions.assertEquals("ocgquqx", response.properties().currentScenario().scenarioName()); - Assertions.assertEquals("xp", response.properties().currentScenario().jobId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-14T00:33Z"), - response.properties().currentScenario().startTime()); - Assertions.assertEquals("qniiontqikdipk", response.properties().currentScenarioStatus()); - Assertions.assertEquals("qkuzabrsoihataj", response.properties().currentScenarioStatusDescription()); - Assertions.assertEquals(RecoveryPlanGroupType.SHUTDOWN, response.properties().groups().get(0).groupType()); - Assertions.assertEquals("ssxylsu", - response.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals("xqds", response.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals("f", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingsCreateMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingsCreateMockTests.java deleted file mode 100644 index 7b25273a7720..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingsCreateMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSetting; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingCreationInputProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationVaultSettingsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"migrationSolutionId\":\"inrufq\",\"vmwareToAzureProviderType\":\"uygasfmhb\"},\"location\":\"ewk\",\"id\":\"natxvuzccaliry\",\"name\":\"ytc\",\"type\":\"qpjohlcbn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VaultSetting response = manager.replicationVaultSettings() - .define("mwaxsymnrtv") - .withExistingVault("zrkrztpyay", "hxl") - .withProperties(new VaultSettingCreationInputProperties().withMigrationSolutionId("imavyotpcvpahh") - .withVmwareToAzureProviderType("vyqpvzxxzndw")) - .create(); - - Assertions.assertEquals("inrufq", response.properties().migrationSolutionId()); - Assertions.assertEquals("uygasfmhb", response.properties().vmwareToAzureProviderType()); - Assertions.assertEquals("ewk", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingsGetWithResponseMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingsGetWithResponseMockTests.java deleted file mode 100644 index cfdc38fd4286..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingsGetWithResponseMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSetting; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationVaultSettingsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"migrationSolutionId\":\"z\",\"vmwareToAzureProviderType\":\"jebmuiong\"},\"location\":\"dwohoeashuxf\",\"id\":\"bjimzwynsmmp\",\"name\":\"vkyezwsey\",\"type\":\"oyjmjwqdslqreo\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VaultSetting response = manager.replicationVaultSettings() - .getWithResponse("cidcfwoolkugzow", "mmixfzaupgblna", "jnpahzhpqscuyil", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("z", response.properties().migrationSolutionId()); - Assertions.assertEquals("jebmuiong", response.properties().vmwareToAzureProviderType()); - Assertions.assertEquals("dwohoeashuxf", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingsListMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingsListMockTests.java deleted file mode 100644 index a9dc67f9111d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReplicationVaultSettingsListMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSetting; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicationVaultSettingsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"migrationSolutionId\":\"dvwojvx\",\"vmwareToAzureProviderType\":\"vhrqxrqghot\"},\"location\":\"gzickgygaw\",\"id\":\"hpwmdkyfgye\",\"name\":\"vyhvv\",\"type\":\"uqyrpubbk\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.replicationVaultSettings() - .list("jkhcoscoljjhcs", "zooefzsdttbq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dvwojvx", response.iterator().next().properties().migrationSolutionId()); - Assertions.assertEquals("vhrqxrqghot", response.iterator().next().properties().vmwareToAzureProviderType()); - Assertions.assertEquals("gzickgygaw", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResolveHealthErrorTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResolveHealthErrorTests.java deleted file mode 100644 index 247585cc3647..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResolveHealthErrorTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthError; -import org.junit.jupiter.api.Assertions; - -public final class ResolveHealthErrorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResolveHealthError model - = BinaryData.fromString("{\"healthErrorId\":\"txifqj\"}").toObject(ResolveHealthError.class); - Assertions.assertEquals("txifqj", model.healthErrorId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResolveHealthError model = new ResolveHealthError().withHealthErrorId("txifqj"); - model = BinaryData.fromObject(model).toObject(ResolveHealthError.class); - Assertions.assertEquals("txifqj", model.healthErrorId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResolveHealthInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResolveHealthInputPropertiesTests.java deleted file mode 100644 index c99a24e8fb01..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResolveHealthInputPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthError; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthInputProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResolveHealthInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResolveHealthInputProperties model = BinaryData - .fromString("{\"healthErrors\":[{\"healthErrorId\":\"vpa\"},{\"healthErrorId\":\"sreuzvxurisjnh\"}]}") - .toObject(ResolveHealthInputProperties.class); - Assertions.assertEquals("vpa", model.healthErrors().get(0).healthErrorId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResolveHealthInputProperties model = new ResolveHealthInputProperties() - .withHealthErrors(Arrays.asList(new ResolveHealthError().withHealthErrorId("vpa"), - new ResolveHealthError().withHealthErrorId("sreuzvxurisjnh"))); - model = BinaryData.fromObject(model).toObject(ResolveHealthInputProperties.class); - Assertions.assertEquals("vpa", model.healthErrors().get(0).healthErrorId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResolveHealthInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResolveHealthInputTests.java deleted file mode 100644 index 3191711f612c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResolveHealthInputTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthError; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResolveHealthInputProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResolveHealthInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResolveHealthInput model = BinaryData.fromString( - "{\"properties\":{\"healthErrors\":[{\"healthErrorId\":\"oftpipiwycz\"},{\"healthErrorId\":\"xacpqjli\"},{\"healthErrorId\":\"yuspskas\"},{\"healthErrorId\":\"lmfwdgzx\"}]}}") - .toObject(ResolveHealthInput.class); - Assertions.assertEquals("oftpipiwycz", model.properties().healthErrors().get(0).healthErrorId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResolveHealthInput model = new ResolveHealthInput().withProperties(new ResolveHealthInputProperties() - .withHealthErrors(Arrays.asList(new ResolveHealthError().withHealthErrorId("oftpipiwycz"), - new ResolveHealthError().withHealthErrorId("xacpqjli"), - new ResolveHealthError().withHealthErrorId("yuspskas"), - new ResolveHealthError().withHealthErrorId("lmfwdgzx")))); - model = BinaryData.fromObject(model).toObject(ResolveHealthInput.class); - Assertions.assertEquals("oftpipiwycz", model.properties().healthErrors().get(0).healthErrorId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeJobParamsPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeJobParamsPropertiesTests.java deleted file mode 100644 index 96842d5571dd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeJobParamsPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeJobParamsProperties; -import org.junit.jupiter.api.Assertions; - -public final class ResumeJobParamsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResumeJobParamsProperties model - = BinaryData.fromString("{\"comments\":\"snewmozqvbub\"}").toObject(ResumeJobParamsProperties.class); - Assertions.assertEquals("snewmozqvbub", model.comments()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResumeJobParamsProperties model = new ResumeJobParamsProperties().withComments("snewmozqvbub"); - model = BinaryData.fromObject(model).toObject(ResumeJobParamsProperties.class); - Assertions.assertEquals("snewmozqvbub", model.comments()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeJobParamsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeJobParamsTests.java deleted file mode 100644 index 29b0381d536b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeJobParamsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeJobParams; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeJobParamsProperties; -import org.junit.jupiter.api.Assertions; - -public final class ResumeJobParamsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResumeJobParams model - = BinaryData.fromString("{\"properties\":{\"comments\":\"hx\"}}").toObject(ResumeJobParams.class); - Assertions.assertEquals("hx", model.properties().comments()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResumeJobParams model - = new ResumeJobParams().withProperties(new ResumeJobParamsProperties().withComments("hx")); - model = BinaryData.fromObject(model).toObject(ResumeJobParams.class); - Assertions.assertEquals("hx", model.properties().comments()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeReplicationInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeReplicationInputPropertiesTests.java deleted file mode 100644 index cf1a05995018..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeReplicationInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeReplicationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeReplicationProviderSpecificInput; - -public final class ResumeReplicationInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResumeReplicationInputProperties model = BinaryData - .fromString("{\"providerSpecificDetails\":{\"instanceType\":\"ResumeReplicationProviderSpecificInput\"}}") - .toObject(ResumeReplicationInputProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResumeReplicationInputProperties model = new ResumeReplicationInputProperties() - .withProviderSpecificDetails(new ResumeReplicationProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(ResumeReplicationInputProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeReplicationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeReplicationInputTests.java deleted file mode 100644 index 41b1e07449fc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeReplicationInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeReplicationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeReplicationProviderSpecificInput; - -public final class ResumeReplicationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResumeReplicationInput model = BinaryData.fromString( - "{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"ResumeReplicationProviderSpecificInput\"}}}") - .toObject(ResumeReplicationInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResumeReplicationInput model - = new ResumeReplicationInput().withProperties(new ResumeReplicationInputProperties() - .withProviderSpecificDetails(new ResumeReplicationProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(ResumeReplicationInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeReplicationProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeReplicationProviderSpecificInputTests.java deleted file mode 100644 index d650e136aa2e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResumeReplicationProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResumeReplicationProviderSpecificInput; - -public final class ResumeReplicationProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResumeReplicationProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"ResumeReplicationProviderSpecificInput\"}") - .toObject(ResumeReplicationProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResumeReplicationProviderSpecificInput model = new ResumeReplicationProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(ResumeReplicationProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResyncInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResyncInputPropertiesTests.java deleted file mode 100644 index fa405b2436a3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResyncInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResyncInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResyncProviderSpecificInput; - -public final class ResyncInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResyncInputProperties model - = BinaryData.fromString("{\"providerSpecificDetails\":{\"instanceType\":\"ResyncProviderSpecificInput\"}}") - .toObject(ResyncInputProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResyncInputProperties model - = new ResyncInputProperties().withProviderSpecificDetails(new ResyncProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(ResyncInputProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResyncInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResyncInputTests.java deleted file mode 100644 index aa4a59f6597b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResyncInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResyncInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResyncInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResyncProviderSpecificInput; - -public final class ResyncInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResyncInput model = BinaryData - .fromString( - "{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"ResyncProviderSpecificInput\"}}}") - .toObject(ResyncInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResyncInput model = new ResyncInput() - .withProperties(new ResyncInputProperties().withProviderSpecificDetails(new ResyncProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(ResyncInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResyncProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResyncProviderSpecificInputTests.java deleted file mode 100644 index 37b0bfde6af7..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ResyncProviderSpecificInputTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ResyncProviderSpecificInput; - -public final class ResyncProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResyncProviderSpecificInput model = BinaryData.fromString("{\"instanceType\":\"ResyncProviderSpecificInput\"}") - .toObject(ResyncProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResyncProviderSpecificInput model = new ResyncProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(ResyncProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RetentionVolumeTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RetentionVolumeTests.java deleted file mode 100644 index 19a1a2d04ecb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RetentionVolumeTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RetentionVolume; -import org.junit.jupiter.api.Assertions; - -public final class RetentionVolumeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RetentionVolume model = BinaryData.fromString( - "{\"volumeName\":\"pqsdoc\",\"capacityInBytes\":3488715345246036434,\"freeSpaceInBytes\":3180098480061688390,\"thresholdPercentage\":1205622455}") - .toObject(RetentionVolume.class); - Assertions.assertEquals("pqsdoc", model.volumeName()); - Assertions.assertEquals(3488715345246036434L, model.capacityInBytes()); - Assertions.assertEquals(3180098480061688390L, model.freeSpaceInBytes()); - Assertions.assertEquals(1205622455, model.thresholdPercentage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RetentionVolume model = new RetentionVolume().withVolumeName("pqsdoc") - .withCapacityInBytes(3488715345246036434L) - .withFreeSpaceInBytes(3180098480061688390L) - .withThresholdPercentage(1205622455); - model = BinaryData.fromObject(model).toObject(RetentionVolume.class); - Assertions.assertEquals("pqsdoc", model.volumeName()); - Assertions.assertEquals(3488715345246036434L, model.capacityInBytes()); - Assertions.assertEquals(3180098480061688390L, model.freeSpaceInBytes()); - Assertions.assertEquals(1205622455, model.thresholdPercentage()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReverseReplicationInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReverseReplicationInputPropertiesTests.java deleted file mode 100644 index ed547af810d9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReverseReplicationInputPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReverseReplicationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReverseReplicationProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class ReverseReplicationInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReverseReplicationInputProperties model = BinaryData.fromString( - "{\"failoverDirection\":\"otmrfhir\",\"providerSpecificDetails\":{\"instanceType\":\"ReverseReplicationProviderSpecificInput\"}}") - .toObject(ReverseReplicationInputProperties.class); - Assertions.assertEquals("otmrfhir", model.failoverDirection()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReverseReplicationInputProperties model - = new ReverseReplicationInputProperties().withFailoverDirection("otmrfhir") - .withProviderSpecificDetails(new ReverseReplicationProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(ReverseReplicationInputProperties.class); - Assertions.assertEquals("otmrfhir", model.failoverDirection()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReverseReplicationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReverseReplicationInputTests.java deleted file mode 100644 index 256806c9ea9b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReverseReplicationInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReverseReplicationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReverseReplicationInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReverseReplicationProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class ReverseReplicationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReverseReplicationInput model = BinaryData.fromString( - "{\"properties\":{\"failoverDirection\":\"aojfm\",\"providerSpecificDetails\":{\"instanceType\":\"ReverseReplicationProviderSpecificInput\"}}}") - .toObject(ReverseReplicationInput.class); - Assertions.assertEquals("aojfm", model.properties().failoverDirection()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReverseReplicationInput model = new ReverseReplicationInput() - .withProperties(new ReverseReplicationInputProperties().withFailoverDirection("aojfm") - .withProviderSpecificDetails(new ReverseReplicationProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(ReverseReplicationInput.class); - Assertions.assertEquals("aojfm", model.properties().failoverDirection()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReverseReplicationProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReverseReplicationProviderSpecificInputTests.java deleted file mode 100644 index ae899aff3d8f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ReverseReplicationProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReverseReplicationProviderSpecificInput; - -public final class ReverseReplicationProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReverseReplicationProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"ReverseReplicationProviderSpecificInput\"}") - .toObject(ReverseReplicationProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReverseReplicationProviderSpecificInput model = new ReverseReplicationProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(ReverseReplicationProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RunAsAccountTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RunAsAccountTests.java deleted file mode 100644 index ca08eb2dcc02..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/RunAsAccountTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RunAsAccount; -import org.junit.jupiter.api.Assertions; - -public final class RunAsAccountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RunAsAccount model = BinaryData.fromString("{\"accountId\":\"iploisjkzsoxznnt\",\"accountName\":\"kvyohpsap\"}") - .toObject(RunAsAccount.class); - Assertions.assertEquals("iploisjkzsoxznnt", model.accountId()); - Assertions.assertEquals("kvyohpsap", model.accountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RunAsAccount model = new RunAsAccount().withAccountId("iploisjkzsoxznnt").withAccountName("kvyohpsap"); - model = BinaryData.fromObject(model).toObject(RunAsAccount.class); - Assertions.assertEquals("iploisjkzsoxznnt", model.accountId()); - Assertions.assertEquals("kvyohpsap", model.accountName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ScriptActionTaskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ScriptActionTaskDetailsTests.java deleted file mode 100644 index 649192d74ba6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/ScriptActionTaskDetailsTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ScriptActionTaskDetails; -import org.junit.jupiter.api.Assertions; - -public final class ScriptActionTaskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptActionTaskDetails model = BinaryData.fromString( - "{\"instanceType\":\"ScriptActionTaskDetails\",\"name\":\"pzwwytbdjzgh\",\"path\":\"mkgfmxpqkjnp\",\"output\":\"iwntotcxmmqmts\",\"isPrimarySideScript\":true}") - .toObject(ScriptActionTaskDetails.class); - Assertions.assertEquals("pzwwytbdjzgh", model.name()); - Assertions.assertEquals("mkgfmxpqkjnp", model.path()); - Assertions.assertEquals("iwntotcxmmqmts", model.output()); - Assertions.assertEquals(true, model.isPrimarySideScript()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptActionTaskDetails model = new ScriptActionTaskDetails().withName("pzwwytbdjzgh") - .withPath("mkgfmxpqkjnp") - .withOutput("iwntotcxmmqmts") - .withIsPrimarySideScript(true); - model = BinaryData.fromObject(model).toObject(ScriptActionTaskDetails.class); - Assertions.assertEquals("pzwwytbdjzgh", model.name()); - Assertions.assertEquals("mkgfmxpqkjnp", model.path()); - Assertions.assertEquals("iwntotcxmmqmts", model.output()); - Assertions.assertEquals(true, model.isPrimarySideScript()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageAccountCustomDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageAccountCustomDetailsTests.java deleted file mode 100644 index c33ef504b09a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageAccountCustomDetailsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageAccountCustomDetails; - -public final class StorageAccountCustomDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageAccountCustomDetails model = BinaryData.fromString("{\"resourceType\":\"StorageAccountCustomDetails\"}") - .toObject(StorageAccountCustomDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageAccountCustomDetails model = new StorageAccountCustomDetails(); - model = BinaryData.fromObject(model).toObject(StorageAccountCustomDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationCollectionTests.java deleted file mode 100644 index 2f8a4950330d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationCollectionTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class StorageClassificationCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageClassificationCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"friendlyName\":\"zjcjbtr\"},\"location\":\"ehvvib\",\"id\":\"xjjs\",\"name\":\"oqbeitpkxzt\",\"type\":\"oobklftidgfcwq\"}],\"nextLink\":\"imaq\"}") - .toObject(StorageClassificationCollection.class); - Assertions.assertEquals("zjcjbtr", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("ehvvib", model.value().get(0).location()); - Assertions.assertEquals("imaq", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageClassificationCollection model - = new StorageClassificationCollection().withValue(Arrays.asList(new StorageClassificationInner() - .withProperties(new StorageClassificationProperties().withFriendlyName("zjcjbtr")) - .withLocation("ehvvib"))).withNextLink("imaq"); - model = BinaryData.fromObject(model).toObject(StorageClassificationCollection.class); - Assertions.assertEquals("zjcjbtr", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals("ehvvib", model.value().get(0).location()); - Assertions.assertEquals("imaq", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationInnerTests.java deleted file mode 100644 index a5c670689474..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationInnerTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationProperties; -import org.junit.jupiter.api.Assertions; - -public final class StorageClassificationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageClassificationInner model = BinaryData.fromString( - "{\"properties\":{\"friendlyName\":\"em\"},\"location\":\"h\",\"id\":\"hujswtwkozzwcul\",\"name\":\"bawpfajnjwltlwt\",\"type\":\"j\"}") - .toObject(StorageClassificationInner.class); - Assertions.assertEquals("em", model.properties().friendlyName()); - Assertions.assertEquals("h", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageClassificationInner model = new StorageClassificationInner() - .withProperties(new StorageClassificationProperties().withFriendlyName("em")) - .withLocation("h"); - model = BinaryData.fromObject(model).toObject(StorageClassificationInner.class); - Assertions.assertEquals("em", model.properties().friendlyName()); - Assertions.assertEquals("h", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingCollectionTests.java deleted file mode 100644 index 81b5db0d4094..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingCollectionTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappingCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappingProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class StorageClassificationMappingCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageClassificationMappingCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"targetStorageClassificationId\":\"mlnwiaaomylweazu\"},\"location\":\"sethwwn\",\"id\":\"jhlfzswpchwahf\",\"name\":\"ousnfepgfewe\",\"type\":\"wlyxgncxyk\"},{\"properties\":{\"targetStorageClassificationId\":\"jhlimmbcxfhbcpo\"},\"location\":\"vxcjzhqizxfpxtgq\",\"id\":\"cja\",\"name\":\"ftjuh\",\"type\":\"qaz\"}],\"nextLink\":\"tgguwpijrajcivmm\"}") - .toObject(StorageClassificationMappingCollection.class); - Assertions.assertEquals("mlnwiaaomylweazu", model.value().get(0).properties().targetStorageClassificationId()); - Assertions.assertEquals("sethwwn", model.value().get(0).location()); - Assertions.assertEquals("tgguwpijrajcivmm", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageClassificationMappingCollection model - = new StorageClassificationMappingCollection().withValue(Arrays.asList( - new StorageClassificationMappingInner() - .withProperties(new StorageClassificationMappingProperties() - .withTargetStorageClassificationId("mlnwiaaomylweazu")) - .withLocation("sethwwn"), - new StorageClassificationMappingInner() - .withProperties(new StorageClassificationMappingProperties() - .withTargetStorageClassificationId("jhlimmbcxfhbcpo")) - .withLocation("vxcjzhqizxfpxtgq"))) - .withNextLink("tgguwpijrajcivmm"); - model = BinaryData.fromObject(model).toObject(StorageClassificationMappingCollection.class); - Assertions.assertEquals("mlnwiaaomylweazu", model.value().get(0).properties().targetStorageClassificationId()); - Assertions.assertEquals("sethwwn", model.value().get(0).location()); - Assertions.assertEquals("tgguwpijrajcivmm", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingInnerTests.java deleted file mode 100644 index 3e7845a9f549..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingInnerTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.StorageClassificationMappingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappingProperties; -import org.junit.jupiter.api.Assertions; - -public final class StorageClassificationMappingInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageClassificationMappingInner model = BinaryData.fromString( - "{\"properties\":{\"targetStorageClassificationId\":\"cf\"},\"location\":\"rxgkne\",\"id\":\"vyi\",\"name\":\"zqodfvpgshox\",\"type\":\"sgbpfgzdjtx\"}") - .toObject(StorageClassificationMappingInner.class); - Assertions.assertEquals("cf", model.properties().targetStorageClassificationId()); - Assertions.assertEquals("rxgkne", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageClassificationMappingInner model = new StorageClassificationMappingInner() - .withProperties(new StorageClassificationMappingProperties().withTargetStorageClassificationId("cf")) - .withLocation("rxgkne"); - model = BinaryData.fromObject(model).toObject(StorageClassificationMappingInner.class); - Assertions.assertEquals("cf", model.properties().targetStorageClassificationId()); - Assertions.assertEquals("rxgkne", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingInputTests.java deleted file mode 100644 index d3d19ccbf024..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingInputTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageMappingInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class StorageClassificationMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageClassificationMappingInput model - = BinaryData.fromString("{\"properties\":{\"targetStorageClassificationId\":\"a\"}}") - .toObject(StorageClassificationMappingInput.class); - Assertions.assertEquals("a", model.properties().targetStorageClassificationId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageClassificationMappingInput model = new StorageClassificationMappingInput() - .withProperties(new StorageMappingInputProperties().withTargetStorageClassificationId("a")); - model = BinaryData.fromObject(model).toObject(StorageClassificationMappingInput.class); - Assertions.assertEquals("a", model.properties().targetStorageClassificationId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingPropertiesTests.java deleted file mode 100644 index 07d2847db521..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingPropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMappingProperties; -import org.junit.jupiter.api.Assertions; - -public final class StorageClassificationMappingPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageClassificationMappingProperties model - = BinaryData.fromString("{\"targetStorageClassificationId\":\"flbqvgaq\"}") - .toObject(StorageClassificationMappingProperties.class); - Assertions.assertEquals("flbqvgaq", model.targetStorageClassificationId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageClassificationMappingProperties model - = new StorageClassificationMappingProperties().withTargetStorageClassificationId("flbqvgaq"); - model = BinaryData.fromObject(model).toObject(StorageClassificationMappingProperties.class); - Assertions.assertEquals("flbqvgaq", model.targetStorageClassificationId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsCreateMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsCreateMockTests.java deleted file mode 100644 index 57ca6b9ce0ac..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsCreateMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMapping; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageMappingInputProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class StorageClassificationMappingsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"targetStorageClassificationId\":\"shoxfzzjd\"},\"location\":\"pbusxy\",\"id\":\"gozwplxzgzumno\",\"name\":\"iixkkbygbgiqkw\",\"type\":\"shy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - StorageClassificationMapping response = manager.storageClassificationMappings() - .define("k") - .withExistingReplicationStorageClassification("wn", "wckzeb", "bvwdxgyypmxq", "lmlnxrcatkuh") - .withProperties(new StorageMappingInputProperties().withTargetStorageClassificationId("kvvii")) - .create(); - - Assertions.assertEquals("shoxfzzjd", response.properties().targetStorageClassificationId()); - Assertions.assertEquals("pbusxy", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsGetWithRespMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsGetWithRespMockTests.java deleted file mode 100644 index 984bd000fdc2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsGetWithRespMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMapping; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class StorageClassificationMappingsGetWithRespMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"targetStorageClassificationId\":\"sxaqqjhdfhfa\"},\"location\":\"qnjcsbozvcdqwssy\",\"id\":\"vwr\",\"name\":\"bivyw\",\"type\":\"tjnjuvtz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - StorageClassificationMapping response = manager.storageClassificationMappings() - .getWithResponse("sobggva", "crqaxlmbrtvtgolm", "p", "gtla", "yxhxj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("sxaqqjhdfhfa", response.properties().targetStorageClassificationId()); - Assertions.assertEquals("qnjcsbozvcdqwssy", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsListByRepliMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsListByRepliMockTests.java deleted file mode 100644 index c6e3d5047840..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsListByRepliMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMapping; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class StorageClassificationMappingsListByRepliMockTests { - @Test - public void testListByReplicationStorageClassifications() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"targetStorageClassificationId\":\"wgiitvjcmimbms\"},\"location\":\"kbbbjoypplod\",\"id\":\"qr\",\"name\":\"kp\",\"type\":\"zf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.storageClassificationMappings() - .listByReplicationStorageClassifications("ijtickzovguzp", "pxhhboigzxkop", "lrzhtocjzfppexu", "atzw", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wgiitvjcmimbms", - response.iterator().next().properties().targetStorageClassificationId()); - Assertions.assertEquals("kbbbjoypplod", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsListMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsListMockTests.java deleted file mode 100644 index 465caef2b99a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationMappingsListMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationMapping; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class StorageClassificationMappingsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"targetStorageClassificationId\":\"fdz\"},\"location\":\"npbdrcibjxnnnoz\",\"id\":\"nhvdtuoam\",\"name\":\"obqehspshti\",\"type\":\"yzfeoctrz\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.storageClassificationMappings().list("j", "dlxbaeyocpkv", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("fdz", response.iterator().next().properties().targetStorageClassificationId()); - Assertions.assertEquals("npbdrcibjxnnnoz", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationPropertiesTests.java deleted file mode 100644 index 124da9f2c6b0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassificationProperties; -import org.junit.jupiter.api.Assertions; - -public final class StorageClassificationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageClassificationProperties model = BinaryData.fromString("{\"friendlyName\":\"ktalhsnvkcdmxz\"}") - .toObject(StorageClassificationProperties.class); - Assertions.assertEquals("ktalhsnvkcdmxz", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageClassificationProperties model - = new StorageClassificationProperties().withFriendlyName("ktalhsnvkcdmxz"); - model = BinaryData.fromObject(model).toObject(StorageClassificationProperties.class); - Assertions.assertEquals("ktalhsnvkcdmxz", model.friendlyName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsGetWithResponseMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsGetWithResponseMockTests.java deleted file mode 100644 index 188d3acee177..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassification; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class StorageClassificationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"friendlyName\":\"ewltono\"},\"location\":\"femiwfhhawbabhz\",\"id\":\"fcdi\",\"name\":\"qnxyd\",\"type\":\"zfoi\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - StorageClassification response = manager.storageClassifications() - .getWithResponse("i", "wonkrnizdxywabki", "ni", "aptgvnaqyjukka", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ewltono", response.properties().friendlyName()); - Assertions.assertEquals("femiwfhhawbabhz", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsListByReplicationFMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsListByReplicationFMockTests.java deleted file mode 100644 index 0de587bc6cc8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsListByReplicationFMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassification; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class StorageClassificationsListByReplicationFMockTests { - @Test - public void testListByReplicationFabrics() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"friendlyName\":\"wh\"},\"location\":\"vidsssfzsgzgu\",\"id\":\"pejomeqgxhwisp\",\"name\":\"ogdblwjsbaqxaxt\",\"type\":\"xirppbiichlygkv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.storageClassifications() - .listByReplicationFabrics("bngzldvvd", "optythctoxo", "pmq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wh", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals("vidsssfzsgzgu", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsListMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsListMockTests.java deleted file mode 100644 index 4a54684e60df..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageClassificationsListMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageClassification; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class StorageClassificationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"friendlyName\":\"qavouymkde\"},\"location\":\"xlvzpfdka\",\"id\":\"gbiwpgopqlktthb\",\"name\":\"rrmtrxgjmpdvrjz\",\"type\":\"awpewajccsdjuzm\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.storageClassifications() - .list("zsuspaywvslq", "ronzeafkxfmuwdb", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qavouymkde", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals("xlvzpfdka", response.iterator().next().location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageMappingInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageMappingInputPropertiesTests.java deleted file mode 100644 index 1fa329c72b0f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/StorageMappingInputPropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.StorageMappingInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class StorageMappingInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageMappingInputProperties model - = BinaryData.fromString("{\"targetStorageClassificationId\":\"qusrdvetnws\"}") - .toObject(StorageMappingInputProperties.class); - Assertions.assertEquals("qusrdvetnws", model.targetStorageClassificationId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageMappingInputProperties model - = new StorageMappingInputProperties().withTargetStorageClassificationId("qusrdvetnws"); - model = BinaryData.fromObject(model).toObject(StorageMappingInputProperties.class); - Assertions.assertEquals("qusrdvetnws", model.targetStorageClassificationId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SubnetTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SubnetTests.java deleted file mode 100644 index 029ac64094a2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SubnetTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.Subnet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubnetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Subnet model = BinaryData.fromString( - "{\"name\":\"fhyhltrpmopjmcma\",\"friendlyName\":\"okth\",\"addressList\":[\"uaodsfcpk\",\"xodpuozmyzydagfu\"]}") - .toObject(Subnet.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.name()); - Assertions.assertEquals("okth", model.friendlyName()); - Assertions.assertEquals("uaodsfcpk", model.addressList().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Subnet model = new Subnet().withName("fhyhltrpmopjmcma") - .withFriendlyName("okth") - .withAddressList(Arrays.asList("uaodsfcpk", "xodpuozmyzydagfu")); - model = BinaryData.fromObject(model).toObject(Subnet.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.name()); - Assertions.assertEquals("okth", model.friendlyName()); - Assertions.assertEquals("uaodsfcpk", model.addressList().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOSDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOSDetailsTests.java deleted file mode 100644 index a3f338238a61..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOSDetailsTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OSVersionWrapper; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOSDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SupportedOSDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SupportedOSDetails model = BinaryData.fromString( - "{\"osName\":\"izfavkjzwf\",\"osType\":\"yay\",\"osVersions\":[{\"version\":\"zs\",\"servicePack\":\"wxrzxmdewsrsxkrp\"},{\"version\":\"jazejwwviyoyp\",\"servicePack\":\"hbrnnhjx\"}]}") - .toObject(SupportedOSDetails.class); - Assertions.assertEquals("izfavkjzwf", model.osName()); - Assertions.assertEquals("yay", model.osType()); - Assertions.assertEquals("zs", model.osVersions().get(0).version()); - Assertions.assertEquals("wxrzxmdewsrsxkrp", model.osVersions().get(0).servicePack()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedOSDetails model = new SupportedOSDetails().withOsName("izfavkjzwf") - .withOsType("yay") - .withOsVersions(Arrays.asList(new OSVersionWrapper().withVersion("zs").withServicePack("wxrzxmdewsrsxkrp"), - new OSVersionWrapper().withVersion("jazejwwviyoyp").withServicePack("hbrnnhjx"))); - model = BinaryData.fromObject(model).toObject(SupportedOSDetails.class); - Assertions.assertEquals("izfavkjzwf", model.osName()); - Assertions.assertEquals("yay", model.osType()); - Assertions.assertEquals("zs", model.osVersions().get(0).version()); - Assertions.assertEquals("wxrzxmdewsrsxkrp", model.osVersions().get(0).servicePack()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOSPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOSPropertiesTests.java deleted file mode 100644 index 9f5359791b6e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOSPropertiesTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OSVersionWrapper; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOSDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOSProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOSProperty; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SupportedOSPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SupportedOSProperties model = BinaryData.fromString( - "{\"supportedOsList\":[{\"instanceType\":\"uuipldq\",\"supportedOs\":[{\"osName\":\"kva\",\"osType\":\"l\",\"osVersions\":[{}]},{\"osName\":\"vqyvwehtaemxhzz\",\"osType\":\"ev\",\"osVersions\":[{},{}]}]}]}") - .toObject(SupportedOSProperties.class); - Assertions.assertEquals("uuipldq", model.supportedOsList().get(0).instanceType()); - Assertions.assertEquals("kva", model.supportedOsList().get(0).supportedOs().get(0).osName()); - Assertions.assertEquals("l", model.supportedOsList().get(0).supportedOs().get(0).osType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedOSProperties model = new SupportedOSProperties() - .withSupportedOsList(Arrays.asList(new SupportedOSProperty().withInstanceType("uuipldq") - .withSupportedOs(Arrays.asList( - new SupportedOSDetails().withOsName("kva") - .withOsType("l") - .withOsVersions(Arrays.asList(new OSVersionWrapper())), - new SupportedOSDetails().withOsName("vqyvwehtaemxhzz") - .withOsType("ev") - .withOsVersions(Arrays.asList(new OSVersionWrapper(), new OSVersionWrapper())))))); - model = BinaryData.fromObject(model).toObject(SupportedOSProperties.class); - Assertions.assertEquals("uuipldq", model.supportedOsList().get(0).instanceType()); - Assertions.assertEquals("kva", model.supportedOsList().get(0).supportedOs().get(0).osName()); - Assertions.assertEquals("l", model.supportedOsList().get(0).supportedOs().get(0).osType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOSPropertyTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOSPropertyTests.java deleted file mode 100644 index c6050a24735d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOSPropertyTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OSVersionWrapper; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOSDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOSProperty; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SupportedOSPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SupportedOSProperty model = BinaryData.fromString( - "{\"instanceType\":\"vzrrryveimi\",\"supportedOs\":[{\"osName\":\"yzatvfuzkaft\",\"osType\":\"vru\",\"osVersions\":[{\"version\":\"syeipqd\",\"servicePack\":\"jtgrqgdgkkileplk\"},{\"version\":\"mknhwtbbaedor\",\"servicePack\":\"mqfl\"},{\"version\":\"gbdg\",\"servicePack\":\"mgxdgdhpabgd\"},{\"version\":\"jddvjsaqw\",\"servicePack\":\"mmwllc\"}]},{\"osName\":\"srsxaptefh\",\"osType\":\"cgjokjljnhvlq\",\"osVersions\":[{\"version\":\"peeksnbksdqhjv\",\"servicePack\":\"lxeslkhh\"}]},{\"osName\":\"tcpoqma\",\"osType\":\"wqjwgok\",\"osVersions\":[{\"version\":\"jj\",\"servicePack\":\"ybwfdbkjb\"},{\"version\":\"ensvkzykjtj\",\"servicePack\":\"sxfwushcdp\"},{\"version\":\"pn\",\"servicePack\":\"mgjfbpkuwxeoio\"}]}]}") - .toObject(SupportedOSProperty.class); - Assertions.assertEquals("vzrrryveimi", model.instanceType()); - Assertions.assertEquals("yzatvfuzkaft", model.supportedOs().get(0).osName()); - Assertions.assertEquals("vru", model.supportedOs().get(0).osType()); - Assertions.assertEquals("syeipqd", model.supportedOs().get(0).osVersions().get(0).version()); - Assertions.assertEquals("jtgrqgdgkkileplk", model.supportedOs().get(0).osVersions().get(0).servicePack()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedOSProperty model - = new SupportedOSProperty().withInstanceType("vzrrryveimi") - .withSupportedOs(Arrays.asList( - new SupportedOSDetails().withOsName("yzatvfuzkaft") - .withOsType("vru") - .withOsVersions(Arrays.asList( - new OSVersionWrapper().withVersion("syeipqd").withServicePack("jtgrqgdgkkileplk"), - new OSVersionWrapper().withVersion("mknhwtbbaedor").withServicePack("mqfl"), - new OSVersionWrapper().withVersion("gbdg").withServicePack("mgxdgdhpabgd"), - new OSVersionWrapper().withVersion("jddvjsaqw").withServicePack("mmwllc"))), - new SupportedOSDetails().withOsName("srsxaptefh") - .withOsType("cgjokjljnhvlq") - .withOsVersions(Arrays - .asList(new OSVersionWrapper().withVersion("peeksnbksdqhjv").withServicePack("lxeslkhh"))), - new SupportedOSDetails().withOsName("tcpoqma") - .withOsType("wqjwgok") - .withOsVersions( - Arrays.asList(new OSVersionWrapper().withVersion("jj").withServicePack("ybwfdbkjb"), - new OSVersionWrapper().withVersion("ensvkzykjtj").withServicePack("sxfwushcdp"), - new OSVersionWrapper().withVersion("pn").withServicePack("mgjfbpkuwxeoio"))))); - model = BinaryData.fromObject(model).toObject(SupportedOSProperty.class); - Assertions.assertEquals("vzrrryveimi", model.instanceType()); - Assertions.assertEquals("yzatvfuzkaft", model.supportedOs().get(0).osName()); - Assertions.assertEquals("vru", model.supportedOs().get(0).osType()); - Assertions.assertEquals("syeipqd", model.supportedOs().get(0).osVersions().get(0).version()); - Assertions.assertEquals("jtgrqgdgkkileplk", model.supportedOs().get(0).osVersions().get(0).servicePack()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOperatingSystemsInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOperatingSystemsInnerTests.java deleted file mode 100644 index c8376a34c04a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOperatingSystemsInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.SupportedOperatingSystemsInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OSVersionWrapper; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOSDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOSProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOSProperty; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SupportedOperatingSystemsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SupportedOperatingSystemsInner model = BinaryData.fromString( - "{\"properties\":{\"supportedOsList\":[{\"instanceType\":\"tdacarvvlfn\",\"supportedOs\":[{\"osName\":\"poi\",\"osType\":\"naz\",\"osVersions\":[{},{},{}]}]}]},\"location\":\"zrsq\",\"id\":\"lsxkd\",\"name\":\"wqapfgsdp\",\"type\":\"vessm\"}") - .toObject(SupportedOperatingSystemsInner.class); - Assertions.assertEquals("tdacarvvlfn", model.properties().supportedOsList().get(0).instanceType()); - Assertions.assertEquals("poi", model.properties().supportedOsList().get(0).supportedOs().get(0).osName()); - Assertions.assertEquals("naz", model.properties().supportedOsList().get(0).supportedOs().get(0).osType()); - Assertions.assertEquals("zrsq", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedOperatingSystemsInner model - = new SupportedOperatingSystemsInner() - .withProperties( - new SupportedOSProperties() - .withSupportedOsList( - Arrays - .asList( - new SupportedOSProperty().withInstanceType("tdacarvvlfn") - .withSupportedOs(Arrays.asList(new SupportedOSDetails().withOsName("poi") - .withOsType("naz") - .withOsVersions(Arrays.asList(new OSVersionWrapper(), - new OSVersionWrapper(), new OSVersionWrapper()))))))) - .withLocation("zrsq"); - model = BinaryData.fromObject(model).toObject(SupportedOperatingSystemsInner.class); - Assertions.assertEquals("tdacarvvlfn", model.properties().supportedOsList().get(0).instanceType()); - Assertions.assertEquals("poi", model.properties().supportedOsList().get(0).supportedOs().get(0).osName()); - Assertions.assertEquals("naz", model.properties().supportedOsList().get(0).supportedOs().get(0).osType()); - Assertions.assertEquals("zrsq", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOperatingSystemsOperationsGetWiMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOperatingSystemsOperationsGetWiMockTests.java deleted file mode 100644 index 8adc36e0e0f2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SupportedOperatingSystemsOperationsGetWiMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SupportedOperatingSystems; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SupportedOperatingSystemsOperationsGetWiMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"supportedOsList\":[{\"instanceType\":\"hpi\",\"supportedOs\":[{},{},{},{}]},{\"instanceType\":\"fxhvnodqqz\",\"supportedOs\":[{}]},{\"instanceType\":\"roswnfq\",\"supportedOs\":[{},{},{},{}]}]},\"location\":\"sxfrwvlyp\",\"id\":\"tusk\",\"name\":\"nc\",\"type\":\"ocl\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SupportedOperatingSystems response = manager.supportedOperatingSystemsOperations() - .getWithResponse("htekxnvkdvc", "owrdtd", "ddwzdlbbcztamky", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hpi", response.properties().supportedOsList().get(0).instanceType()); - Assertions.assertEquals("sxfrwvlyp", response.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProtectionInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProtectionInputPropertiesTests.java deleted file mode 100644 index 380be053ae1c..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProtectionInputPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class SwitchProtectionInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SwitchProtectionInputProperties model = BinaryData.fromString( - "{\"replicationProtectedItemName\":\"onbzoggculapzwy\",\"providerSpecificDetails\":{\"instanceType\":\"SwitchProtectionProviderSpecificInput\"}}") - .toObject(SwitchProtectionInputProperties.class); - Assertions.assertEquals("onbzoggculapzwy", model.replicationProtectedItemName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SwitchProtectionInputProperties model - = new SwitchProtectionInputProperties().withReplicationProtectedItemName("onbzoggculapzwy") - .withProviderSpecificDetails(new SwitchProtectionProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(SwitchProtectionInputProperties.class); - Assertions.assertEquals("onbzoggculapzwy", model.replicationProtectedItemName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProtectionInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProtectionInputTests.java deleted file mode 100644 index 13523ef32904..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProtectionInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class SwitchProtectionInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SwitchProtectionInput model = BinaryData.fromString( - "{\"properties\":{\"replicationProtectedItemName\":\"eivsiykzkdnc\",\"providerSpecificDetails\":{\"instanceType\":\"SwitchProtectionProviderSpecificInput\"}}}") - .toObject(SwitchProtectionInput.class); - Assertions.assertEquals("eivsiykzkdnc", model.properties().replicationProtectedItemName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SwitchProtectionInput model = new SwitchProtectionInput() - .withProperties(new SwitchProtectionInputProperties().withReplicationProtectedItemName("eivsiykzkdnc") - .withProviderSpecificDetails(new SwitchProtectionProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(SwitchProtectionInput.class); - Assertions.assertEquals("eivsiykzkdnc", model.properties().replicationProtectedItemName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProtectionJobDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProtectionJobDetailsTests.java deleted file mode 100644 index 92a93410ad9b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProtectionJobDetailsTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionJobDetails; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SwitchProtectionJobDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SwitchProtectionJobDetails model = BinaryData.fromString( - "{\"instanceType\":\"SwitchProtectionJobDetails\",\"newReplicationProtectedItemId\":\"rexw\",\"affectedObjectDetails\":{\"ubheeggzgrnqtl\":\"bexfted\",\"gjq\":\"ozuumr\"}}") - .toObject(SwitchProtectionJobDetails.class); - Assertions.assertEquals("bexfted", model.affectedObjectDetails().get("ubheeggzgrnqtl")); - Assertions.assertEquals("rexw", model.newReplicationProtectedItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SwitchProtectionJobDetails model = new SwitchProtectionJobDetails() - .withAffectedObjectDetails(mapOf("ubheeggzgrnqtl", "bexfted", "gjq", "ozuumr")) - .withNewReplicationProtectedItemId("rexw"); - model = BinaryData.fromObject(model).toObject(SwitchProtectionJobDetails.class); - Assertions.assertEquals("bexfted", model.affectedObjectDetails().get("ubheeggzgrnqtl")); - Assertions.assertEquals("rexw", model.newReplicationProtectedItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProtectionProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProtectionProviderSpecificInputTests.java deleted file mode 100644 index 40b1d1ed74a8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProtectionProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionProviderSpecificInput; - -public final class SwitchProtectionProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SwitchProtectionProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"SwitchProtectionProviderSpecificInput\"}") - .toObject(SwitchProtectionProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SwitchProtectionProviderSpecificInput model = new SwitchProtectionProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(SwitchProtectionProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProviderInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProviderInputPropertiesTests.java deleted file mode 100644 index 8a87c8e289c1..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProviderInputPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProviderInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class SwitchProviderInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SwitchProviderInputProperties model = BinaryData.fromString( - "{\"targetInstanceType\":\"trgjupauutpwoqh\",\"providerSpecificDetails\":{\"instanceType\":\"SwitchProviderSpecificInput\"}}") - .toObject(SwitchProviderInputProperties.class); - Assertions.assertEquals("trgjupauutpwoqh", model.targetInstanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SwitchProviderInputProperties model - = new SwitchProviderInputProperties().withTargetInstanceType("trgjupauutpwoqh") - .withProviderSpecificDetails(new SwitchProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(SwitchProviderInputProperties.class); - Assertions.assertEquals("trgjupauutpwoqh", model.targetInstanceType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProviderInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProviderInputTests.java deleted file mode 100644 index 98bf5fe51618..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProviderInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProviderInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class SwitchProviderInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SwitchProviderInput model = BinaryData.fromString( - "{\"properties\":{\"targetInstanceType\":\"mrhublwpc\",\"providerSpecificDetails\":{\"instanceType\":\"SwitchProviderSpecificInput\"}}}") - .toObject(SwitchProviderInput.class); - Assertions.assertEquals("mrhublwpc", model.properties().targetInstanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SwitchProviderInput model = new SwitchProviderInput() - .withProperties(new SwitchProviderInputProperties().withTargetInstanceType("mrhublwpc") - .withProviderSpecificDetails(new SwitchProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(SwitchProviderInput.class); - Assertions.assertEquals("mrhublwpc", model.properties().targetInstanceType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProviderSpecificInputTests.java deleted file mode 100644 index 21db15d8642b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/SwitchProviderSpecificInputTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProviderSpecificInput; - -public final class SwitchProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SwitchProviderSpecificInput model = BinaryData.fromString("{\"instanceType\":\"SwitchProviderSpecificInput\"}") - .toObject(SwitchProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SwitchProviderSpecificInput model = new SwitchProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(SwitchProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizeCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizeCollectionTests.java deleted file mode 100644 index 5fb94f7d7e7a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizeCollectionTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.TargetComputeSizeInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ComputeSizeErrorDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TargetComputeSizeCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TargetComputeSizeProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TargetComputeSizeCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetComputeSizeCollection model = BinaryData.fromString( - "{\"value\":[{\"id\":\"g\",\"name\":\"pnfqntcyp\",\"type\":\"jv\",\"properties\":{\"name\":\"mwks\",\"friendlyName\":\"rcizjxvyd\",\"cpuCoresCount\":1161175344,\"vCPUsAvailable\":1238865212,\"memoryInGB\":62.392147891228966,\"maxDataDiskCount\":733359450,\"maxNicsCount\":788840144,\"errors\":[{\"message\":\"umrtwnawjsl\",\"severity\":\"wkojgcyztsfmzn\"},{\"message\":\"eqphchqnrnr\",\"severity\":\"ehuwrykqgaifmvik\"},{\"message\":\"ydv\",\"severity\":\"bejdznxcv\"},{\"message\":\"rhnj\",\"severity\":\"olvtnovqfzge\"}],\"highIopsSupported\":\"dftuljltduce\",\"hyperVGenerations\":[\"mczuo\",\"ejwcwwqiok\",\"ssxmojms\",\"p\"]}},{\"id\":\"prvkwcfzqljyxgtc\",\"name\":\"eydbsd\",\"type\":\"m\",\"properties\":{\"name\":\"aehvbbxuri\",\"friendlyName\":\"tfnhtbaxkgxywr\",\"cpuCoresCount\":1619197472,\"vCPUsAvailable\":479149992,\"memoryInGB\":98.67117973109978,\"maxDataDiskCount\":309006078,\"maxNicsCount\":1167250360,\"errors\":[{\"message\":\"ruud\",\"severity\":\"zibt\"},{\"message\":\"stgktst\",\"severity\":\"xeclzedqbcvhzlhp\"}],\"highIopsSupported\":\"dqkdlwwqfbu\",\"hyperVGenerations\":[\"xtrqjfs\",\"lmbtxhwgfwsrt\"]}}],\"nextLink\":\"coezbrhubskh\"}") - .toObject(TargetComputeSizeCollection.class); - Assertions.assertEquals("g", model.value().get(0).id()); - Assertions.assertEquals("pnfqntcyp", model.value().get(0).name()); - Assertions.assertEquals("jv", model.value().get(0).type()); - Assertions.assertEquals("mwks", model.value().get(0).properties().name()); - Assertions.assertEquals("rcizjxvyd", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(1161175344, model.value().get(0).properties().cpuCoresCount()); - Assertions.assertEquals(62.392147891228966D, model.value().get(0).properties().memoryInGB()); - Assertions.assertEquals(733359450, model.value().get(0).properties().maxDataDiskCount()); - Assertions.assertEquals(788840144, model.value().get(0).properties().maxNicsCount()); - Assertions.assertEquals("umrtwnawjsl", model.value().get(0).properties().errors().get(0).message()); - Assertions.assertEquals("wkojgcyztsfmzn", model.value().get(0).properties().errors().get(0).severity()); - Assertions.assertEquals("dftuljltduce", model.value().get(0).properties().highIopsSupported()); - Assertions.assertEquals("mczuo", model.value().get(0).properties().hyperVGenerations().get(0)); - Assertions.assertEquals("coezbrhubskh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetComputeSizeCollection model - = new TargetComputeSizeCollection() - .withValue(Arrays.asList( - new TargetComputeSizeInner().withId("g") - .withName("pnfqntcyp") - .withType("jv") - .withProperties(new TargetComputeSizeProperties().withName("mwks") - .withFriendlyName("rcizjxvyd") - .withCpuCoresCount(1161175344) - .withMemoryInGB(62.392147891228966D) - .withMaxDataDiskCount(733359450) - .withMaxNicsCount(788840144) - .withErrors(Arrays.asList( - new ComputeSizeErrorDetails().withMessage("umrtwnawjsl").withSeverity("wkojgcyztsfmzn"), - new ComputeSizeErrorDetails().withMessage("eqphchqnrnr") - .withSeverity("ehuwrykqgaifmvik"), - new ComputeSizeErrorDetails().withMessage("ydv").withSeverity("bejdznxcv"), - new ComputeSizeErrorDetails().withMessage("rhnj").withSeverity("olvtnovqfzge"))) - .withHighIopsSupported("dftuljltduce") - .withHyperVGenerations(Arrays.asList("mczuo", "ejwcwwqiok", "ssxmojms", "p"))), - new TargetComputeSizeInner().withId("prvkwcfzqljyxgtc") - .withName("eydbsd") - .withType("m") - .withProperties( - new TargetComputeSizeProperties().withName("aehvbbxuri") - .withFriendlyName("tfnhtbaxkgxywr") - .withCpuCoresCount(1619197472) - .withMemoryInGB(98.67117973109978D) - .withMaxDataDiskCount(309006078) - .withMaxNicsCount(1167250360) - .withErrors(Arrays.asList( - new ComputeSizeErrorDetails().withMessage("ruud").withSeverity("zibt"), - new ComputeSizeErrorDetails().withMessage("stgktst") - .withSeverity("xeclzedqbcvhzlhp"))) - .withHighIopsSupported("dqkdlwwqfbu") - .withHyperVGenerations(Arrays.asList("xtrqjfs", "lmbtxhwgfwsrt"))))) - .withNextLink("coezbrhubskh"); - model = BinaryData.fromObject(model).toObject(TargetComputeSizeCollection.class); - Assertions.assertEquals("g", model.value().get(0).id()); - Assertions.assertEquals("pnfqntcyp", model.value().get(0).name()); - Assertions.assertEquals("jv", model.value().get(0).type()); - Assertions.assertEquals("mwks", model.value().get(0).properties().name()); - Assertions.assertEquals("rcizjxvyd", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(1161175344, model.value().get(0).properties().cpuCoresCount()); - Assertions.assertEquals(62.392147891228966D, model.value().get(0).properties().memoryInGB()); - Assertions.assertEquals(733359450, model.value().get(0).properties().maxDataDiskCount()); - Assertions.assertEquals(788840144, model.value().get(0).properties().maxNicsCount()); - Assertions.assertEquals("umrtwnawjsl", model.value().get(0).properties().errors().get(0).message()); - Assertions.assertEquals("wkojgcyztsfmzn", model.value().get(0).properties().errors().get(0).severity()); - Assertions.assertEquals("dftuljltduce", model.value().get(0).properties().highIopsSupported()); - Assertions.assertEquals("mczuo", model.value().get(0).properties().hyperVGenerations().get(0)); - Assertions.assertEquals("coezbrhubskh", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizeInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizeInnerTests.java deleted file mode 100644 index d40d3d2d7993..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizeInnerTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.TargetComputeSizeInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ComputeSizeErrorDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TargetComputeSizeProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TargetComputeSizeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetComputeSizeInner model = BinaryData.fromString( - "{\"id\":\"ygo\",\"name\":\"kkqfqjbvle\",\"type\":\"fmluiqtqzfavyvn\",\"properties\":{\"name\":\"bar\",\"friendlyName\":\"uayjkqa\",\"cpuCoresCount\":2002865497,\"vCPUsAvailable\":1085196762,\"memoryInGB\":51.89952430089579,\"maxDataDiskCount\":1318524891,\"maxNicsCount\":813046030,\"errors\":[{\"message\":\"ntiew\",\"severity\":\"cv\"},{\"message\":\"uwrbehwagoh\",\"severity\":\"f\"},{\"message\":\"mrqemvvhmx\",\"severity\":\"rjfut\"}],\"highIopsSupported\":\"oe\",\"hyperVGenerations\":[\"ewzcjznmwcp\",\"guaadraufactkahz\"]}}") - .toObject(TargetComputeSizeInner.class); - Assertions.assertEquals("ygo", model.id()); - Assertions.assertEquals("kkqfqjbvle", model.name()); - Assertions.assertEquals("fmluiqtqzfavyvn", model.type()); - Assertions.assertEquals("bar", model.properties().name()); - Assertions.assertEquals("uayjkqa", model.properties().friendlyName()); - Assertions.assertEquals(2002865497, model.properties().cpuCoresCount()); - Assertions.assertEquals(51.89952430089579D, model.properties().memoryInGB()); - Assertions.assertEquals(1318524891, model.properties().maxDataDiskCount()); - Assertions.assertEquals(813046030, model.properties().maxNicsCount()); - Assertions.assertEquals("ntiew", model.properties().errors().get(0).message()); - Assertions.assertEquals("cv", model.properties().errors().get(0).severity()); - Assertions.assertEquals("oe", model.properties().highIopsSupported()); - Assertions.assertEquals("ewzcjznmwcp", model.properties().hyperVGenerations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetComputeSizeInner model = new TargetComputeSizeInner().withId("ygo") - .withName("kkqfqjbvle") - .withType("fmluiqtqzfavyvn") - .withProperties(new TargetComputeSizeProperties().withName("bar") - .withFriendlyName("uayjkqa") - .withCpuCoresCount(2002865497) - .withMemoryInGB(51.89952430089579D) - .withMaxDataDiskCount(1318524891) - .withMaxNicsCount(813046030) - .withErrors(Arrays.asList(new ComputeSizeErrorDetails().withMessage("ntiew").withSeverity("cv"), - new ComputeSizeErrorDetails().withMessage("uwrbehwagoh").withSeverity("f"), - new ComputeSizeErrorDetails().withMessage("mrqemvvhmx").withSeverity("rjfut"))) - .withHighIopsSupported("oe") - .withHyperVGenerations(Arrays.asList("ewzcjznmwcp", "guaadraufactkahz"))); - model = BinaryData.fromObject(model).toObject(TargetComputeSizeInner.class); - Assertions.assertEquals("ygo", model.id()); - Assertions.assertEquals("kkqfqjbvle", model.name()); - Assertions.assertEquals("fmluiqtqzfavyvn", model.type()); - Assertions.assertEquals("bar", model.properties().name()); - Assertions.assertEquals("uayjkqa", model.properties().friendlyName()); - Assertions.assertEquals(2002865497, model.properties().cpuCoresCount()); - Assertions.assertEquals(51.89952430089579D, model.properties().memoryInGB()); - Assertions.assertEquals(1318524891, model.properties().maxDataDiskCount()); - Assertions.assertEquals(813046030, model.properties().maxNicsCount()); - Assertions.assertEquals("ntiew", model.properties().errors().get(0).message()); - Assertions.assertEquals("cv", model.properties().errors().get(0).severity()); - Assertions.assertEquals("oe", model.properties().highIopsSupported()); - Assertions.assertEquals("ewzcjznmwcp", model.properties().hyperVGenerations().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizePropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizePropertiesTests.java deleted file mode 100644 index f9216b403876..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizePropertiesTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ComputeSizeErrorDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TargetComputeSizeProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TargetComputeSizePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetComputeSizeProperties model = BinaryData.fromString( - "{\"name\":\"ajjziuxxpshne\",\"friendlyName\":\"ulfgslqu\",\"cpuCoresCount\":471639164,\"vCPUsAvailable\":1232938726,\"memoryInGB\":97.2663718138851,\"maxDataDiskCount\":1732882534,\"maxNicsCount\":203229589,\"errors\":[{\"message\":\"a\",\"severity\":\"juohminyflnorw\"},{\"message\":\"uvwpklvxwmyg\",\"severity\":\"pgpqchiszepnnb\"},{\"message\":\"rxgibbd\",\"severity\":\"confozauors\"},{\"message\":\"okwbqplh\",\"severity\":\"nuuepzlrp\"}],\"highIopsSupported\":\"zsoldwey\",\"hyperVGenerations\":[\"unvmnnr\",\"rbior\",\"talywjhhgdnhxms\",\"v\"]}") - .toObject(TargetComputeSizeProperties.class); - Assertions.assertEquals("ajjziuxxpshne", model.name()); - Assertions.assertEquals("ulfgslqu", model.friendlyName()); - Assertions.assertEquals(471639164, model.cpuCoresCount()); - Assertions.assertEquals(97.2663718138851D, model.memoryInGB()); - Assertions.assertEquals(1732882534, model.maxDataDiskCount()); - Assertions.assertEquals(203229589, model.maxNicsCount()); - Assertions.assertEquals("a", model.errors().get(0).message()); - Assertions.assertEquals("juohminyflnorw", model.errors().get(0).severity()); - Assertions.assertEquals("zsoldwey", model.highIopsSupported()); - Assertions.assertEquals("unvmnnr", model.hyperVGenerations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetComputeSizeProperties model = new TargetComputeSizeProperties().withName("ajjziuxxpshne") - .withFriendlyName("ulfgslqu") - .withCpuCoresCount(471639164) - .withMemoryInGB(97.2663718138851D) - .withMaxDataDiskCount(1732882534) - .withMaxNicsCount(203229589) - .withErrors(Arrays.asList(new ComputeSizeErrorDetails().withMessage("a").withSeverity("juohminyflnorw"), - new ComputeSizeErrorDetails().withMessage("uvwpklvxwmyg").withSeverity("pgpqchiszepnnb"), - new ComputeSizeErrorDetails().withMessage("rxgibbd").withSeverity("confozauors"), - new ComputeSizeErrorDetails().withMessage("okwbqplh").withSeverity("nuuepzlrp"))) - .withHighIopsSupported("zsoldwey") - .withHyperVGenerations(Arrays.asList("unvmnnr", "rbior", "talywjhhgdnhxms", "v")); - model = BinaryData.fromObject(model).toObject(TargetComputeSizeProperties.class); - Assertions.assertEquals("ajjziuxxpshne", model.name()); - Assertions.assertEquals("ulfgslqu", model.friendlyName()); - Assertions.assertEquals(471639164, model.cpuCoresCount()); - Assertions.assertEquals(97.2663718138851D, model.memoryInGB()); - Assertions.assertEquals(1732882534, model.maxDataDiskCount()); - Assertions.assertEquals(203229589, model.maxNicsCount()); - Assertions.assertEquals("a", model.errors().get(0).message()); - Assertions.assertEquals("juohminyflnorw", model.errors().get(0).severity()); - Assertions.assertEquals("zsoldwey", model.highIopsSupported()); - Assertions.assertEquals("unvmnnr", model.hyperVGenerations().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizesListByReplicationProteMockTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizesListByReplicationProteMockTests.java deleted file mode 100644 index 232e1ea06562..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TargetComputeSizesListByReplicationProteMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TargetComputeSize; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TargetComputeSizesListByReplicationProteMockTests { - @Test - public void testListByReplicationProtectedItems() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"iulddgiqlnhcxw\",\"name\":\"vunknsgvxhxr\",\"type\":\"atrtcqyfjvifbmo\",\"properties\":{\"name\":\"hqyoyt\",\"friendlyName\":\"oufkqmbhukdfp\",\"cpuCoresCount\":944352295,\"vCPUsAvailable\":389781361,\"memoryInGB\":1.1306229007980284,\"maxDataDiskCount\":2003653023,\"maxNicsCount\":1903175,\"errors\":[{\"message\":\"odhzjlr\",\"severity\":\"ckkfxmuqe\"}],\"highIopsSupported\":\"wqphfvsftsst\",\"hyperVGenerations\":[\"xcachdtezgf\"]}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - SiteRecoveryManager manager = SiteRecoveryManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.targetComputeSizes() - .listByReplicationProtectedItems("rlb", "zlty", "lacbib", "keiec", "pmwxdsokrlnrpeyl", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("iulddgiqlnhcxw", response.iterator().next().id()); - Assertions.assertEquals("vunknsgvxhxr", response.iterator().next().name()); - Assertions.assertEquals("atrtcqyfjvifbmo", response.iterator().next().type()); - Assertions.assertEquals("hqyoyt", response.iterator().next().properties().name()); - Assertions.assertEquals("oufkqmbhukdfp", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals(944352295, response.iterator().next().properties().cpuCoresCount()); - Assertions.assertEquals(1.1306229007980284D, response.iterator().next().properties().memoryInGB()); - Assertions.assertEquals(2003653023, response.iterator().next().properties().maxDataDiskCount()); - Assertions.assertEquals(1903175, response.iterator().next().properties().maxNicsCount()); - Assertions.assertEquals("odhzjlr", response.iterator().next().properties().errors().get(0).message()); - Assertions.assertEquals("ckkfxmuqe", response.iterator().next().properties().errors().get(0).severity()); - Assertions.assertEquals("wqphfvsftsst", response.iterator().next().properties().highIopsSupported()); - Assertions.assertEquals("xcachdtezgf", response.iterator().next().properties().hyperVGenerations().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TaskTypeDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TaskTypeDetailsTests.java deleted file mode 100644 index 599e2706017d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TaskTypeDetailsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TaskTypeDetails; - -public final class TaskTypeDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TaskTypeDetails model - = BinaryData.fromString("{\"instanceType\":\"TaskTypeDetails\"}").toObject(TaskTypeDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TaskTypeDetails model = new TaskTypeDetails(); - model = BinaryData.fromObject(model).toObject(TaskTypeDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverCleanupInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverCleanupInputPropertiesTests.java deleted file mode 100644 index 7fe67bbad970..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverCleanupInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverCleanupInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class TestFailoverCleanupInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TestFailoverCleanupInputProperties model - = BinaryData.fromString("{\"comments\":\"wfscjfn\"}").toObject(TestFailoverCleanupInputProperties.class); - Assertions.assertEquals("wfscjfn", model.comments()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TestFailoverCleanupInputProperties model = new TestFailoverCleanupInputProperties().withComments("wfscjfn"); - model = BinaryData.fromObject(model).toObject(TestFailoverCleanupInputProperties.class); - Assertions.assertEquals("wfscjfn", model.comments()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverCleanupInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverCleanupInputTests.java deleted file mode 100644 index 4ecda1e1452e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverCleanupInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverCleanupInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class TestFailoverCleanupInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TestFailoverCleanupInput model - = BinaryData.fromString("{\"properties\":{\"comments\":\"icc\"}}").toObject(TestFailoverCleanupInput.class); - Assertions.assertEquals("icc", model.properties().comments()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TestFailoverCleanupInput model = new TestFailoverCleanupInput() - .withProperties(new TestFailoverCleanupInputProperties().withComments("icc")); - model = BinaryData.fromObject(model).toObject(TestFailoverCleanupInput.class); - Assertions.assertEquals("icc", model.properties().comments()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverInputPropertiesTests.java deleted file mode 100644 index dffefe1c77aa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverInputPropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class TestFailoverInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TestFailoverInputProperties model = BinaryData.fromString( - "{\"failoverDirection\":\"qvci\",\"networkType\":\"ev\",\"networkId\":\"mblrrilbywd\",\"providerSpecificDetails\":{\"instanceType\":\"TestFailoverProviderSpecificInput\"}}") - .toObject(TestFailoverInputProperties.class); - Assertions.assertEquals("qvci", model.failoverDirection()); - Assertions.assertEquals("ev", model.networkType()); - Assertions.assertEquals("mblrrilbywd", model.networkId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TestFailoverInputProperties model = new TestFailoverInputProperties().withFailoverDirection("qvci") - .withNetworkType("ev") - .withNetworkId("mblrrilbywd") - .withProviderSpecificDetails(new TestFailoverProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(TestFailoverInputProperties.class); - Assertions.assertEquals("qvci", model.failoverDirection()); - Assertions.assertEquals("ev", model.networkType()); - Assertions.assertEquals("mblrrilbywd", model.networkId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverInputTests.java deleted file mode 100644 index 9af38c3f6468..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverInputTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class TestFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TestFailoverInput model = BinaryData.fromString( - "{\"properties\":{\"failoverDirection\":\"chvcyyysfgdo\",\"networkType\":\"ubiipuipwoqonma\",\"networkId\":\"ekni\",\"providerSpecificDetails\":{\"instanceType\":\"TestFailoverProviderSpecificInput\"}}}") - .toObject(TestFailoverInput.class); - Assertions.assertEquals("chvcyyysfgdo", model.properties().failoverDirection()); - Assertions.assertEquals("ubiipuipwoqonma", model.properties().networkType()); - Assertions.assertEquals("ekni", model.properties().networkId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TestFailoverInput model = new TestFailoverInput() - .withProperties(new TestFailoverInputProperties().withFailoverDirection("chvcyyysfgdo") - .withNetworkType("ubiipuipwoqonma") - .withNetworkId("ekni") - .withProviderSpecificDetails(new TestFailoverProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(TestFailoverInput.class); - Assertions.assertEquals("chvcyyysfgdo", model.properties().failoverDirection()); - Assertions.assertEquals("ubiipuipwoqonma", model.properties().networkType()); - Assertions.assertEquals("ekni", model.properties().networkId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverJobDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverJobDetailsTests.java deleted file mode 100644 index f5d9d41ba9d9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverJobDetailsTests.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FailoverReplicationProtectedItemDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverJobDetails; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TestFailoverJobDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TestFailoverJobDetails model = BinaryData.fromString( - "{\"instanceType\":\"TestFailoverJobDetails\",\"testFailoverStatus\":\"cant\",\"comments\":\"yxzxjmkanbclazof\",\"networkName\":\"xvtemaspm\",\"networkFriendlyName\":\"ydscdkxwd\",\"networkType\":\"jcbhaahnt\",\"protectedItemDetails\":[{\"name\":\"fh\",\"friendlyName\":\"ixo\",\"testVmName\":\"kzdfiv\",\"testVmFriendlyName\":\"jybsrwz\",\"networkConnectionStatus\":\"rgt\",\"networkFriendlyName\":\"hmfppinmgi\",\"subnet\":\"smkw\",\"recoveryPointId\":\"gfragjhxerxlobkd\",\"recoveryPointTime\":\"2021-10-17T16:42:23Z\"},{\"name\":\"vmmnii\",\"friendlyName\":\"ho\",\"testVmName\":\"jn\",\"testVmFriendlyName\":\"bggicnqwlctmw\",\"networkConnectionStatus\":\"lxkrk\",\"networkFriendlyName\":\"vxrktjcjigcwtsp\",\"subnet\":\"bqxasevchefpgee\",\"recoveryPointId\":\"ybruhola\",\"recoveryPointTime\":\"2021-05-29T12:11:44Z\"}],\"affectedObjectDetails\":{\"aowcahdkm\":\"immrimaabsqqlonb\",\"zglkvbgu\":\"jsmihrijezbfsjwf\",\"gnbknhj\":\"bsvbwyot\",\"ffaspsdzkucsz\":\"clxaxw\"}}") - .toObject(TestFailoverJobDetails.class); - Assertions.assertEquals("immrimaabsqqlonb", model.affectedObjectDetails().get("aowcahdkm")); - Assertions.assertEquals("cant", model.testFailoverStatus()); - Assertions.assertEquals("yxzxjmkanbclazof", model.comments()); - Assertions.assertEquals("xvtemaspm", model.networkName()); - Assertions.assertEquals("ydscdkxwd", model.networkFriendlyName()); - Assertions.assertEquals("jcbhaahnt", model.networkType()); - Assertions.assertEquals("fh", model.protectedItemDetails().get(0).name()); - Assertions.assertEquals("ixo", model.protectedItemDetails().get(0).friendlyName()); - Assertions.assertEquals("kzdfiv", model.protectedItemDetails().get(0).testVmName()); - Assertions.assertEquals("jybsrwz", model.protectedItemDetails().get(0).testVmFriendlyName()); - Assertions.assertEquals("rgt", model.protectedItemDetails().get(0).networkConnectionStatus()); - Assertions.assertEquals("hmfppinmgi", model.protectedItemDetails().get(0).networkFriendlyName()); - Assertions.assertEquals("smkw", model.protectedItemDetails().get(0).subnet()); - Assertions.assertEquals("gfragjhxerxlobkd", model.protectedItemDetails().get(0).recoveryPointId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T16:42:23Z"), - model.protectedItemDetails().get(0).recoveryPointTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TestFailoverJobDetails model = new TestFailoverJobDetails() - .withAffectedObjectDetails(mapOf("aowcahdkm", "immrimaabsqqlonb", "zglkvbgu", "jsmihrijezbfsjwf", "gnbknhj", - "bsvbwyot", "ffaspsdzkucsz", "clxaxw")) - .withTestFailoverStatus("cant") - .withComments("yxzxjmkanbclazof") - .withNetworkName("xvtemaspm") - .withNetworkFriendlyName("ydscdkxwd") - .withNetworkType("jcbhaahnt") - .withProtectedItemDetails(Arrays.asList( - new FailoverReplicationProtectedItemDetails().withName("fh") - .withFriendlyName("ixo") - .withTestVmName("kzdfiv") - .withTestVmFriendlyName("jybsrwz") - .withNetworkConnectionStatus("rgt") - .withNetworkFriendlyName("hmfppinmgi") - .withSubnet("smkw") - .withRecoveryPointId("gfragjhxerxlobkd") - .withRecoveryPointTime(OffsetDateTime.parse("2021-10-17T16:42:23Z")), - new FailoverReplicationProtectedItemDetails().withName("vmmnii") - .withFriendlyName("ho") - .withTestVmName("jn") - .withTestVmFriendlyName("bggicnqwlctmw") - .withNetworkConnectionStatus("lxkrk") - .withNetworkFriendlyName("vxrktjcjigcwtsp") - .withSubnet("bqxasevchefpgee") - .withRecoveryPointId("ybruhola") - .withRecoveryPointTime(OffsetDateTime.parse("2021-05-29T12:11:44Z")))); - model = BinaryData.fromObject(model).toObject(TestFailoverJobDetails.class); - Assertions.assertEquals("immrimaabsqqlonb", model.affectedObjectDetails().get("aowcahdkm")); - Assertions.assertEquals("cant", model.testFailoverStatus()); - Assertions.assertEquals("yxzxjmkanbclazof", model.comments()); - Assertions.assertEquals("xvtemaspm", model.networkName()); - Assertions.assertEquals("ydscdkxwd", model.networkFriendlyName()); - Assertions.assertEquals("jcbhaahnt", model.networkType()); - Assertions.assertEquals("fh", model.protectedItemDetails().get(0).name()); - Assertions.assertEquals("ixo", model.protectedItemDetails().get(0).friendlyName()); - Assertions.assertEquals("kzdfiv", model.protectedItemDetails().get(0).testVmName()); - Assertions.assertEquals("jybsrwz", model.protectedItemDetails().get(0).testVmFriendlyName()); - Assertions.assertEquals("rgt", model.protectedItemDetails().get(0).networkConnectionStatus()); - Assertions.assertEquals("hmfppinmgi", model.protectedItemDetails().get(0).networkFriendlyName()); - Assertions.assertEquals("smkw", model.protectedItemDetails().get(0).subnet()); - Assertions.assertEquals("gfragjhxerxlobkd", model.protectedItemDetails().get(0).recoveryPointId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T16:42:23Z"), - model.protectedItemDetails().get(0).recoveryPointTime()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverProviderSpecificInputTests.java deleted file mode 100644 index 64a755c3028f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestFailoverProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestFailoverProviderSpecificInput; - -public final class TestFailoverProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TestFailoverProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"TestFailoverProviderSpecificInput\"}") - .toObject(TestFailoverProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TestFailoverProviderSpecificInput model = new TestFailoverProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(TestFailoverProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateCleanupInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateCleanupInputPropertiesTests.java deleted file mode 100644 index 773fcbe5fcf0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateCleanupInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateCleanupInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class TestMigrateCleanupInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TestMigrateCleanupInputProperties model - = BinaryData.fromString("{\"comments\":\"lnjixisxya\"}").toObject(TestMigrateCleanupInputProperties.class); - Assertions.assertEquals("lnjixisxya", model.comments()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TestMigrateCleanupInputProperties model = new TestMigrateCleanupInputProperties().withComments("lnjixisxya"); - model = BinaryData.fromObject(model).toObject(TestMigrateCleanupInputProperties.class); - Assertions.assertEquals("lnjixisxya", model.comments()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateCleanupInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateCleanupInputTests.java deleted file mode 100644 index c9eb5895ffeb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateCleanupInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateCleanupInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateCleanupInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class TestMigrateCleanupInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TestMigrateCleanupInput model = BinaryData.fromString("{\"properties\":{\"comments\":\"xwyjsflhhc\"}}") - .toObject(TestMigrateCleanupInput.class); - Assertions.assertEquals("xwyjsflhhc", model.properties().comments()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TestMigrateCleanupInput model = new TestMigrateCleanupInput() - .withProperties(new TestMigrateCleanupInputProperties().withComments("xwyjsflhhc")); - model = BinaryData.fromObject(model).toObject(TestMigrateCleanupInput.class); - Assertions.assertEquals("xwyjsflhhc", model.properties().comments()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateInputPropertiesTests.java deleted file mode 100644 index c042a3afb58d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateProviderSpecificInput; - -public final class TestMigrateInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TestMigrateInputProperties model = BinaryData - .fromString("{\"providerSpecificDetails\":{\"instanceType\":\"TestMigrateProviderSpecificInput\"}}") - .toObject(TestMigrateInputProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TestMigrateInputProperties model - = new TestMigrateInputProperties().withProviderSpecificDetails(new TestMigrateProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(TestMigrateInputProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateInputTests.java deleted file mode 100644 index 1f89d40042b4..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateInputTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateProviderSpecificInput; - -public final class TestMigrateInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TestMigrateInput model = BinaryData.fromString( - "{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"TestMigrateProviderSpecificInput\"}}}") - .toObject(TestMigrateInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TestMigrateInput model = new TestMigrateInput().withProperties( - new TestMigrateInputProperties().withProviderSpecificDetails(new TestMigrateProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(TestMigrateInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateProviderSpecificInputTests.java deleted file mode 100644 index 5cb842f14d70..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/TestMigrateProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.TestMigrateProviderSpecificInput; - -public final class TestMigrateProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TestMigrateProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"TestMigrateProviderSpecificInput\"}") - .toObject(TestMigrateProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TestMigrateProviderSpecificInput model = new TestMigrateProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(TestMigrateProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UnplannedFailoverInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UnplannedFailoverInputPropertiesTests.java deleted file mode 100644 index 9728bf6835d9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UnplannedFailoverInputPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UnplannedFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UnplannedFailoverProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class UnplannedFailoverInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UnplannedFailoverInputProperties model = BinaryData.fromString( - "{\"failoverDirection\":\"oxoismsksbpim\",\"sourceSiteOperations\":\"oljxkcgx\",\"providerSpecificDetails\":{\"instanceType\":\"UnplannedFailoverProviderSpecificInput\"}}") - .toObject(UnplannedFailoverInputProperties.class); - Assertions.assertEquals("oxoismsksbpim", model.failoverDirection()); - Assertions.assertEquals("oljxkcgx", model.sourceSiteOperations()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UnplannedFailoverInputProperties model - = new UnplannedFailoverInputProperties().withFailoverDirection("oxoismsksbpim") - .withSourceSiteOperations("oljxkcgx") - .withProviderSpecificDetails(new UnplannedFailoverProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(UnplannedFailoverInputProperties.class); - Assertions.assertEquals("oxoismsksbpim", model.failoverDirection()); - Assertions.assertEquals("oljxkcgx", model.sourceSiteOperations()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UnplannedFailoverInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UnplannedFailoverInputTests.java deleted file mode 100644 index 86392ab47711..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UnplannedFailoverInputTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UnplannedFailoverInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UnplannedFailoverInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UnplannedFailoverProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class UnplannedFailoverInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UnplannedFailoverInput model = BinaryData.fromString( - "{\"properties\":{\"failoverDirection\":\"szqujizdvoq\",\"sourceSiteOperations\":\"ibyowbblgyavutp\",\"providerSpecificDetails\":{\"instanceType\":\"UnplannedFailoverProviderSpecificInput\"}}}") - .toObject(UnplannedFailoverInput.class); - Assertions.assertEquals("szqujizdvoq", model.properties().failoverDirection()); - Assertions.assertEquals("ibyowbblgyavutp", model.properties().sourceSiteOperations()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UnplannedFailoverInput model = new UnplannedFailoverInput() - .withProperties(new UnplannedFailoverInputProperties().withFailoverDirection("szqujizdvoq") - .withSourceSiteOperations("ibyowbblgyavutp") - .withProviderSpecificDetails(new UnplannedFailoverProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(UnplannedFailoverInput.class); - Assertions.assertEquals("szqujizdvoq", model.properties().failoverDirection()); - Assertions.assertEquals("ibyowbblgyavutp", model.properties().sourceSiteOperations()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UnplannedFailoverProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UnplannedFailoverProviderSpecificInputTests.java deleted file mode 100644 index dc8210f4178e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UnplannedFailoverProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UnplannedFailoverProviderSpecificInput; - -public final class UnplannedFailoverProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UnplannedFailoverProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"UnplannedFailoverProviderSpecificInput\"}") - .toObject(UnplannedFailoverProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UnplannedFailoverProviderSpecificInput model = new UnplannedFailoverProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(UnplannedFailoverProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateApplianceForReplicationProtectedItemInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateApplianceForReplicationProtectedItemInputTests.java deleted file mode 100644 index 0c7c21b9d53e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateApplianceForReplicationProtectedItemInputTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateApplianceForReplicationProtectedItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateApplianceForReplicationProtectedItemInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemProviderSpecificInput; -import org.junit.jupiter.api.Assertions; - -public final class UpdateApplianceForReplicationProtectedItemInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateApplianceForReplicationProtectedItemInput model = BinaryData.fromString( - "{\"properties\":{\"targetApplianceId\":\"xsffgcviz\",\"providerSpecificDetails\":{\"instanceType\":\"UpdateApplianceForReplicationProtectedItemProviderSpecificInput\"}}}") - .toObject(UpdateApplianceForReplicationProtectedItemInput.class); - Assertions.assertEquals("xsffgcviz", model.properties().targetApplianceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateApplianceForReplicationProtectedItemInput model - = new UpdateApplianceForReplicationProtectedItemInput().withProperties( - new UpdateApplianceForReplicationProtectedItemInputProperties().withTargetApplianceId("xsffgcviz") - .withProviderSpecificDetails(new UpdateReplicationProtectedItemProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(UpdateApplianceForReplicationProtectedItemInput.class); - Assertions.assertEquals("xsffgcviz", model.properties().targetApplianceId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateDiskInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateDiskInputTests.java deleted file mode 100644 index 01c03a94f8a3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateDiskInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateDiskInput; -import org.junit.jupiter.api.Assertions; - -public final class UpdateDiskInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateDiskInput model = BinaryData.fromString("{\"diskId\":\"zamicb\",\"targetDiskName\":\"wcdgzsez\"}") - .toObject(UpdateDiskInput.class); - Assertions.assertEquals("zamicb", model.diskId()); - Assertions.assertEquals("wcdgzsez", model.targetDiskName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateDiskInput model = new UpdateDiskInput().withDiskId("zamicb").withTargetDiskName("wcdgzsez"); - model = BinaryData.fromObject(model).toObject(UpdateDiskInput.class); - Assertions.assertEquals("zamicb", model.diskId()); - Assertions.assertEquals("wcdgzsez", model.targetDiskName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMigrationItemInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMigrationItemInputPropertiesTests.java deleted file mode 100644 index b05adea4f131..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMigrationItemInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMigrationItemInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMigrationItemProviderSpecificInput; - -public final class UpdateMigrationItemInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateMigrationItemInputProperties model = BinaryData - .fromString("{\"providerSpecificDetails\":{\"instanceType\":\"UpdateMigrationItemProviderSpecificInput\"}}") - .toObject(UpdateMigrationItemInputProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateMigrationItemInputProperties model = new UpdateMigrationItemInputProperties() - .withProviderSpecificDetails(new UpdateMigrationItemProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(UpdateMigrationItemInputProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMigrationItemInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMigrationItemInputTests.java deleted file mode 100644 index 23c494a1825e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMigrationItemInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMigrationItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMigrationItemInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMigrationItemProviderSpecificInput; - -public final class UpdateMigrationItemInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateMigrationItemInput model = BinaryData.fromString( - "{\"properties\":{\"providerSpecificDetails\":{\"instanceType\":\"UpdateMigrationItemProviderSpecificInput\"}}}") - .toObject(UpdateMigrationItemInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateMigrationItemInput model - = new UpdateMigrationItemInput().withProperties(new UpdateMigrationItemInputProperties() - .withProviderSpecificDetails(new UpdateMigrationItemProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(UpdateMigrationItemInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMigrationItemProviderSpecificInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMigrationItemProviderSpecificInputTests.java deleted file mode 100644 index eddb60463ad6..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMigrationItemProviderSpecificInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMigrationItemProviderSpecificInput; - -public final class UpdateMigrationItemProviderSpecificInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateMigrationItemProviderSpecificInput model - = BinaryData.fromString("{\"instanceType\":\"UpdateMigrationItemProviderSpecificInput\"}") - .toObject(UpdateMigrationItemProviderSpecificInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateMigrationItemProviderSpecificInput model = new UpdateMigrationItemProviderSpecificInput(); - model = BinaryData.fromObject(model).toObject(UpdateMigrationItemProviderSpecificInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMobilityServiceRequestPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMobilityServiceRequestPropertiesTests.java deleted file mode 100644 index 0b3b7f64d6aa..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMobilityServiceRequestPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMobilityServiceRequestProperties; -import org.junit.jupiter.api.Assertions; - -public final class UpdateMobilityServiceRequestPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateMobilityServiceRequestProperties model = BinaryData.fromString("{\"runAsAccountId\":\"tsttktlahbq\"}") - .toObject(UpdateMobilityServiceRequestProperties.class); - Assertions.assertEquals("tsttktlahbq", model.runAsAccountId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateMobilityServiceRequestProperties model - = new UpdateMobilityServiceRequestProperties().withRunAsAccountId("tsttktlahbq"); - model = BinaryData.fromObject(model).toObject(UpdateMobilityServiceRequestProperties.class); - Assertions.assertEquals("tsttktlahbq", model.runAsAccountId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMobilityServiceRequestTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMobilityServiceRequestTests.java deleted file mode 100644 index 89d49b76e79f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateMobilityServiceRequestTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMobilityServiceRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateMobilityServiceRequestProperties; -import org.junit.jupiter.api.Assertions; - -public final class UpdateMobilityServiceRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateMobilityServiceRequest model - = BinaryData.fromString("{\"properties\":{\"runAsAccountId\":\"bdyhgkfminsgowz\"}}") - .toObject(UpdateMobilityServiceRequest.class); - Assertions.assertEquals("bdyhgkfminsgowz", model.properties().runAsAccountId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateMobilityServiceRequest model = new UpdateMobilityServiceRequest() - .withProperties(new UpdateMobilityServiceRequestProperties().withRunAsAccountId("bdyhgkfminsgowz")); - model = BinaryData.fromObject(model).toObject(UpdateMobilityServiceRequest.class); - Assertions.assertEquals("bdyhgkfminsgowz", model.properties().runAsAccountId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateNetworkMappingInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateNetworkMappingInputPropertiesTests.java deleted file mode 100644 index 4d07d0fc4f31..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateNetworkMappingInputPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricSpecificUpdateNetworkMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateNetworkMappingInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class UpdateNetworkMappingInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateNetworkMappingInputProperties model = BinaryData.fromString( - "{\"recoveryFabricName\":\"fbishcbkha\",\"recoveryNetworkId\":\"eyeam\",\"fabricSpecificDetails\":{\"instanceType\":\"FabricSpecificUpdateNetworkMappingInput\"}}") - .toObject(UpdateNetworkMappingInputProperties.class); - Assertions.assertEquals("fbishcbkha", model.recoveryFabricName()); - Assertions.assertEquals("eyeam", model.recoveryNetworkId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateNetworkMappingInputProperties model - = new UpdateNetworkMappingInputProperties().withRecoveryFabricName("fbishcbkha") - .withRecoveryNetworkId("eyeam") - .withFabricSpecificDetails(new FabricSpecificUpdateNetworkMappingInput()); - model = BinaryData.fromObject(model).toObject(UpdateNetworkMappingInputProperties.class); - Assertions.assertEquals("fbishcbkha", model.recoveryFabricName()); - Assertions.assertEquals("eyeam", model.recoveryNetworkId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateNetworkMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateNetworkMappingInputTests.java deleted file mode 100644 index 68894995b9cd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateNetworkMappingInputTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.FabricSpecificUpdateNetworkMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateNetworkMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateNetworkMappingInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class UpdateNetworkMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateNetworkMappingInput model = BinaryData.fromString( - "{\"properties\":{\"recoveryFabricName\":\"de\",\"recoveryNetworkId\":\"jzicwifsjt\",\"fabricSpecificDetails\":{\"instanceType\":\"FabricSpecificUpdateNetworkMappingInput\"}}}") - .toObject(UpdateNetworkMappingInput.class); - Assertions.assertEquals("de", model.properties().recoveryFabricName()); - Assertions.assertEquals("jzicwifsjt", model.properties().recoveryNetworkId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateNetworkMappingInput model = new UpdateNetworkMappingInput() - .withProperties(new UpdateNetworkMappingInputProperties().withRecoveryFabricName("de") - .withRecoveryNetworkId("jzicwifsjt") - .withFabricSpecificDetails(new FabricSpecificUpdateNetworkMappingInput())); - model = BinaryData.fromObject(model).toObject(UpdateNetworkMappingInput.class); - Assertions.assertEquals("de", model.properties().recoveryFabricName()); - Assertions.assertEquals("jzicwifsjt", model.properties().recoveryNetworkId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdatePolicyInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdatePolicyInputPropertiesTests.java deleted file mode 100644 index 86a96dfd0b6d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdatePolicyInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProviderSpecificInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdatePolicyInputProperties; - -public final class UpdatePolicyInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdatePolicyInputProperties model = BinaryData - .fromString("{\"replicationProviderSettings\":{\"instanceType\":\"PolicyProviderSpecificInput\"}}") - .toObject(UpdatePolicyInputProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdatePolicyInputProperties model - = new UpdatePolicyInputProperties().withReplicationProviderSettings(new PolicyProviderSpecificInput()); - model = BinaryData.fromObject(model).toObject(UpdatePolicyInputProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdatePolicyInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdatePolicyInputTests.java deleted file mode 100644 index f2e04aecb869..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdatePolicyInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PolicyProviderSpecificInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdatePolicyInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdatePolicyInputProperties; - -public final class UpdatePolicyInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdatePolicyInput model = BinaryData - .fromString( - "{\"properties\":{\"replicationProviderSettings\":{\"instanceType\":\"PolicyProviderSpecificInput\"}}}") - .toObject(UpdatePolicyInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdatePolicyInput model = new UpdatePolicyInput().withProperties( - new UpdatePolicyInputProperties().withReplicationProviderSettings(new PolicyProviderSpecificInput())); - model = BinaryData.fromObject(model).toObject(UpdatePolicyInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateProtectionContainerMappingInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateProtectionContainerMappingInputPropertiesTests.java deleted file mode 100644 index b9dd6eefcbcb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateProtectionContainerMappingInputPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderSpecificUpdateContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateProtectionContainerMappingInputProperties; - -public final class UpdateProtectionContainerMappingInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateProtectionContainerMappingInputProperties model = BinaryData.fromString( - "{\"providerSpecificInput\":{\"instanceType\":\"ReplicationProviderSpecificUpdateContainerMappingInput\"}}") - .toObject(UpdateProtectionContainerMappingInputProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateProtectionContainerMappingInputProperties model = new UpdateProtectionContainerMappingInputProperties() - .withProviderSpecificInput(new ReplicationProviderSpecificUpdateContainerMappingInput()); - model = BinaryData.fromObject(model).toObject(UpdateProtectionContainerMappingInputProperties.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateProtectionContainerMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateProtectionContainerMappingInputTests.java deleted file mode 100644 index 34916e5635f0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateProtectionContainerMappingInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProviderSpecificUpdateContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateProtectionContainerMappingInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateProtectionContainerMappingInputProperties; - -public final class UpdateProtectionContainerMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateProtectionContainerMappingInput model = BinaryData.fromString( - "{\"properties\":{\"providerSpecificInput\":{\"instanceType\":\"ReplicationProviderSpecificUpdateContainerMappingInput\"}}}") - .toObject(UpdateProtectionContainerMappingInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateProtectionContainerMappingInput model = new UpdateProtectionContainerMappingInput() - .withProperties(new UpdateProtectionContainerMappingInputProperties() - .withProviderSpecificInput(new ReplicationProviderSpecificUpdateContainerMappingInput())); - model = BinaryData.fromObject(model).toObject(UpdateProtectionContainerMappingInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateRecoveryPlanInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateRecoveryPlanInputPropertiesTests.java deleted file mode 100644 index c342dec4f8a2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateRecoveryPlanInputPropertiesTests.java +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanAction; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroup; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItemOperation; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateRecoveryPlanInputProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateRecoveryPlanInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateRecoveryPlanInputProperties model = BinaryData.fromString( - "{\"groups\":[{\"groupType\":\"Boot\",\"replicationProtectedItems\":[{\"id\":\"arnroohguab\",\"virtualMachineId\":\"ghktdpy\"}],\"startGroupActions\":[{\"actionName\":\"coe\",\"failoverTypes\":[\"ChangePit\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"rottjzcfyjzptw\",\"failoverTypes\":[\"CompleteMigration\",\"ChangePit\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"infsz\",\"failoverTypes\":[\"DisableProtection\",\"TestFailoverCleanup\",\"UnplannedFailover\",\"SwitchProtection\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\",\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"l\",\"failoverTypes\":[\"CompleteMigration\"],\"failoverDirections\":[\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"yypsjoqc\",\"failoverTypes\":[\"ReverseReplicate\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"zv\",\"failoverTypes\":[\"ReverseReplicate\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Shutdown\",\"replicationProtectedItems\":[{\"id\":\"mpzqjhhhq\",\"virtualMachineId\":\"w\"}],\"startGroupActions\":[{\"actionName\":\"acoyvivbsizusjs\",\"failoverTypes\":[\"CancelFailover\",\"CompleteMigration\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"ijiufehgmvfln\",\"failoverTypes\":[\"ReverseReplicate\",\"Failback\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"lniylylyfwxz\",\"failoverTypes\":[\"UnplannedFailover\",\"TestFailoverCleanup\",\"SwitchProtection\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"pgxyjtcdxabbu\",\"failoverTypes\":[\"UnplannedFailover\",\"Commit\",\"SwitchProtection\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"lqpx\",\"failoverTypes\":[\"FinalizeFailback\",\"ChangePit\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"wwnlzafwxudgnh\",\"failoverTypes\":[\"TestFailoverCleanup\",\"FinalizeFailback\",\"ChangePit\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"nbwgpbemeluclv\",\"failoverTypes\":[\"UnplannedFailover\",\"UnplannedFailover\",\"DisableProtection\",\"PlannedFailover\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{\"id\":\"h\",\"virtualMachineId\":\"qfaqnvzoqg\"},{\"id\":\"pem\",\"virtualMachineId\":\"gavsczuejd\"},{\"id\":\"ptlghwzhomewjjst\",\"virtualMachineId\":\"uhqawmoaianc\"},{\"id\":\"vodrrslblxydkxr\",\"virtualMachineId\":\"vbxiwkgfbqlj\"}],\"startGroupActions\":[{\"actionName\":\"hychocokuleh\",\"failoverTypes\":[\"TestFailover\",\"PlannedFailover\",\"CompleteMigration\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"aweyur\",\"failoverTypes\":[\"UnplannedFailover\",\"CancelFailover\",\"ChangePit\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"av\",\"failoverTypes\":[\"ReverseReplicate\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"xmrgchbapxkiy\",\"failoverTypes\":[\"CancelFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"us\",\"failoverTypes\":[\"ReverseReplicate\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"oycblevpmc\",\"failoverTypes\":[\"FinalizeFailback\",\"Failback\",\"FinalizeFailback\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"xlzgsjgkzzl\",\"failoverTypes\":[\"PlannedFailover\",\"Failback\"],\"failoverDirections\":[\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]},{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{\"id\":\"wmbjlzqsczpg\",\"virtualMachineId\":\"wnapfdq\"},{\"id\":\"wf\",\"virtualMachineId\":\"tnuwjtkschgc\"},{\"id\":\"y\",\"virtualMachineId\":\"eseyqr\"},{\"id\":\"y\",\"virtualMachineId\":\"dotjvdk\"}],\"startGroupActions\":[{\"actionName\":\"ws\",\"failoverTypes\":[\"ChangePit\",\"TestFailoverCleanup\",\"Failback\",\"UnplannedFailover\"],\"failoverDirections\":[\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"vwisp\",\"failoverTypes\":[\"Commit\",\"FinalizeFailback\",\"CancelFailover\",\"Commit\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"qvtwknvgmmbugt\",\"failoverTypes\":[\"TestFailoverCleanup\",\"TestFailoverCleanup\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"PrimaryToRecovery\",\"RecoveryToPrimary\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}]}") - .toObject(UpdateRecoveryPlanInputProperties.class); - Assertions.assertEquals(RecoveryPlanGroupType.BOOT, model.groups().get(0).groupType()); - Assertions.assertEquals("arnroohguab", model.groups().get(0).replicationProtectedItems().get(0).id()); - Assertions.assertEquals("ghktdpy", model.groups().get(0).replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("coe", model.groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.CHANGE_PIT, - model.groups().get(0).startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.groups().get(0).startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("l", model.groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - model.groups().get(0).endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.groups().get(0).endGroupActions().get(0).failoverDirections().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRecoveryPlanInputProperties model = new UpdateRecoveryPlanInputProperties().withGroups(Arrays.asList( - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.BOOT) - .withReplicationProtectedItems(Arrays - .asList(new RecoveryPlanProtectedItem().withId("arnroohguab").withVirtualMachineId("ghktdpy"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("coe") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("rottjzcfyjzptw") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("infsz") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.DISABLE_PROTECTION, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.SWITCH_PROTECTION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("l") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMPLETE_MIGRATION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("yypsjoqc") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.REVERSE_REPLICATE)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("zv") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.REVERSE_REPLICATE)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.SHUTDOWN) - .withReplicationProtectedItems( - Arrays.asList(new RecoveryPlanProtectedItem().withId("mpzqjhhhq").withVirtualMachineId("w"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("acoyvivbsizusjs") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.COMPLETE_MIGRATION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("ijiufehgmvfln") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.REVERSE_REPLICATE, - ReplicationProtectedItemOperation.FAILBACK)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("lniylylyfwxz") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.SWITCH_PROTECTION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList(new RecoveryPlanAction().withActionName("pgxyjtcdxabbu") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.COMMIT, ReplicationProtectedItemOperation.SWITCH_PROTECTION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("lqpx") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("wwnlzafwxudgnh") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("nbwgpbemeluclv") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.DISABLE_PROTECTION, - ReplicationProtectedItemOperation.PLANNED_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems( - Arrays.asList(new RecoveryPlanProtectedItem().withId("h").withVirtualMachineId("qfaqnvzoqg"), - new RecoveryPlanProtectedItem().withId("pem").withVirtualMachineId("gavsczuejd"), - new RecoveryPlanProtectedItem().withId("ptlghwzhomewjjst").withVirtualMachineId("uhqawmoaianc"), - new RecoveryPlanProtectedItem().withId("vodrrslblxydkxr").withVirtualMachineId("vbxiwkgfbqlj"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("hychocokuleh") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.TEST_FAILOVER, - ReplicationProtectedItemOperation.PLANNED_FAILOVER, - ReplicationProtectedItemOperation.COMPLETE_MIGRATION)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("aweyur") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("av") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.REVERSE_REPLICATE)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("xmrgchbapxkiy") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.CANCEL_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("us") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.REVERSE_REPLICATE)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("oycblevpmc") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.FAILBACK, - ReplicationProtectedItemOperation.FINALIZE_FAILBACK)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("xlzgsjgkzzl") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.PLANNED_FAILOVER, - ReplicationProtectedItemOperation.FAILBACK)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))), - new RecoveryPlanGroup().withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems(Arrays.asList( - new RecoveryPlanProtectedItem().withId("wmbjlzqsczpg").withVirtualMachineId("wnapfdq"), - new RecoveryPlanProtectedItem().withId("wf").withVirtualMachineId("tnuwjtkschgc"), - new RecoveryPlanProtectedItem().withId("y").withVirtualMachineId("eseyqr"), - new RecoveryPlanProtectedItem().withId("y").withVirtualMachineId("dotjvdk"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("ws") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.CHANGE_PIT, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.FAILBACK, - ReplicationProtectedItemOperation.UNPLANNED_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("vwisp") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMMIT, - ReplicationProtectedItemOperation.FINALIZE_FAILBACK, - ReplicationProtectedItemOperation.CANCEL_FAILOVER, - ReplicationProtectedItemOperation.COMMIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList(new RecoveryPlanAction().withActionName("qvtwknvgmmbugt") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))))); - model = BinaryData.fromObject(model).toObject(UpdateRecoveryPlanInputProperties.class); - Assertions.assertEquals(RecoveryPlanGroupType.BOOT, model.groups().get(0).groupType()); - Assertions.assertEquals("arnroohguab", model.groups().get(0).replicationProtectedItems().get(0).id()); - Assertions.assertEquals("ghktdpy", model.groups().get(0).replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("coe", model.groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.CHANGE_PIT, - model.groups().get(0).startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.groups().get(0).startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("l", model.groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - model.groups().get(0).endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.groups().get(0).endGroupActions().get(0).failoverDirections().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateRecoveryPlanInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateRecoveryPlanInputTests.java deleted file mode 100644 index 4ad6ec8c1cd8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateRecoveryPlanInputTests.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PossibleOperationsDirections; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanAction; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanActionDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroup; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanGroupType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryPlanProtectedItem; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.ReplicationProtectedItemOperation; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateRecoveryPlanInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateRecoveryPlanInputProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateRecoveryPlanInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateRecoveryPlanInput model = BinaryData.fromString( - "{\"properties\":{\"groups\":[{\"groupType\":\"Failover\",\"replicationProtectedItems\":[{\"id\":\"kfqlwx\",\"virtualMachineId\":\"ykalsyga\"},{\"id\":\"njpnnbmj\",\"virtualMachineId\":\"ibjgsjjxxahm\"},{\"id\":\"ad\",\"virtualMachineId\":\"qegxyivpin\"},{\"id\":\"hwbjijkgqxnhmbk\",\"virtualMachineId\":\"njaujvaan\"}],\"startGroupActions\":[{\"actionName\":\"iycwkdta\",\"failoverTypes\":[\"ChangePit\",\"CompleteMigration\",\"ReverseReplicate\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"umrrqmbzm\",\"failoverTypes\":[\"ChangePit\",\"UnplannedFailover\",\"FinalizeFailback\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\",\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"jsi\",\"failoverTypes\":[\"CompleteMigration\",\"DisableProtection\",\"TestFailover\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"PrimaryToRecovery\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}},{\"actionName\":\"sokdgoge\",\"failoverTypes\":[\"ReverseReplicate\",\"CompleteMigration\",\"DisableProtection\",\"TestFailoverCleanup\"],\"failoverDirections\":[\"PrimaryToRecovery\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}],\"endGroupActions\":[{\"actionName\":\"ozkyewnfnzh\",\"failoverTypes\":[\"UnplannedFailover\",\"ChangePit\"],\"failoverDirections\":[\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"RecoveryToPrimary\",\"RecoveryToPrimary\"],\"customDetails\":{\"instanceType\":\"RecoveryPlanActionDetails\"}}]}]}}") - .toObject(UpdateRecoveryPlanInput.class); - Assertions.assertEquals(RecoveryPlanGroupType.FAILOVER, model.properties().groups().get(0).groupType()); - Assertions.assertEquals("kfqlwx", model.properties().groups().get(0).replicationProtectedItems().get(0).id()); - Assertions.assertEquals("ykalsyga", - model.properties().groups().get(0).replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("iycwkdta", model.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.CHANGE_PIT, - model.properties().groups().get(0).startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.properties().groups().get(0).startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("ozkyewnfnzh", - model.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - model.properties().groups().get(0).endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.properties().groups().get(0).endGroupActions().get(0).failoverDirections().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRecoveryPlanInput model = new UpdateRecoveryPlanInput() - .withProperties(new UpdateRecoveryPlanInputProperties().withGroups(Arrays.asList(new RecoveryPlanGroup() - .withGroupType(RecoveryPlanGroupType.FAILOVER) - .withReplicationProtectedItems( - Arrays.asList(new RecoveryPlanProtectedItem().withId("kfqlwx").withVirtualMachineId("ykalsyga"), - new RecoveryPlanProtectedItem().withId("njpnnbmj").withVirtualMachineId("ibjgsjjxxahm"), - new RecoveryPlanProtectedItem().withId("ad").withVirtualMachineId("qegxyivpin"), - new RecoveryPlanProtectedItem().withId("hwbjijkgqxnhmbk").withVirtualMachineId("njaujvaan"))) - .withStartGroupActions(Arrays.asList( - new RecoveryPlanAction().withActionName("iycwkdta") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.CHANGE_PIT, - ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - ReplicationProtectedItemOperation.REVERSE_REPLICATE)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("umrrqmbzm") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.CHANGE_PIT, - ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.FINALIZE_FAILBACK)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("jsi") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - ReplicationProtectedItemOperation.DISABLE_PROTECTION, - ReplicationProtectedItemOperation.TEST_FAILOVER)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.PRIMARY_TO_RECOVERY)) - .withCustomDetails(new RecoveryPlanActionDetails()), - new RecoveryPlanAction().withActionName("sokdgoge") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.REVERSE_REPLICATE, - ReplicationProtectedItemOperation.COMPLETE_MIGRATION, - ReplicationProtectedItemOperation.DISABLE_PROTECTION, - ReplicationProtectedItemOperation.TEST_FAILOVER_CLEANUP)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails()))) - .withEndGroupActions(Arrays.asList(new RecoveryPlanAction().withActionName("ozkyewnfnzh") - .withFailoverTypes(Arrays.asList(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - ReplicationProtectedItemOperation.CHANGE_PIT)) - .withFailoverDirections(Arrays.asList(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - PossibleOperationsDirections.RECOVERY_TO_PRIMARY)) - .withCustomDetails(new RecoveryPlanActionDetails())))))); - model = BinaryData.fromObject(model).toObject(UpdateRecoveryPlanInput.class); - Assertions.assertEquals(RecoveryPlanGroupType.FAILOVER, model.properties().groups().get(0).groupType()); - Assertions.assertEquals("kfqlwx", model.properties().groups().get(0).replicationProtectedItems().get(0).id()); - Assertions.assertEquals("ykalsyga", - model.properties().groups().get(0).replicationProtectedItems().get(0).virtualMachineId()); - Assertions.assertEquals("iycwkdta", model.properties().groups().get(0).startGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.CHANGE_PIT, - model.properties().groups().get(0).startGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.PRIMARY_TO_RECOVERY, - model.properties().groups().get(0).startGroupActions().get(0).failoverDirections().get(0)); - Assertions.assertEquals("ozkyewnfnzh", - model.properties().groups().get(0).endGroupActions().get(0).actionName()); - Assertions.assertEquals(ReplicationProtectedItemOperation.UNPLANNED_FAILOVER, - model.properties().groups().get(0).endGroupActions().get(0).failoverTypes().get(0)); - Assertions.assertEquals(PossibleOperationsDirections.RECOVERY_TO_PRIMARY, - model.properties().groups().get(0).endGroupActions().get(0).failoverDirections().get(0)); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateReplicationProtectedItemInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateReplicationProtectedItemInputPropertiesTests.java deleted file mode 100644 index 2dd86ff048d0..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateReplicationProtectedItemInputPropertiesTests.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IpConfigInputDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LicenseType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMNicInputDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateReplicationProtectedItemInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateReplicationProtectedItemInputProperties model = BinaryData.fromString( - "{\"recoveryAzureVMName\":\"lpqblylsyxk\",\"recoveryAzureVMSize\":\"nsj\",\"selectedRecoveryAzureNetworkId\":\"vti\",\"selectedTfoAzureNetworkId\":\"xsdszuempsb\",\"selectedSourceNicId\":\"f\",\"enableRdpOnTargetOption\":\"eyvpnqicvinvkj\",\"vmNics\":[{\"nicId\":\"rbuukzclewyhmlwp\",\"ipConfigs\":[{\"ipConfigName\":\"pofncck\",\"isPrimary\":false,\"isSeletedForFailover\":true,\"recoverySubnetName\":\"hxx\",\"recoveryStaticIPAddress\":\"yq\",\"recoveryPublicIPAddressId\":\"zfeqztppri\",\"recoveryLBBackendAddressPoolIds\":[\"or\",\"altol\",\"ncwsob\",\"wcsdbnwdcfhucq\"],\"tfoSubnetName\":\"fuvglsbjjca\",\"tfoStaticIPAddress\":\"xbvtvudu\",\"tfoPublicIPAddressId\":\"cormr\",\"tfoLBBackendAddressPoolIds\":[\"tvcof\",\"dflvkg\",\"u\",\"gdknnqv\"]},{\"ipConfigName\":\"znqntoru\",\"isPrimary\":true,\"isSeletedForFailover\":false,\"recoverySubnetName\":\"mkycgra\",\"recoveryStaticIPAddress\":\"juetaebur\",\"recoveryPublicIPAddressId\":\"dmovsm\",\"recoveryLBBackendAddressPoolIds\":[\"wabm\",\"oefki\"],\"tfoSubnetName\":\"vtpuqujmqlgk\",\"tfoStaticIPAddress\":\"tndoaongbjc\",\"tfoPublicIPAddressId\":\"ujitcjedftww\",\"tfoLBBackendAddressPoolIds\":[\"kojvd\"]},{\"ipConfigName\":\"zfoqouicybxar\",\"isPrimary\":true,\"isSeletedForFailover\":false,\"recoverySubnetName\":\"oxciqopidoamcio\",\"recoveryStaticIPAddress\":\"khazxkhnzbonlwn\",\"recoveryPublicIPAddressId\":\"egokdwbwhkszzcmr\",\"recoveryLBBackendAddressPoolIds\":[\"ztvbtqgsfr\",\"oyzko\",\"wtl\",\"nguxawqaldsy\"],\"tfoSubnetName\":\"ximerqfobwyznk\",\"tfoStaticIPAddress\":\"kutwpf\",\"tfoPublicIPAddressId\":\"a\",\"tfoLBBackendAddressPoolIds\":[\"r\",\"kdsnfdsdoakgtdl\",\"kkze\"]},{\"ipConfigName\":\"l\",\"isPrimary\":true,\"isSeletedForFailover\":false,\"recoverySubnetName\":\"dsttwvo\",\"recoveryStaticIPAddress\":\"bbejdcngqqm\",\"recoveryPublicIPAddressId\":\"kufgmj\",\"recoveryLBBackendAddressPoolIds\":[\"rdgrtw\"],\"tfoSubnetName\":\"nuuzkopbm\",\"tfoStaticIPAddress\":\"rfdwoyu\",\"tfoPublicIPAddressId\":\"ziuiefozbhdm\",\"tfoLBBackendAddressPoolIds\":[\"mzqhoftrmaequi\"]}],\"selectionType\":\"xicslfao\",\"recoveryNetworkSecurityGroupId\":\"piyylhalnswhccsp\",\"enableAcceleratedNetworkingOnRecovery\":true,\"tfoNetworkSecurityGroupId\":\"vwitqscyw\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"oluhczbwemh\",\"recoveryNicResourceGroupName\":\"rsbrgzdwm\",\"reuseExistingNic\":true,\"tfoNicName\":\"pqwd\",\"tfoNicResourceGroupName\":\"gicccnxqhuex\",\"tfoReuseExistingNic\":true,\"targetNicName\":\"lstvlzywe\"},{\"nicId\":\"zrncsdt\",\"ipConfigs\":[{\"ipConfigName\":\"iypbsfgytgusl\",\"isPrimary\":false,\"isSeletedForFailover\":false,\"recoverySubnetName\":\"gq\",\"recoveryStaticIPAddress\":\"yhejhzisxgfp\",\"recoveryPublicIPAddressId\":\"olppvksrpqvujz\",\"recoveryLBBackendAddressPoolIds\":[\"htwdwrftswibyrcd\",\"bhshfwpracstwity\",\"hevxcced\"],\"tfoSubnetName\":\"nmdyodnwzxl\",\"tfoStaticIPAddress\":\"cvnhltiugc\",\"tfoPublicIPAddressId\":\"avvwxqi\",\"tfoLBBackendAddressPoolIds\":[\"unyowxwl\",\"djrkvfgbvfvpd\",\"odacizs\",\"q\"]}],\"selectionType\":\"krribdeibqi\",\"recoveryNetworkSecurityGroupId\":\"kghv\",\"enableAcceleratedNetworkingOnRecovery\":true,\"tfoNetworkSecurityGroupId\":\"wm\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"ajpjo\",\"recoveryNicResourceGroupName\":\"kqnyh\",\"reuseExistingNic\":false,\"tfoNicName\":\"tjivfxzsjabib\",\"tfoNicResourceGroupName\":\"stawfsdjpvkv\",\"tfoReuseExistingNic\":true,\"targetNicName\":\"bkzbzkd\"},{\"nicId\":\"cjabudurgkakmo\",\"ipConfigs\":[{\"ipConfigName\":\"jk\",\"isPrimary\":false,\"isSeletedForFailover\":true,\"recoverySubnetName\":\"uwqlgzrfzeey\",\"recoveryStaticIPAddress\":\"izikayuhq\",\"recoveryPublicIPAddressId\":\"jbsybbqw\",\"recoveryLBBackendAddressPoolIds\":[\"ldgmfpgvmpip\"],\"tfoSubnetName\":\"ltha\",\"tfoStaticIPAddress\":\"x\",\"tfoPublicIPAddressId\":\"mwutwbdsre\",\"tfoLBBackendAddressPoolIds\":[\"rhneuyowq\",\"d\",\"ytisibir\"]},{\"ipConfigName\":\"pikpz\",\"isPrimary\":false,\"isSeletedForFailover\":false,\"recoverySubnetName\":\"nlfzxiavrmbz\",\"recoveryStaticIPAddress\":\"okixrjqcir\",\"recoveryPublicIPAddressId\":\"pfrlazsz\",\"recoveryLBBackendAddressPoolIds\":[\"oiindfpwpjy\",\"wbtlhflsjcdh\"],\"tfoSubnetName\":\"fjvfbgofeljagr\",\"tfoStaticIPAddress\":\"qhl\",\"tfoPublicIPAddressId\":\"riiiojnalghfkv\",\"tfoLBBackendAddressPoolIds\":[\"ex\",\"owueluqh\"]}],\"selectionType\":\"hhxvrhmzkwpj\",\"recoveryNetworkSecurityGroupId\":\"wspughftqsxhqx\",\"enableAcceleratedNetworkingOnRecovery\":true,\"tfoNetworkSecurityGroupId\":\"kndxdigrjgu\",\"enableAcceleratedNetworkingOnTfo\":true,\"recoveryNicName\":\"msyqtfi\",\"recoveryNicResourceGroupName\":\"hbotzingamvppho\",\"reuseExistingNic\":false,\"tfoNicName\":\"udphqamvdkfwyn\",\"tfoNicResourceGroupName\":\"vtbvkayh\",\"tfoReuseExistingNic\":false,\"targetNicName\":\"yqiatkzwp\"}],\"licenseType\":\"WindowsServer\",\"recoveryAvailabilitySetId\":\"zcjaesgvvsccy\",\"providerSpecificDetails\":{\"instanceType\":\"UpdateReplicationProtectedItemProviderInput\"}}") - .toObject(UpdateReplicationProtectedItemInputProperties.class); - Assertions.assertEquals("lpqblylsyxk", model.recoveryAzureVMName()); - Assertions.assertEquals("nsj", model.recoveryAzureVMSize()); - Assertions.assertEquals("vti", model.selectedRecoveryAzureNetworkId()); - Assertions.assertEquals("xsdszuempsb", model.selectedTfoAzureNetworkId()); - Assertions.assertEquals("f", model.selectedSourceNicId()); - Assertions.assertEquals("eyvpnqicvinvkj", model.enableRdpOnTargetOption()); - Assertions.assertEquals("rbuukzclewyhmlwp", model.vmNics().get(0).nicId()); - Assertions.assertEquals("pofncck", model.vmNics().get(0).ipConfigs().get(0).ipConfigName()); - Assertions.assertEquals(false, model.vmNics().get(0).ipConfigs().get(0).isPrimary()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("hxx", model.vmNics().get(0).ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("yq", model.vmNics().get(0).ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("zfeqztppri", model.vmNics().get(0).ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("or", - model.vmNics().get(0).ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("fuvglsbjjca", model.vmNics().get(0).ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("xbvtvudu", model.vmNics().get(0).ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("cormr", model.vmNics().get(0).ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("tvcof", model.vmNics().get(0).ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("xicslfao", model.vmNics().get(0).selectionType()); - Assertions.assertEquals("piyylhalnswhccsp", model.vmNics().get(0).recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(true, model.vmNics().get(0).enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("vwitqscyw", model.vmNics().get(0).tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("oluhczbwemh", model.vmNics().get(0).recoveryNicName()); - Assertions.assertEquals("rsbrgzdwm", model.vmNics().get(0).recoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).reuseExistingNic()); - Assertions.assertEquals("pqwd", model.vmNics().get(0).tfoNicName()); - Assertions.assertEquals("gicccnxqhuex", model.vmNics().get(0).tfoNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).tfoReuseExistingNic()); - Assertions.assertEquals("lstvlzywe", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals(LicenseType.WINDOWS_SERVER, model.licenseType()); - Assertions.assertEquals("zcjaesgvvsccy", model.recoveryAvailabilitySetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateReplicationProtectedItemInputProperties model - = new UpdateReplicationProtectedItemInputProperties().withRecoveryAzureVMName("lpqblylsyxk") - .withRecoveryAzureVMSize("nsj") - .withSelectedRecoveryAzureNetworkId("vti") - .withSelectedTfoAzureNetworkId("xsdszuempsb") - .withSelectedSourceNicId("f") - .withEnableRdpOnTargetOption("eyvpnqicvinvkj") - .withVmNics(Arrays.asList( - new VMNicInputDetails().withNicId("rbuukzclewyhmlwp") - .withIpConfigs(Arrays.asList( - new IpConfigInputDetails().withIpConfigName("pofncck") - .withIsPrimary(false) - .withIsSeletedForFailover(true) - .withRecoverySubnetName("hxx") - .withRecoveryStaticIpAddress("yq") - .withRecoveryPublicIpAddressId("zfeqztppri") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("or", "altol", "ncwsob", "wcsdbnwdcfhucq")) - .withTfoSubnetName("fuvglsbjjca") - .withTfoStaticIpAddress("xbvtvudu") - .withTfoPublicIpAddressId("cormr") - .withTfoLBBackendAddressPoolIds(Arrays.asList("tvcof", "dflvkg", "u", "gdknnqv")), - new IpConfigInputDetails().withIpConfigName("znqntoru") - .withIsPrimary(true) - .withIsSeletedForFailover(false) - .withRecoverySubnetName("mkycgra") - .withRecoveryStaticIpAddress("juetaebur") - .withRecoveryPublicIpAddressId("dmovsm") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("wabm", "oefki")) - .withTfoSubnetName("vtpuqujmqlgk") - .withTfoStaticIpAddress("tndoaongbjc") - .withTfoPublicIpAddressId("ujitcjedftww") - .withTfoLBBackendAddressPoolIds(Arrays.asList("kojvd")), - new IpConfigInputDetails().withIpConfigName("zfoqouicybxar") - .withIsPrimary(true) - .withIsSeletedForFailover(false) - .withRecoverySubnetName("oxciqopidoamcio") - .withRecoveryStaticIpAddress("khazxkhnzbonlwn") - .withRecoveryPublicIpAddressId("egokdwbwhkszzcmr") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("ztvbtqgsfr", "oyzko", "wtl", "nguxawqaldsy")) - .withTfoSubnetName("ximerqfobwyznk") - .withTfoStaticIpAddress("kutwpf") - .withTfoPublicIpAddressId("a") - .withTfoLBBackendAddressPoolIds(Arrays.asList("r", "kdsnfdsdoakgtdl", "kkze")), - new IpConfigInputDetails() - .withIpConfigName("l") - .withIsPrimary(true) - .withIsSeletedForFailover(false) - .withRecoverySubnetName("dsttwvo") - .withRecoveryStaticIpAddress("bbejdcngqqm") - .withRecoveryPublicIpAddressId("kufgmj") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("rdgrtw")) - .withTfoSubnetName("nuuzkopbm") - .withTfoStaticIpAddress("rfdwoyu") - .withTfoPublicIpAddressId("ziuiefozbhdm") - .withTfoLBBackendAddressPoolIds(Arrays.asList("mzqhoftrmaequi")))) - .withSelectionType("xicslfao") - .withRecoveryNetworkSecurityGroupId("piyylhalnswhccsp") - .withEnableAcceleratedNetworkingOnRecovery(true) - .withTfoNetworkSecurityGroupId("vwitqscyw") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("oluhczbwemh") - .withRecoveryNicResourceGroupName("rsbrgzdwm") - .withReuseExistingNic(true) - .withTfoNicName("pqwd") - .withTfoNicResourceGroupName("gicccnxqhuex") - .withTfoReuseExistingNic(true) - .withTargetNicName("lstvlzywe"), - new VMNicInputDetails().withNicId("zrncsdt") - .withIpConfigs(Arrays.asList(new IpConfigInputDetails().withIpConfigName("iypbsfgytgusl") - .withIsPrimary(false) - .withIsSeletedForFailover(false) - .withRecoverySubnetName("gq") - .withRecoveryStaticIpAddress("yhejhzisxgfp") - .withRecoveryPublicIpAddressId("olppvksrpqvujz") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("htwdwrftswibyrcd", "bhshfwpracstwity", "hevxcced")) - .withTfoSubnetName("nmdyodnwzxl") - .withTfoStaticIpAddress("cvnhltiugc") - .withTfoPublicIpAddressId("avvwxqi") - .withTfoLBBackendAddressPoolIds( - Arrays.asList("unyowxwl", "djrkvfgbvfvpd", "odacizs", "q")))) - .withSelectionType("krribdeibqi") - .withRecoveryNetworkSecurityGroupId("kghv") - .withEnableAcceleratedNetworkingOnRecovery(true) - .withTfoNetworkSecurityGroupId("wm") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("ajpjo") - .withRecoveryNicResourceGroupName("kqnyh") - .withReuseExistingNic(false) - .withTfoNicName("tjivfxzsjabib") - .withTfoNicResourceGroupName("stawfsdjpvkv") - .withTfoReuseExistingNic(true) - .withTargetNicName("bkzbzkd"), - new VMNicInputDetails().withNicId("cjabudurgkakmo") - .withIpConfigs(Arrays.asList( - new IpConfigInputDetails().withIpConfigName("jk") - .withIsPrimary(false) - .withIsSeletedForFailover(true) - .withRecoverySubnetName("uwqlgzrfzeey") - .withRecoveryStaticIpAddress("izikayuhq") - .withRecoveryPublicIpAddressId("jbsybbqw") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("ldgmfpgvmpip")) - .withTfoSubnetName("ltha") - .withTfoStaticIpAddress("x") - .withTfoPublicIpAddressId("mwutwbdsre") - .withTfoLBBackendAddressPoolIds(Arrays.asList("rhneuyowq", "d", "ytisibir")), - new IpConfigInputDetails().withIpConfigName("pikpz") - .withIsPrimary(false) - .withIsSeletedForFailover(false) - .withRecoverySubnetName("nlfzxiavrmbz") - .withRecoveryStaticIpAddress("okixrjqcir") - .withRecoveryPublicIpAddressId("pfrlazsz") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("oiindfpwpjy", "wbtlhflsjcdh")) - .withTfoSubnetName("fjvfbgofeljagr") - .withTfoStaticIpAddress("qhl") - .withTfoPublicIpAddressId("riiiojnalghfkv") - .withTfoLBBackendAddressPoolIds(Arrays.asList("ex", "owueluqh")))) - .withSelectionType("hhxvrhmzkwpj") - .withRecoveryNetworkSecurityGroupId("wspughftqsxhqx") - .withEnableAcceleratedNetworkingOnRecovery(true) - .withTfoNetworkSecurityGroupId("kndxdigrjgu") - .withEnableAcceleratedNetworkingOnTfo(true) - .withRecoveryNicName("msyqtfi") - .withRecoveryNicResourceGroupName("hbotzingamvppho") - .withReuseExistingNic(false) - .withTfoNicName("udphqamvdkfwyn") - .withTfoNicResourceGroupName("vtbvkayh") - .withTfoReuseExistingNic(false) - .withTargetNicName("yqiatkzwp"))) - .withLicenseType(LicenseType.WINDOWS_SERVER) - .withRecoveryAvailabilitySetId("zcjaesgvvsccy") - .withProviderSpecificDetails(new UpdateReplicationProtectedItemProviderInput()); - model = BinaryData.fromObject(model).toObject(UpdateReplicationProtectedItemInputProperties.class); - Assertions.assertEquals("lpqblylsyxk", model.recoveryAzureVMName()); - Assertions.assertEquals("nsj", model.recoveryAzureVMSize()); - Assertions.assertEquals("vti", model.selectedRecoveryAzureNetworkId()); - Assertions.assertEquals("xsdszuempsb", model.selectedTfoAzureNetworkId()); - Assertions.assertEquals("f", model.selectedSourceNicId()); - Assertions.assertEquals("eyvpnqicvinvkj", model.enableRdpOnTargetOption()); - Assertions.assertEquals("rbuukzclewyhmlwp", model.vmNics().get(0).nicId()); - Assertions.assertEquals("pofncck", model.vmNics().get(0).ipConfigs().get(0).ipConfigName()); - Assertions.assertEquals(false, model.vmNics().get(0).ipConfigs().get(0).isPrimary()); - Assertions.assertEquals(true, model.vmNics().get(0).ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("hxx", model.vmNics().get(0).ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("yq", model.vmNics().get(0).ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("zfeqztppri", model.vmNics().get(0).ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("or", - model.vmNics().get(0).ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("fuvglsbjjca", model.vmNics().get(0).ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("xbvtvudu", model.vmNics().get(0).ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("cormr", model.vmNics().get(0).ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("tvcof", model.vmNics().get(0).ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("xicslfao", model.vmNics().get(0).selectionType()); - Assertions.assertEquals("piyylhalnswhccsp", model.vmNics().get(0).recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(true, model.vmNics().get(0).enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("vwitqscyw", model.vmNics().get(0).tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.vmNics().get(0).enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("oluhczbwemh", model.vmNics().get(0).recoveryNicName()); - Assertions.assertEquals("rsbrgzdwm", model.vmNics().get(0).recoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).reuseExistingNic()); - Assertions.assertEquals("pqwd", model.vmNics().get(0).tfoNicName()); - Assertions.assertEquals("gicccnxqhuex", model.vmNics().get(0).tfoNicResourceGroupName()); - Assertions.assertEquals(true, model.vmNics().get(0).tfoReuseExistingNic()); - Assertions.assertEquals("lstvlzywe", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals(LicenseType.WINDOWS_SERVER, model.licenseType()); - Assertions.assertEquals("zcjaesgvvsccy", model.recoveryAvailabilitySetId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateReplicationProtectedItemInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateReplicationProtectedItemInputTests.java deleted file mode 100644 index 6f99dfd769ab..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateReplicationProtectedItemInputTests.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IpConfigInputDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LicenseType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemInputProperties; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemProviderInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMNicInputDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateReplicationProtectedItemInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateReplicationProtectedItemInput model = BinaryData.fromString( - "{\"properties\":{\"recoveryAzureVMName\":\"wneaiv\",\"recoveryAzureVMSize\":\"czelpcirel\",\"selectedRecoveryAzureNetworkId\":\"eae\",\"selectedTfoAzureNetworkId\":\"abfatkl\",\"selectedSourceNicId\":\"xbjhwuaanozjosph\",\"enableRdpOnTargetOption\":\"ulpjr\",\"vmNics\":[{\"nicId\":\"l\",\"ipConfigs\":[{\"ipConfigName\":\"jwosytxitcskfck\",\"isPrimary\":true,\"isSeletedForFailover\":false,\"recoverySubnetName\":\"kkezzikhlyfjhdgq\",\"recoveryStaticIPAddress\":\"ebdunyg\",\"recoveryPublicIPAddressId\":\"qidbqfatpxllrxcy\",\"recoveryLBBackendAddressPoolIds\":[\"a\",\"su\"],\"tfoSubnetName\":\"r\",\"tfoStaticIPAddress\":\"wdmjsjqbjhhyx\",\"tfoPublicIPAddressId\":\"wlycoduhpkxkg\",\"tfoLBBackendAddressPoolIds\":[\"re\",\"n\"]},{\"ipConfigName\":\"xqugjhkycubedd\",\"isPrimary\":true,\"isSeletedForFailover\":true,\"recoverySubnetName\":\"qmzqalkrmnjijpx\",\"recoveryStaticIPAddress\":\"q\",\"recoveryPublicIPAddressId\":\"dfnbyxbaaabjyv\",\"recoveryLBBackendAddressPoolIds\":[\"fimrzrtuzqogse\",\"nevfdnw\",\"wmewzsyy\",\"euzsoi\"],\"tfoSubnetName\":\"ud\",\"tfoStaticIPAddress\":\"rx\",\"tfoPublicIPAddressId\":\"thzvaytdwkqbrqu\",\"tfoLBBackendAddressPoolIds\":[\"xhexiilivpdti\",\"r\",\"tdqoaxoruzfgsq\"]}],\"selectionType\":\"fxrxxle\",\"recoveryNetworkSecurityGroupId\":\"ramxjezwlwnw\",\"enableAcceleratedNetworkingOnRecovery\":false,\"tfoNetworkSecurityGroupId\":\"cvydypatdoo\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"niodkooeb\",\"recoveryNicResourceGroupName\":\"ujhemmsbvdkcrodt\",\"reuseExistingNic\":true,\"tfoNicName\":\"wj\",\"tfoNicResourceGroupName\":\"lt\",\"tfoReuseExistingNic\":true,\"targetNicName\":\"vefkdlfoakggk\"}],\"licenseType\":\"NotSpecified\",\"recoveryAvailabilitySetId\":\"ao\",\"providerSpecificDetails\":{\"instanceType\":\"UpdateReplicationProtectedItemProviderInput\"}}}") - .toObject(UpdateReplicationProtectedItemInput.class); - Assertions.assertEquals("wneaiv", model.properties().recoveryAzureVMName()); - Assertions.assertEquals("czelpcirel", model.properties().recoveryAzureVMSize()); - Assertions.assertEquals("eae", model.properties().selectedRecoveryAzureNetworkId()); - Assertions.assertEquals("abfatkl", model.properties().selectedTfoAzureNetworkId()); - Assertions.assertEquals("xbjhwuaanozjosph", model.properties().selectedSourceNicId()); - Assertions.assertEquals("ulpjr", model.properties().enableRdpOnTargetOption()); - Assertions.assertEquals("l", model.properties().vmNics().get(0).nicId()); - Assertions.assertEquals("jwosytxitcskfck", - model.properties().vmNics().get(0).ipConfigs().get(0).ipConfigName()); - Assertions.assertEquals(true, model.properties().vmNics().get(0).ipConfigs().get(0).isPrimary()); - Assertions.assertEquals(false, model.properties().vmNics().get(0).ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("kkezzikhlyfjhdgq", - model.properties().vmNics().get(0).ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("ebdunyg", - model.properties().vmNics().get(0).ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("qidbqfatpxllrxcy", - model.properties().vmNics().get(0).ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("a", - model.properties().vmNics().get(0).ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("r", model.properties().vmNics().get(0).ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("wdmjsjqbjhhyx", - model.properties().vmNics().get(0).ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("wlycoduhpkxkg", - model.properties().vmNics().get(0).ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("re", - model.properties().vmNics().get(0).ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("fxrxxle", model.properties().vmNics().get(0).selectionType()); - Assertions.assertEquals("ramxjezwlwnw", model.properties().vmNics().get(0).recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.properties().vmNics().get(0).enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("cvydypatdoo", model.properties().vmNics().get(0).tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.properties().vmNics().get(0).enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("niodkooeb", model.properties().vmNics().get(0).recoveryNicName()); - Assertions.assertEquals("ujhemmsbvdkcrodt", model.properties().vmNics().get(0).recoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.properties().vmNics().get(0).reuseExistingNic()); - Assertions.assertEquals("wj", model.properties().vmNics().get(0).tfoNicName()); - Assertions.assertEquals("lt", model.properties().vmNics().get(0).tfoNicResourceGroupName()); - Assertions.assertEquals(true, model.properties().vmNics().get(0).tfoReuseExistingNic()); - Assertions.assertEquals("vefkdlfoakggk", model.properties().vmNics().get(0).targetNicName()); - Assertions.assertEquals(LicenseType.NOT_SPECIFIED, model.properties().licenseType()); - Assertions.assertEquals("ao", model.properties().recoveryAvailabilitySetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateReplicationProtectedItemInput model = new UpdateReplicationProtectedItemInput() - .withProperties(new UpdateReplicationProtectedItemInputProperties().withRecoveryAzureVMName("wneaiv") - .withRecoveryAzureVMSize("czelpcirel") - .withSelectedRecoveryAzureNetworkId("eae") - .withSelectedTfoAzureNetworkId("abfatkl") - .withSelectedSourceNicId("xbjhwuaanozjosph") - .withEnableRdpOnTargetOption("ulpjr") - .withVmNics(Arrays.asList(new VMNicInputDetails().withNicId("l") - .withIpConfigs(Arrays.asList( - new IpConfigInputDetails().withIpConfigName("jwosytxitcskfck") - .withIsPrimary(true) - .withIsSeletedForFailover(false) - .withRecoverySubnetName("kkezzikhlyfjhdgq") - .withRecoveryStaticIpAddress("ebdunyg") - .withRecoveryPublicIpAddressId("qidbqfatpxllrxcy") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("a", "su")) - .withTfoSubnetName("r") - .withTfoStaticIpAddress("wdmjsjqbjhhyx") - .withTfoPublicIpAddressId("wlycoduhpkxkg") - .withTfoLBBackendAddressPoolIds(Arrays.asList("re", "n")), - new IpConfigInputDetails().withIpConfigName("xqugjhkycubedd") - .withIsPrimary(true) - .withIsSeletedForFailover(true) - .withRecoverySubnetName("qmzqalkrmnjijpx") - .withRecoveryStaticIpAddress("q") - .withRecoveryPublicIpAddressId("dfnbyxbaaabjyv") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("fimrzrtuzqogse", "nevfdnw", "wmewzsyy", "euzsoi")) - .withTfoSubnetName("ud") - .withTfoStaticIpAddress("rx") - .withTfoPublicIpAddressId("thzvaytdwkqbrqu") - .withTfoLBBackendAddressPoolIds(Arrays.asList("xhexiilivpdti", "r", "tdqoaxoruzfgsq")))) - .withSelectionType("fxrxxle") - .withRecoveryNetworkSecurityGroupId("ramxjezwlwnw") - .withEnableAcceleratedNetworkingOnRecovery(false) - .withTfoNetworkSecurityGroupId("cvydypatdoo") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("niodkooeb") - .withRecoveryNicResourceGroupName("ujhemmsbvdkcrodt") - .withReuseExistingNic(true) - .withTfoNicName("wj") - .withTfoNicResourceGroupName("lt") - .withTfoReuseExistingNic(true) - .withTargetNicName("vefkdlfoakggk"))) - .withLicenseType(LicenseType.NOT_SPECIFIED) - .withRecoveryAvailabilitySetId("ao") - .withProviderSpecificDetails(new UpdateReplicationProtectedItemProviderInput())); - model = BinaryData.fromObject(model).toObject(UpdateReplicationProtectedItemInput.class); - Assertions.assertEquals("wneaiv", model.properties().recoveryAzureVMName()); - Assertions.assertEquals("czelpcirel", model.properties().recoveryAzureVMSize()); - Assertions.assertEquals("eae", model.properties().selectedRecoveryAzureNetworkId()); - Assertions.assertEquals("abfatkl", model.properties().selectedTfoAzureNetworkId()); - Assertions.assertEquals("xbjhwuaanozjosph", model.properties().selectedSourceNicId()); - Assertions.assertEquals("ulpjr", model.properties().enableRdpOnTargetOption()); - Assertions.assertEquals("l", model.properties().vmNics().get(0).nicId()); - Assertions.assertEquals("jwosytxitcskfck", - model.properties().vmNics().get(0).ipConfigs().get(0).ipConfigName()); - Assertions.assertEquals(true, model.properties().vmNics().get(0).ipConfigs().get(0).isPrimary()); - Assertions.assertEquals(false, model.properties().vmNics().get(0).ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("kkezzikhlyfjhdgq", - model.properties().vmNics().get(0).ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("ebdunyg", - model.properties().vmNics().get(0).ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("qidbqfatpxllrxcy", - model.properties().vmNics().get(0).ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("a", - model.properties().vmNics().get(0).ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("r", model.properties().vmNics().get(0).ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("wdmjsjqbjhhyx", - model.properties().vmNics().get(0).ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("wlycoduhpkxkg", - model.properties().vmNics().get(0).ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("re", - model.properties().vmNics().get(0).ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("fxrxxle", model.properties().vmNics().get(0).selectionType()); - Assertions.assertEquals("ramxjezwlwnw", model.properties().vmNics().get(0).recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.properties().vmNics().get(0).enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("cvydypatdoo", model.properties().vmNics().get(0).tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.properties().vmNics().get(0).enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("niodkooeb", model.properties().vmNics().get(0).recoveryNicName()); - Assertions.assertEquals("ujhemmsbvdkcrodt", model.properties().vmNics().get(0).recoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.properties().vmNics().get(0).reuseExistingNic()); - Assertions.assertEquals("wj", model.properties().vmNics().get(0).tfoNicName()); - Assertions.assertEquals("lt", model.properties().vmNics().get(0).tfoNicResourceGroupName()); - Assertions.assertEquals(true, model.properties().vmNics().get(0).tfoReuseExistingNic()); - Assertions.assertEquals("vefkdlfoakggk", model.properties().vmNics().get(0).targetNicName()); - Assertions.assertEquals(LicenseType.NOT_SPECIFIED, model.properties().licenseType()); - Assertions.assertEquals("ao", model.properties().recoveryAvailabilitySetId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateReplicationProtectedItemProviderInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateReplicationProtectedItemProviderInputTests.java deleted file mode 100644 index 0788afb47950..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateReplicationProtectedItemProviderInputTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemProviderInput; - -public final class UpdateReplicationProtectedItemProviderInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateReplicationProtectedItemProviderInput model - = BinaryData.fromString("{\"instanceType\":\"UpdateReplicationProtectedItemProviderInput\"}") - .toObject(UpdateReplicationProtectedItemProviderInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateReplicationProtectedItemProviderInput model = new UpdateReplicationProtectedItemProviderInput(); - model = BinaryData.fromObject(model).toObject(UpdateReplicationProtectedItemProviderInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateVCenterRequestPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateVCenterRequestPropertiesTests.java deleted file mode 100644 index fa292286a54d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateVCenterRequestPropertiesTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateVCenterRequestProperties; -import org.junit.jupiter.api.Assertions; - -public final class UpdateVCenterRequestPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateVCenterRequestProperties model = BinaryData.fromString( - "{\"friendlyName\":\"whryvycytdcl\",\"ipAddress\":\"ccknfnwmbtmvp\",\"processServerId\":\"jdhttzaefedxi\",\"port\":\"hrphkmcrjdqn\",\"runAsAccountId\":\"fzpbgtgkyl\"}") - .toObject(UpdateVCenterRequestProperties.class); - Assertions.assertEquals("whryvycytdcl", model.friendlyName()); - Assertions.assertEquals("ccknfnwmbtmvp", model.ipAddress()); - Assertions.assertEquals("jdhttzaefedxi", model.processServerId()); - Assertions.assertEquals("hrphkmcrjdqn", model.port()); - Assertions.assertEquals("fzpbgtgkyl", model.runAsAccountId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateVCenterRequestProperties model = new UpdateVCenterRequestProperties().withFriendlyName("whryvycytdcl") - .withIpAddress("ccknfnwmbtmvp") - .withProcessServerId("jdhttzaefedxi") - .withPort("hrphkmcrjdqn") - .withRunAsAccountId("fzpbgtgkyl"); - model = BinaryData.fromObject(model).toObject(UpdateVCenterRequestProperties.class); - Assertions.assertEquals("whryvycytdcl", model.friendlyName()); - Assertions.assertEquals("ccknfnwmbtmvp", model.ipAddress()); - Assertions.assertEquals("jdhttzaefedxi", model.processServerId()); - Assertions.assertEquals("hrphkmcrjdqn", model.port()); - Assertions.assertEquals("fzpbgtgkyl", model.runAsAccountId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateVCenterRequestTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateVCenterRequestTests.java deleted file mode 100644 index d4d73830cc1a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/UpdateVCenterRequestTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateVCenterRequest; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateVCenterRequestProperties; -import org.junit.jupiter.api.Assertions; - -public final class UpdateVCenterRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateVCenterRequest model = BinaryData.fromString( - "{\"properties\":{\"friendlyName\":\"ytnrzvuljraae\",\"ipAddress\":\"nok\",\"processServerId\":\"ukkjqnvbroyla\",\"port\":\"ulcdisdosf\",\"runAsAccountId\":\"jsvg\"}}") - .toObject(UpdateVCenterRequest.class); - Assertions.assertEquals("ytnrzvuljraae", model.properties().friendlyName()); - Assertions.assertEquals("nok", model.properties().ipAddress()); - Assertions.assertEquals("ukkjqnvbroyla", model.properties().processServerId()); - Assertions.assertEquals("ulcdisdosf", model.properties().port()); - Assertions.assertEquals("jsvg", model.properties().runAsAccountId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateVCenterRequest model = new UpdateVCenterRequest() - .withProperties(new UpdateVCenterRequestProperties().withFriendlyName("ytnrzvuljraae") - .withIpAddress("nok") - .withProcessServerId("ukkjqnvbroyla") - .withPort("ulcdisdosf") - .withRunAsAccountId("jsvg")); - model = BinaryData.fromObject(model).toObject(UpdateVCenterRequest.class); - Assertions.assertEquals("ytnrzvuljraae", model.properties().friendlyName()); - Assertions.assertEquals("nok", model.properties().ipAddress()); - Assertions.assertEquals("ukkjqnvbroyla", model.properties().processServerId()); - Assertions.assertEquals("ulcdisdosf", model.properties().port()); - Assertions.assertEquals("jsvg", model.properties().runAsAccountId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMNicDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMNicDetailsTests.java deleted file mode 100644 index 1bd627ede874..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMNicDetailsTests.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IpConfigDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMNicDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VMNicDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMNicDetails model = BinaryData.fromString( - "{\"nicId\":\"cbhhez\",\"replicaNicId\":\"u\",\"sourceNicArmId\":\"sqxutr\",\"vMNetworkName\":\"rruyuu\",\"recoveryVMNetworkId\":\"vlm\",\"ipConfigs\":[{\"name\":\"ol\",\"isPrimary\":false,\"subnetName\":\"b\",\"staticIPAddress\":\"tpc\",\"ipAddressType\":\"hprzrvxhmtfho\",\"isSeletedForFailover\":true,\"recoverySubnetName\":\"cmj\",\"recoveryStaticIPAddress\":\"gxnoqrxtdis\",\"recoveryIPAddressType\":\"evhdlmydid\",\"recoveryPublicIPAddressId\":\"epfwwt\",\"recoveryLBBackendAddressPoolIds\":[\"o\",\"sxxh\",\"wcdbckyoik\"],\"tfoSubnetName\":\"xhn\",\"tfoStaticIPAddress\":\"knjz\",\"tfoPublicIPAddressId\":\"h\",\"tfoLBBackendAddressPoolIds\":[\"plvukaobrlbpg\"]},{\"name\":\"bagn\",\"isPrimary\":false,\"subnetName\":\"g\",\"staticIPAddress\":\"uowakyw\",\"ipAddressType\":\"hjym\",\"isSeletedForFailover\":false,\"recoverySubnetName\":\"tagdrc\",\"recoveryStaticIPAddress\":\"soljome\",\"recoveryIPAddressType\":\"fycnlb\",\"recoveryPublicIPAddressId\":\"jcodkkgjiiytssi\",\"recoveryLBBackendAddressPoolIds\":[\"bcufqbvntn\"],\"tfoSubnetName\":\"mqso\",\"tfoStaticIPAddress\":\"cekxgnly\",\"tfoPublicIPAddressId\":\"xcpwzvmdok\",\"tfoLBBackendAddressPoolIds\":[\"tiwlwxlboncqb\"]}],\"selectionType\":\"qicqchygt\",\"recoveryNetworkSecurityGroupId\":\"byjanep\",\"enableAcceleratedNetworkingOnRecovery\":false,\"tfoVMNetworkId\":\"kxyqvgxiaodetv\",\"tfoNetworkSecurityGroupId\":\"kxdxuwsaifmcwn\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"lehgcvkbc\",\"recoveryNicResourceGroupName\":\"jolgjyyxpvels\",\"reuseExistingNic\":false,\"tfoRecoveryNicName\":\"zevxoqein\",\"tfoRecoveryNicResourceGroupName\":\"waljglzoblqwaaf\",\"tfoReuseExistingNic\":false,\"targetNicName\":\"hmzyqbhdvafjrqpj\"}") - .toObject(VMNicDetails.class); - Assertions.assertEquals("cbhhez", model.nicId()); - Assertions.assertEquals("u", model.replicaNicId()); - Assertions.assertEquals("sqxutr", model.sourceNicArmId()); - Assertions.assertEquals("rruyuu", model.vMNetworkName()); - Assertions.assertEquals("vlm", model.recoveryVMNetworkId()); - Assertions.assertEquals("ol", model.ipConfigs().get(0).name()); - Assertions.assertEquals(false, model.ipConfigs().get(0).isPrimary()); - Assertions.assertEquals("b", model.ipConfigs().get(0).subnetName()); - Assertions.assertEquals("tpc", model.ipConfigs().get(0).staticIpAddress()); - Assertions.assertEquals("hprzrvxhmtfho", model.ipConfigs().get(0).ipAddressType()); - Assertions.assertEquals(true, model.ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("cmj", model.ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("gxnoqrxtdis", model.ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("evhdlmydid", model.ipConfigs().get(0).recoveryIpAddressType()); - Assertions.assertEquals("epfwwt", model.ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("o", model.ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("xhn", model.ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("knjz", model.ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("h", model.ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("plvukaobrlbpg", model.ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("qicqchygt", model.selectionType()); - Assertions.assertEquals("byjanep", model.recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("kxyqvgxiaodetv", model.tfoVMNetworkId()); - Assertions.assertEquals("kxdxuwsaifmcwn", model.tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("lehgcvkbc", model.recoveryNicName()); - Assertions.assertEquals("jolgjyyxpvels", model.recoveryNicResourceGroupName()); - Assertions.assertEquals(false, model.reuseExistingNic()); - Assertions.assertEquals("zevxoqein", model.tfoRecoveryNicName()); - Assertions.assertEquals("waljglzoblqwaaf", model.tfoRecoveryNicResourceGroupName()); - Assertions.assertEquals(false, model.tfoReuseExistingNic()); - Assertions.assertEquals("hmzyqbhdvafjrqpj", model.targetNicName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMNicDetails model = new VMNicDetails().withNicId("cbhhez") - .withReplicaNicId("u") - .withSourceNicArmId("sqxutr") - .withVMNetworkName("rruyuu") - .withRecoveryVMNetworkId("vlm") - .withIpConfigs(Arrays.asList( - new IpConfigDetails().withName("ol") - .withIsPrimary(false) - .withSubnetName("b") - .withStaticIpAddress("tpc") - .withIpAddressType("hprzrvxhmtfho") - .withIsSeletedForFailover(true) - .withRecoverySubnetName("cmj") - .withRecoveryStaticIpAddress("gxnoqrxtdis") - .withRecoveryIpAddressType("evhdlmydid") - .withRecoveryPublicIpAddressId("epfwwt") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("o", "sxxh", "wcdbckyoik")) - .withTfoSubnetName("xhn") - .withTfoStaticIpAddress("knjz") - .withTfoPublicIpAddressId("h") - .withTfoLBBackendAddressPoolIds(Arrays.asList("plvukaobrlbpg")), - new IpConfigDetails().withName("bagn") - .withIsPrimary(false) - .withSubnetName("g") - .withStaticIpAddress("uowakyw") - .withIpAddressType("hjym") - .withIsSeletedForFailover(false) - .withRecoverySubnetName("tagdrc") - .withRecoveryStaticIpAddress("soljome") - .withRecoveryIpAddressType("fycnlb") - .withRecoveryPublicIpAddressId("jcodkkgjiiytssi") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("bcufqbvntn")) - .withTfoSubnetName("mqso") - .withTfoStaticIpAddress("cekxgnly") - .withTfoPublicIpAddressId("xcpwzvmdok") - .withTfoLBBackendAddressPoolIds(Arrays.asList("tiwlwxlboncqb")))) - .withSelectionType("qicqchygt") - .withRecoveryNetworkSecurityGroupId("byjanep") - .withEnableAcceleratedNetworkingOnRecovery(false) - .withTfoVMNetworkId("kxyqvgxiaodetv") - .withTfoNetworkSecurityGroupId("kxdxuwsaifmcwn") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("lehgcvkbc") - .withRecoveryNicResourceGroupName("jolgjyyxpvels") - .withReuseExistingNic(false) - .withTfoRecoveryNicName("zevxoqein") - .withTfoRecoveryNicResourceGroupName("waljglzoblqwaaf") - .withTfoReuseExistingNic(false) - .withTargetNicName("hmzyqbhdvafjrqpj"); - model = BinaryData.fromObject(model).toObject(VMNicDetails.class); - Assertions.assertEquals("cbhhez", model.nicId()); - Assertions.assertEquals("u", model.replicaNicId()); - Assertions.assertEquals("sqxutr", model.sourceNicArmId()); - Assertions.assertEquals("rruyuu", model.vMNetworkName()); - Assertions.assertEquals("vlm", model.recoveryVMNetworkId()); - Assertions.assertEquals("ol", model.ipConfigs().get(0).name()); - Assertions.assertEquals(false, model.ipConfigs().get(0).isPrimary()); - Assertions.assertEquals("b", model.ipConfigs().get(0).subnetName()); - Assertions.assertEquals("tpc", model.ipConfigs().get(0).staticIpAddress()); - Assertions.assertEquals("hprzrvxhmtfho", model.ipConfigs().get(0).ipAddressType()); - Assertions.assertEquals(true, model.ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("cmj", model.ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("gxnoqrxtdis", model.ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("evhdlmydid", model.ipConfigs().get(0).recoveryIpAddressType()); - Assertions.assertEquals("epfwwt", model.ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("o", model.ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("xhn", model.ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("knjz", model.ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("h", model.ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("plvukaobrlbpg", model.ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("qicqchygt", model.selectionType()); - Assertions.assertEquals("byjanep", model.recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("kxyqvgxiaodetv", model.tfoVMNetworkId()); - Assertions.assertEquals("kxdxuwsaifmcwn", model.tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("lehgcvkbc", model.recoveryNicName()); - Assertions.assertEquals("jolgjyyxpvels", model.recoveryNicResourceGroupName()); - Assertions.assertEquals(false, model.reuseExistingNic()); - Assertions.assertEquals("zevxoqein", model.tfoRecoveryNicName()); - Assertions.assertEquals("waljglzoblqwaaf", model.tfoRecoveryNicResourceGroupName()); - Assertions.assertEquals(false, model.tfoReuseExistingNic()); - Assertions.assertEquals("hmzyqbhdvafjrqpj", model.targetNicName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMNicInputDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMNicInputDetailsTests.java deleted file mode 100644 index d6d821dd1059..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMNicInputDetailsTests.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.IpConfigInputDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMNicInputDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VMNicInputDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMNicInputDetails model = BinaryData.fromString( - "{\"nicId\":\"uq\",\"ipConfigs\":[{\"ipConfigName\":\"gzlvdnkfxu\",\"isPrimary\":true,\"isSeletedForFailover\":false,\"recoverySubnetName\":\"rmuhapfcq\",\"recoveryStaticIPAddress\":\"sqxqvp\",\"recoveryPublicIPAddressId\":\"uoymgccelvezry\",\"recoveryLBBackendAddressPoolIds\":[\"mfe\",\"kerqwkyh\",\"ob\"],\"tfoSubnetName\":\"gxedkow\",\"tfoStaticIPAddress\":\"bqpc\",\"tfoPublicIPAddressId\":\"kbwcc\",\"tfoLBBackendAddressPoolIds\":[\"vcdwxlpqekftn\",\"htjsying\",\"fq\"]},{\"ipConfigName\":\"mtdh\",\"isPrimary\":true,\"isSeletedForFailover\":false,\"recoverySubnetName\":\"gikdgsz\",\"recoveryStaticIPAddress\":\"kbir\",\"recoveryPublicIPAddressId\":\"uzhlhkjoqrv\",\"recoveryLBBackendAddressPoolIds\":[\"atjinrvgoupmfiib\",\"ggjioolvr\",\"x\",\"v\"],\"tfoSubnetName\":\"k\",\"tfoStaticIPAddress\":\"lqwjygvjayvblm\",\"tfoPublicIPAddressId\":\"k\",\"tfoLBBackendAddressPoolIds\":[\"bxvvyhg\",\"opbyrqufegxu\",\"wz\",\"bnhlmc\"]},{\"ipConfigName\":\"p\",\"isPrimary\":false,\"isSeletedForFailover\":true,\"recoverySubnetName\":\"gbmhrixkwmyi\",\"recoveryStaticIPAddress\":\"jvegrhbpnaixexcc\",\"recoveryPublicIPAddressId\":\"reaxhcexdr\",\"recoveryLBBackendAddressPoolIds\":[\"ahqkg\",\"tpwijnh\",\"jsvfycxzbfvoowv\",\"vmtgjqppy\"],\"tfoSubnetName\":\"tronzmyhgfi\",\"tfoStaticIPAddress\":\"sxkm\",\"tfoPublicIPAddressId\":\"a\",\"tfoLBBackendAddressPoolIds\":[\"rjreafxts\",\"umh\",\"glikkxwslolb\"]},{\"ipConfigName\":\"vuzlm\",\"isPrimary\":false,\"isSeletedForFailover\":false,\"recoverySubnetName\":\"tgp\",\"recoveryStaticIPAddress\":\"rpw\",\"recoveryPublicIPAddressId\":\"eznoig\",\"recoveryLBBackendAddressPoolIds\":[\"jwmwkpnbs\",\"zejjoqk\",\"gfhsxttaugzxn\",\"aa\"],\"tfoSubnetName\":\"xdtnkdmkqjjlw\",\"tfoStaticIPAddress\":\"nvrk\",\"tfoPublicIPAddressId\":\"ou\",\"tfoLBBackendAddressPoolIds\":[\"rebqaaysjk\"]}],\"selectionType\":\"qtnqtt\",\"recoveryNetworkSecurityGroupId\":\"lwfffi\",\"enableAcceleratedNetworkingOnRecovery\":true,\"tfoNetworkSecurityGroupId\":\"pqqmted\",\"enableAcceleratedNetworkingOnTfo\":false,\"recoveryNicName\":\"jihy\",\"recoveryNicResourceGroupName\":\"zphv\",\"reuseExistingNic\":true,\"tfoNicName\":\"qncygupkvi\",\"tfoNicResourceGroupName\":\"dscwxqupevzhf\",\"tfoReuseExistingNic\":true,\"targetNicName\":\"xhojuj\"}") - .toObject(VMNicInputDetails.class); - Assertions.assertEquals("uq", model.nicId()); - Assertions.assertEquals("gzlvdnkfxu", model.ipConfigs().get(0).ipConfigName()); - Assertions.assertEquals(true, model.ipConfigs().get(0).isPrimary()); - Assertions.assertEquals(false, model.ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("rmuhapfcq", model.ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("sqxqvp", model.ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("uoymgccelvezry", model.ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("mfe", model.ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("gxedkow", model.ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("bqpc", model.ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("kbwcc", model.ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("vcdwxlpqekftn", model.ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("qtnqtt", model.selectionType()); - Assertions.assertEquals("lwfffi", model.recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(true, model.enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("pqqmted", model.tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("jihy", model.recoveryNicName()); - Assertions.assertEquals("zphv", model.recoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.reuseExistingNic()); - Assertions.assertEquals("qncygupkvi", model.tfoNicName()); - Assertions.assertEquals("dscwxqupevzhf", model.tfoNicResourceGroupName()); - Assertions.assertEquals(true, model.tfoReuseExistingNic()); - Assertions.assertEquals("xhojuj", model.targetNicName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMNicInputDetails model = new VMNicInputDetails().withNicId("uq") - .withIpConfigs(Arrays.asList( - new IpConfigInputDetails().withIpConfigName("gzlvdnkfxu") - .withIsPrimary(true) - .withIsSeletedForFailover(false) - .withRecoverySubnetName("rmuhapfcq") - .withRecoveryStaticIpAddress("sqxqvp") - .withRecoveryPublicIpAddressId("uoymgccelvezry") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("mfe", "kerqwkyh", "ob")) - .withTfoSubnetName("gxedkow") - .withTfoStaticIpAddress("bqpc") - .withTfoPublicIpAddressId("kbwcc") - .withTfoLBBackendAddressPoolIds(Arrays.asList("vcdwxlpqekftn", "htjsying", "fq")), - new IpConfigInputDetails().withIpConfigName("mtdh") - .withIsPrimary(true) - .withIsSeletedForFailover(false) - .withRecoverySubnetName("gikdgsz") - .withRecoveryStaticIpAddress("kbir") - .withRecoveryPublicIpAddressId("uzhlhkjoqrv") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("atjinrvgoupmfiib", "ggjioolvr", "x", "v")) - .withTfoSubnetName("k") - .withTfoStaticIpAddress("lqwjygvjayvblm") - .withTfoPublicIpAddressId("k") - .withTfoLBBackendAddressPoolIds(Arrays.asList("bxvvyhg", "opbyrqufegxu", "wz", "bnhlmc")), - new IpConfigInputDetails().withIpConfigName("p") - .withIsPrimary(false) - .withIsSeletedForFailover(true) - .withRecoverySubnetName("gbmhrixkwmyi") - .withRecoveryStaticIpAddress("jvegrhbpnaixexcc") - .withRecoveryPublicIpAddressId("reaxhcexdr") - .withRecoveryLBBackendAddressPoolIds( - Arrays.asList("ahqkg", "tpwijnh", "jsvfycxzbfvoowv", "vmtgjqppy")) - .withTfoSubnetName("tronzmyhgfi") - .withTfoStaticIpAddress("sxkm") - .withTfoPublicIpAddressId("a") - .withTfoLBBackendAddressPoolIds(Arrays.asList("rjreafxts", "umh", "glikkxwslolb")), - new IpConfigInputDetails().withIpConfigName("vuzlm") - .withIsPrimary(false) - .withIsSeletedForFailover(false) - .withRecoverySubnetName("tgp") - .withRecoveryStaticIpAddress("rpw") - .withRecoveryPublicIpAddressId("eznoig") - .withRecoveryLBBackendAddressPoolIds(Arrays.asList("jwmwkpnbs", "zejjoqk", "gfhsxttaugzxn", "aa")) - .withTfoSubnetName("xdtnkdmkqjjlw") - .withTfoStaticIpAddress("nvrk") - .withTfoPublicIpAddressId("ou") - .withTfoLBBackendAddressPoolIds(Arrays.asList("rebqaaysjk")))) - .withSelectionType("qtnqtt") - .withRecoveryNetworkSecurityGroupId("lwfffi") - .withEnableAcceleratedNetworkingOnRecovery(true) - .withTfoNetworkSecurityGroupId("pqqmted") - .withEnableAcceleratedNetworkingOnTfo(false) - .withRecoveryNicName("jihy") - .withRecoveryNicResourceGroupName("zphv") - .withReuseExistingNic(true) - .withTfoNicName("qncygupkvi") - .withTfoNicResourceGroupName("dscwxqupevzhf") - .withTfoReuseExistingNic(true) - .withTargetNicName("xhojuj"); - model = BinaryData.fromObject(model).toObject(VMNicInputDetails.class); - Assertions.assertEquals("uq", model.nicId()); - Assertions.assertEquals("gzlvdnkfxu", model.ipConfigs().get(0).ipConfigName()); - Assertions.assertEquals(true, model.ipConfigs().get(0).isPrimary()); - Assertions.assertEquals(false, model.ipConfigs().get(0).isSeletedForFailover()); - Assertions.assertEquals("rmuhapfcq", model.ipConfigs().get(0).recoverySubnetName()); - Assertions.assertEquals("sqxqvp", model.ipConfigs().get(0).recoveryStaticIpAddress()); - Assertions.assertEquals("uoymgccelvezry", model.ipConfigs().get(0).recoveryPublicIpAddressId()); - Assertions.assertEquals("mfe", model.ipConfigs().get(0).recoveryLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("gxedkow", model.ipConfigs().get(0).tfoSubnetName()); - Assertions.assertEquals("bqpc", model.ipConfigs().get(0).tfoStaticIpAddress()); - Assertions.assertEquals("kbwcc", model.ipConfigs().get(0).tfoPublicIpAddressId()); - Assertions.assertEquals("vcdwxlpqekftn", model.ipConfigs().get(0).tfoLBBackendAddressPoolIds().get(0)); - Assertions.assertEquals("qtnqtt", model.selectionType()); - Assertions.assertEquals("lwfffi", model.recoveryNetworkSecurityGroupId()); - Assertions.assertEquals(true, model.enableAcceleratedNetworkingOnRecovery()); - Assertions.assertEquals("pqqmted", model.tfoNetworkSecurityGroupId()); - Assertions.assertEquals(false, model.enableAcceleratedNetworkingOnTfo()); - Assertions.assertEquals("jihy", model.recoveryNicName()); - Assertions.assertEquals("zphv", model.recoveryNicResourceGroupName()); - Assertions.assertEquals(true, model.reuseExistingNic()); - Assertions.assertEquals("qncygupkvi", model.tfoNicName()); - Assertions.assertEquals("dscwxqupevzhf", model.tfoNicResourceGroupName()); - Assertions.assertEquals(true, model.tfoReuseExistingNic()); - Assertions.assertEquals("xhojuj", model.targetNicName()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtContainerCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtContainerCreationInputTests.java deleted file mode 100644 index af052ca14553..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtContainerCreationInputTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtContainerCreationInput; - -public final class VMwareCbtContainerCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareCbtContainerCreationInput model - = BinaryData.fromString("{\"instanceType\":\"VMwareCbt\"}").toObject(VMwareCbtContainerCreationInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareCbtContainerCreationInput model = new VMwareCbtContainerCreationInput(); - model = BinaryData.fromObject(model).toObject(VMwareCbtContainerCreationInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtEventDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtEventDetailsTests.java deleted file mode 100644 index 3b98b0847d4d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtEventDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtEventDetails; - -public final class VMwareCbtEventDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareCbtEventDetails model - = BinaryData.fromString("{\"instanceType\":\"VMwareCbt\",\"migrationItemName\":\"rnxhjtlxfikjk\"}") - .toObject(VMwareCbtEventDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareCbtEventDetails model = new VMwareCbtEventDetails(); - model = BinaryData.fromObject(model).toObject(VMwareCbtEventDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtMigrateInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtMigrateInputTests.java deleted file mode 100644 index abebe9ad28a5..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtMigrateInputTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtMigrateInput; -import org.junit.jupiter.api.Assertions; - -public final class VMwareCbtMigrateInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareCbtMigrateInput model = BinaryData - .fromString( - "{\"instanceType\":\"VMwareCbt\",\"performShutdown\":\"ara\",\"osUpgradeVersion\":\"wuasnjeglhtrx\"}") - .toObject(VMwareCbtMigrateInput.class); - Assertions.assertEquals("ara", model.performShutdown()); - Assertions.assertEquals("wuasnjeglhtrx", model.osUpgradeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareCbtMigrateInput model - = new VMwareCbtMigrateInput().withPerformShutdown("ara").withOsUpgradeVersion("wuasnjeglhtrx"); - model = BinaryData.fromObject(model).toObject(VMwareCbtMigrateInput.class); - Assertions.assertEquals("ara", model.performShutdown()); - Assertions.assertEquals("wuasnjeglhtrx", model.osUpgradeVersion()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtNicDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtNicDetailsTests.java deleted file mode 100644 index 9ace5a4c7aa3..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtNicDetailsTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.EthernetAddressType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtNicDetails; -import org.junit.jupiter.api.Assertions; - -public final class VMwareCbtNicDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareCbtNicDetails model = BinaryData.fromString( - "{\"nicId\":\"ylcvwbzmfx\",\"isPrimaryNic\":\"ymfjxl\",\"sourceIPAddress\":\"ywqnpfyd\",\"sourceIPAddressType\":\"Static\",\"sourceNetworkId\":\"cnyxbyx\",\"targetIPAddress\":\"hmqyncgaullfstyy\",\"targetIPAddressType\":\"Dynamic\",\"targetSubnetName\":\"ulmwqgmhmqmiwx\",\"testNetworkId\":\"v\",\"testSubnetName\":\"ucqfgufjnbxwbm\",\"testIPAddress\":\"ukin\",\"testIPAddressType\":\"Dynamic\",\"targetNicName\":\"gde\",\"isSelectedForMigration\":\"kzou\"}") - .toObject(VMwareCbtNicDetails.class); - Assertions.assertEquals("ymfjxl", model.isPrimaryNic()); - Assertions.assertEquals("hmqyncgaullfstyy", model.targetIpAddress()); - Assertions.assertEquals(EthernetAddressType.DYNAMIC, model.targetIpAddressType()); - Assertions.assertEquals("ulmwqgmhmqmiwx", model.targetSubnetName()); - Assertions.assertEquals("v", model.testNetworkId()); - Assertions.assertEquals("ucqfgufjnbxwbm", model.testSubnetName()); - Assertions.assertEquals("ukin", model.testIpAddress()); - Assertions.assertEquals(EthernetAddressType.DYNAMIC, model.testIpAddressType()); - Assertions.assertEquals("gde", model.targetNicName()); - Assertions.assertEquals("kzou", model.isSelectedForMigration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareCbtNicDetails model = new VMwareCbtNicDetails().withIsPrimaryNic("ymfjxl") - .withTargetIpAddress("hmqyncgaullfstyy") - .withTargetIpAddressType(EthernetAddressType.DYNAMIC) - .withTargetSubnetName("ulmwqgmhmqmiwx") - .withTestNetworkId("v") - .withTestSubnetName("ucqfgufjnbxwbm") - .withTestIpAddress("ukin") - .withTestIpAddressType(EthernetAddressType.DYNAMIC) - .withTargetNicName("gde") - .withIsSelectedForMigration("kzou"); - model = BinaryData.fromObject(model).toObject(VMwareCbtNicDetails.class); - Assertions.assertEquals("ymfjxl", model.isPrimaryNic()); - Assertions.assertEquals("hmqyncgaullfstyy", model.targetIpAddress()); - Assertions.assertEquals(EthernetAddressType.DYNAMIC, model.targetIpAddressType()); - Assertions.assertEquals("ulmwqgmhmqmiwx", model.targetSubnetName()); - Assertions.assertEquals("v", model.testNetworkId()); - Assertions.assertEquals("ucqfgufjnbxwbm", model.testSubnetName()); - Assertions.assertEquals("ukin", model.testIpAddress()); - Assertions.assertEquals(EthernetAddressType.DYNAMIC, model.testIpAddressType()); - Assertions.assertEquals("gde", model.targetNicName()); - Assertions.assertEquals("kzou", model.isSelectedForMigration()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtNicInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtNicInputTests.java deleted file mode 100644 index c5d3565406dd..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtNicInputTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtNicInput; -import org.junit.jupiter.api.Assertions; - -public final class VMwareCbtNicInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareCbtNicInput model = BinaryData.fromString( - "{\"nicId\":\"vewwpzrdwcgldo\",\"isPrimaryNic\":\"gcandxfhhhtes\",\"targetSubnetName\":\"qtdn\",\"targetStaticIPAddress\":\"kkpljdsh\",\"isSelectedForMigration\":\"fkdxccyijjimhi\",\"targetNicName\":\"rqnjxmvvsduydwnw\",\"testSubnetName\":\"uhhqldrdymnswxie\",\"testStaticIPAddress\":\"wqnghxnimvyuj\"}") - .toObject(VMwareCbtNicInput.class); - Assertions.assertEquals("vewwpzrdwcgldo", model.nicId()); - Assertions.assertEquals("gcandxfhhhtes", model.isPrimaryNic()); - Assertions.assertEquals("qtdn", model.targetSubnetName()); - Assertions.assertEquals("kkpljdsh", model.targetStaticIpAddress()); - Assertions.assertEquals("fkdxccyijjimhi", model.isSelectedForMigration()); - Assertions.assertEquals("rqnjxmvvsduydwnw", model.targetNicName()); - Assertions.assertEquals("uhhqldrdymnswxie", model.testSubnetName()); - Assertions.assertEquals("wqnghxnimvyuj", model.testStaticIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareCbtNicInput model = new VMwareCbtNicInput().withNicId("vewwpzrdwcgldo") - .withIsPrimaryNic("gcandxfhhhtes") - .withTargetSubnetName("qtdn") - .withTargetStaticIpAddress("kkpljdsh") - .withIsSelectedForMigration("fkdxccyijjimhi") - .withTargetNicName("rqnjxmvvsduydwnw") - .withTestSubnetName("uhhqldrdymnswxie") - .withTestStaticIpAddress("wqnghxnimvyuj"); - model = BinaryData.fromObject(model).toObject(VMwareCbtNicInput.class); - Assertions.assertEquals("vewwpzrdwcgldo", model.nicId()); - Assertions.assertEquals("gcandxfhhhtes", model.isPrimaryNic()); - Assertions.assertEquals("qtdn", model.targetSubnetName()); - Assertions.assertEquals("kkpljdsh", model.targetStaticIpAddress()); - Assertions.assertEquals("fkdxccyijjimhi", model.isSelectedForMigration()); - Assertions.assertEquals("rqnjxmvvsduydwnw", model.targetNicName()); - Assertions.assertEquals("uhhqldrdymnswxie", model.testSubnetName()); - Assertions.assertEquals("wqnghxnimvyuj", model.testStaticIpAddress()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtPolicyCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtPolicyCreationInputTests.java deleted file mode 100644 index 51bed7447fb2..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtPolicyCreationInputTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtPolicyCreationInput; -import org.junit.jupiter.api.Assertions; - -public final class VMwareCbtPolicyCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareCbtPolicyCreationInput model = BinaryData.fromString( - "{\"instanceType\":\"VMwareCbt\",\"recoveryPointHistoryInMinutes\":743891586,\"crashConsistentFrequencyInMinutes\":1861127701,\"appConsistentFrequencyInMinutes\":746704454}") - .toObject(VMwareCbtPolicyCreationInput.class); - Assertions.assertEquals(743891586, model.recoveryPointHistoryInMinutes()); - Assertions.assertEquals(1861127701, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(746704454, model.appConsistentFrequencyInMinutes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareCbtPolicyCreationInput model - = new VMwareCbtPolicyCreationInput().withRecoveryPointHistoryInMinutes(743891586) - .withCrashConsistentFrequencyInMinutes(1861127701) - .withAppConsistentFrequencyInMinutes(746704454); - model = BinaryData.fromObject(model).toObject(VMwareCbtPolicyCreationInput.class); - Assertions.assertEquals(743891586, model.recoveryPointHistoryInMinutes()); - Assertions.assertEquals(1861127701, model.crashConsistentFrequencyInMinutes()); - Assertions.assertEquals(746704454, model.appConsistentFrequencyInMinutes()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtResumeReplicationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtResumeReplicationInputTests.java deleted file mode 100644 index ec9434baedda..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtResumeReplicationInputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtResumeReplicationInput; -import org.junit.jupiter.api.Assertions; - -public final class VMwareCbtResumeReplicationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareCbtResumeReplicationInput model - = BinaryData.fromString("{\"instanceType\":\"VMwareCbt\",\"deleteMigrationResources\":\"ebsnz\"}") - .toObject(VMwareCbtResumeReplicationInput.class); - Assertions.assertEquals("ebsnz", model.deleteMigrationResources()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareCbtResumeReplicationInput model - = new VMwareCbtResumeReplicationInput().withDeleteMigrationResources("ebsnz"); - model = BinaryData.fromObject(model).toObject(VMwareCbtResumeReplicationInput.class); - Assertions.assertEquals("ebsnz", model.deleteMigrationResources()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtResyncInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtResyncInputTests.java deleted file mode 100644 index bbd8e407f79d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtResyncInputTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtResyncInput; -import org.junit.jupiter.api.Assertions; - -public final class VMwareCbtResyncInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareCbtResyncInput model - = BinaryData.fromString("{\"instanceType\":\"VMwareCbt\",\"skipCbtReset\":\"wgsqufmjxcyoseqc\"}") - .toObject(VMwareCbtResyncInput.class); - Assertions.assertEquals("wgsqufmjxcyoseqc", model.skipCbtReset()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareCbtResyncInput model = new VMwareCbtResyncInput().withSkipCbtReset("wgsqufmjxcyoseqc"); - model = BinaryData.fromObject(model).toObject(VMwareCbtResyncInput.class); - Assertions.assertEquals("wgsqufmjxcyoseqc", model.skipCbtReset()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtSecurityProfilePropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtSecurityProfilePropertiesTests.java deleted file mode 100644 index f8b4d2b99e16..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtSecurityProfilePropertiesTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SecurityType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtSecurityProfileProperties; -import org.junit.jupiter.api.Assertions; - -public final class VMwareCbtSecurityProfilePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareCbtSecurityProfileProperties model = BinaryData.fromString( - "{\"targetVmSecurityType\":\"None\",\"isTargetVmSecureBootEnabled\":\"ennqfabqca\",\"isTargetVmTpmEnabled\":\"lectcxsfmb\",\"isTargetVmIntegrityMonitoringEnabled\":\"xmsynbkd\",\"isTargetVmConfidentialEncryptionEnabled\":\"yufxuzmsvzyq\"}") - .toObject(VMwareCbtSecurityProfileProperties.class); - Assertions.assertEquals(SecurityType.NONE, model.targetVmSecurityType()); - Assertions.assertEquals("ennqfabqca", model.isTargetVmSecureBootEnabled()); - Assertions.assertEquals("lectcxsfmb", model.isTargetVmTpmEnabled()); - Assertions.assertEquals("xmsynbkd", model.isTargetVmIntegrityMonitoringEnabled()); - Assertions.assertEquals("yufxuzmsvzyq", model.isTargetVmConfidentialEncryptionEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareCbtSecurityProfileProperties model - = new VMwareCbtSecurityProfileProperties().withTargetVmSecurityType(SecurityType.NONE) - .withIsTargetVmSecureBootEnabled("ennqfabqca") - .withIsTargetVmTpmEnabled("lectcxsfmb") - .withIsTargetVmIntegrityMonitoringEnabled("xmsynbkd") - .withIsTargetVmConfidentialEncryptionEnabled("yufxuzmsvzyq"); - model = BinaryData.fromObject(model).toObject(VMwareCbtSecurityProfileProperties.class); - Assertions.assertEquals(SecurityType.NONE, model.targetVmSecurityType()); - Assertions.assertEquals("ennqfabqca", model.isTargetVmSecureBootEnabled()); - Assertions.assertEquals("lectcxsfmb", model.isTargetVmTpmEnabled()); - Assertions.assertEquals("xmsynbkd", model.isTargetVmIntegrityMonitoringEnabled()); - Assertions.assertEquals("yufxuzmsvzyq", model.isTargetVmConfidentialEncryptionEnabled()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtTestMigrateInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtTestMigrateInputTests.java deleted file mode 100644 index b7eb88b25c1e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtTestMigrateInputTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtNicInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtTestMigrateInput; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VMwareCbtTestMigrateInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareCbtTestMigrateInput model = BinaryData.fromString( - "{\"instanceType\":\"VMwareCbt\",\"recoveryPointId\":\"zisvbrqgcyjpgaw\",\"networkId\":\"pkwonrzpghlr\",\"vmNics\":[{\"nicId\":\"gblxbu\",\"isPrimaryNic\":\"brvjztaflv\",\"targetSubnetName\":\"fjihvfjcqrttjfuq\",\"targetStaticIPAddress\":\"fjewfeqbavdo\",\"isSelectedForMigration\":\"wy\",\"targetNicName\":\"fm\",\"testSubnetName\":\"lvxgwzz\",\"testStaticIPAddress\":\"dtlcjgpvcqzv\"},{\"nicId\":\"rbvgwxhlxr\",\"isPrimaryNic\":\"xvmdr\",\"targetSubnetName\":\"n\",\"targetStaticIPAddress\":\"ovazoymdvhhpl\",\"isSelectedForMigration\":\"wwd\",\"targetNicName\":\"tveqmg\",\"testSubnetName\":\"swzeyxry\",\"testStaticIPAddress\":\"r\"},{\"nicId\":\"hpwbuklvsmfasgt\",\"isPrimaryNic\":\"v\",\"targetSubnetName\":\"poil\",\"targetStaticIPAddress\":\"ja\",\"isSelectedForMigration\":\"cez\",\"targetNicName\":\"ft\",\"testSubnetName\":\"l\",\"testStaticIPAddress\":\"okjyghzt\"},{\"nicId\":\"smiwtpcflc\",\"isPrimaryNic\":\"zswwvwi\",\"targetSubnetName\":\"djtvbf\",\"targetStaticIPAddress\":\"hruptsyq\",\"isSelectedForMigration\":\"nqswxdowumxquk\",\"targetNicName\":\"diohclqddn\",\"testSubnetName\":\"k\",\"testStaticIPAddress\":\"bweddpnyzc\"}],\"osUpgradeVersion\":\"jsmka\"}") - .toObject(VMwareCbtTestMigrateInput.class); - Assertions.assertEquals("zisvbrqgcyjpgaw", model.recoveryPointId()); - Assertions.assertEquals("pkwonrzpghlr", model.networkId()); - Assertions.assertEquals("gblxbu", model.vmNics().get(0).nicId()); - Assertions.assertEquals("brvjztaflv", model.vmNics().get(0).isPrimaryNic()); - Assertions.assertEquals("fjihvfjcqrttjfuq", model.vmNics().get(0).targetSubnetName()); - Assertions.assertEquals("fjewfeqbavdo", model.vmNics().get(0).targetStaticIpAddress()); - Assertions.assertEquals("wy", model.vmNics().get(0).isSelectedForMigration()); - Assertions.assertEquals("fm", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals("lvxgwzz", model.vmNics().get(0).testSubnetName()); - Assertions.assertEquals("dtlcjgpvcqzv", model.vmNics().get(0).testStaticIpAddress()); - Assertions.assertEquals("jsmka", model.osUpgradeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareCbtTestMigrateInput model = new VMwareCbtTestMigrateInput().withRecoveryPointId("zisvbrqgcyjpgaw") - .withNetworkId("pkwonrzpghlr") - .withVmNics(Arrays.asList( - new VMwareCbtNicInput().withNicId("gblxbu") - .withIsPrimaryNic("brvjztaflv") - .withTargetSubnetName("fjihvfjcqrttjfuq") - .withTargetStaticIpAddress("fjewfeqbavdo") - .withIsSelectedForMigration("wy") - .withTargetNicName("fm") - .withTestSubnetName("lvxgwzz") - .withTestStaticIpAddress("dtlcjgpvcqzv"), - new VMwareCbtNicInput().withNicId("rbvgwxhlxr") - .withIsPrimaryNic("xvmdr") - .withTargetSubnetName("n") - .withTargetStaticIpAddress("ovazoymdvhhpl") - .withIsSelectedForMigration("wwd") - .withTargetNicName("tveqmg") - .withTestSubnetName("swzeyxry") - .withTestStaticIpAddress("r"), - new VMwareCbtNicInput().withNicId("hpwbuklvsmfasgt") - .withIsPrimaryNic("v") - .withTargetSubnetName("poil") - .withTargetStaticIpAddress("ja") - .withIsSelectedForMigration("cez") - .withTargetNicName("ft") - .withTestSubnetName("l") - .withTestStaticIpAddress("okjyghzt"), - new VMwareCbtNicInput().withNicId("smiwtpcflc") - .withIsPrimaryNic("zswwvwi") - .withTargetSubnetName("djtvbf") - .withTargetStaticIpAddress("hruptsyq") - .withIsSelectedForMigration("nqswxdowumxquk") - .withTargetNicName("diohclqddn") - .withTestSubnetName("k") - .withTestStaticIpAddress("bweddpnyzc"))) - .withOsUpgradeVersion("jsmka"); - model = BinaryData.fromObject(model).toObject(VMwareCbtTestMigrateInput.class); - Assertions.assertEquals("zisvbrqgcyjpgaw", model.recoveryPointId()); - Assertions.assertEquals("pkwonrzpghlr", model.networkId()); - Assertions.assertEquals("gblxbu", model.vmNics().get(0).nicId()); - Assertions.assertEquals("brvjztaflv", model.vmNics().get(0).isPrimaryNic()); - Assertions.assertEquals("fjihvfjcqrttjfuq", model.vmNics().get(0).targetSubnetName()); - Assertions.assertEquals("fjewfeqbavdo", model.vmNics().get(0).targetStaticIpAddress()); - Assertions.assertEquals("wy", model.vmNics().get(0).isSelectedForMigration()); - Assertions.assertEquals("fm", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals("lvxgwzz", model.vmNics().get(0).testSubnetName()); - Assertions.assertEquals("dtlcjgpvcqzv", model.vmNics().get(0).testStaticIpAddress()); - Assertions.assertEquals("jsmka", model.osUpgradeVersion()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtUpdateDiskInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtUpdateDiskInputTests.java deleted file mode 100644 index 480a4ffbafa8..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtUpdateDiskInputTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtUpdateDiskInput; -import org.junit.jupiter.api.Assertions; - -public final class VMwareCbtUpdateDiskInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareCbtUpdateDiskInput model - = BinaryData.fromString("{\"diskId\":\"ld\",\"targetDiskName\":\"bnwvpaq\",\"isOSDisk\":\"xf\"}") - .toObject(VMwareCbtUpdateDiskInput.class); - Assertions.assertEquals("ld", model.diskId()); - Assertions.assertEquals("bnwvpaq", model.targetDiskName()); - Assertions.assertEquals("xf", model.isOSDisk()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareCbtUpdateDiskInput model - = new VMwareCbtUpdateDiskInput().withDiskId("ld").withTargetDiskName("bnwvpaq").withIsOSDisk("xf"); - model = BinaryData.fromObject(model).toObject(VMwareCbtUpdateDiskInput.class); - Assertions.assertEquals("ld", model.diskId()); - Assertions.assertEquals("bnwvpaq", model.targetDiskName()); - Assertions.assertEquals("xf", model.isOSDisk()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtUpdateMigrationItemInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtUpdateMigrationItemInputTests.java deleted file mode 100644 index 422968f6d719..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareCbtUpdateMigrationItemInputTests.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.LicenseType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.SqlServerLicenseType; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtNicInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtUpdateDiskInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareCbtUpdateMigrationItemInput; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VMwareCbtUpdateMigrationItemInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareCbtUpdateMigrationItemInput model = BinaryData.fromString( - "{\"instanceType\":\"VMwareCbt\",\"targetVmName\":\"igcfddofxnf\",\"targetVmSize\":\"jyyrqaedw\",\"targetResourceGroupId\":\"ocytjgoeayokrw\",\"targetAvailabilitySetId\":\"ihwpadhedbfobd\",\"targetAvailabilityZone\":\"vothmkhjaoz\",\"targetProximityPlacementGroupId\":\"wfcn\",\"targetBootDiagnosticsStorageAccountId\":\"bpoelhscmyhrhjv\",\"targetNetworkId\":\"fqbokndwp\",\"testNetworkId\":\"qwojoev\",\"vmNics\":[{\"nicId\":\"fytdxmly\",\"isPrimaryNic\":\"zlyvapbkrbuog\",\"targetSubnetName\":\"dltlcu\",\"targetStaticIPAddress\":\"izij\",\"isSelectedForMigration\":\"ylzeohlpsftq\",\"targetNicName\":\"vmhvbvvcpwtqs\",\"testSubnetName\":\"pnhmzy\",\"testStaticIPAddress\":\"fetev\"},{\"nicId\":\"ntfknwacycsyo\",\"isPrimaryNic\":\"ctkhfh\",\"targetSubnetName\":\"atvcsxr\",\"targetStaticIPAddress\":\"nmizhv\",\"isSelectedForMigration\":\"hqqwcubl\",\"targetNicName\":\"hk\",\"testSubnetName\":\"obzgott\",\"testStaticIPAddress\":\"sadzighmmtb\"},{\"nicId\":\"dvucfvvra\",\"isPrimaryNic\":\"beurdeewl\",\"targetSubnetName\":\"xpcbwkdwjyjizn\",\"targetStaticIPAddress\":\"roo\",\"isSelectedForMigration\":\"ftaspmcr\",\"targetNicName\":\"huf\",\"testSubnetName\":\"n\",\"testStaticIPAddress\":\"hminuwqxungrobgw\"}],\"vmDisks\":[{\"diskId\":\"xjwdylwxmvzjow\",\"targetDiskName\":\"geerclbl\",\"isOSDisk\":\"hpwachyeu\"},{\"diskId\":\"jwmvwryvdi\",\"targetDiskName\":\"ii\",\"isOSDisk\":\"pruccwme\"}],\"licenseType\":\"NotSpecified\",\"sqlServerLicenseType\":\"NotSpecified\",\"performAutoResync\":\"trtexegwm\",\"targetVmTags\":{\"loqkajwjuri\":\"ywiwhvycfjncind\",\"anhz\":\"rsbcl\",\"zkz\":\"knjxizbaxdy\"},\"targetDiskTags\":{\"wacyyjmlxppdndzk\":\"e\",\"cizeqqfopvnopm\":\"evuiiuiibfkcjytq\"},\"targetNicTags\":{\"zyfbkmvldzmxojz\":\"sfhoxqlyo\"}}") - .toObject(VMwareCbtUpdateMigrationItemInput.class); - Assertions.assertEquals("igcfddofxnf", model.targetVmName()); - Assertions.assertEquals("jyyrqaedw", model.targetVmSize()); - Assertions.assertEquals("ocytjgoeayokrw", model.targetResourceGroupId()); - Assertions.assertEquals("ihwpadhedbfobd", model.targetAvailabilitySetId()); - Assertions.assertEquals("vothmkhjaoz", model.targetAvailabilityZone()); - Assertions.assertEquals("wfcn", model.targetProximityPlacementGroupId()); - Assertions.assertEquals("bpoelhscmyhrhjv", model.targetBootDiagnosticsStorageAccountId()); - Assertions.assertEquals("fqbokndwp", model.targetNetworkId()); - Assertions.assertEquals("qwojoev", model.testNetworkId()); - Assertions.assertEquals("fytdxmly", model.vmNics().get(0).nicId()); - Assertions.assertEquals("zlyvapbkrbuog", model.vmNics().get(0).isPrimaryNic()); - Assertions.assertEquals("dltlcu", model.vmNics().get(0).targetSubnetName()); - Assertions.assertEquals("izij", model.vmNics().get(0).targetStaticIpAddress()); - Assertions.assertEquals("ylzeohlpsftq", model.vmNics().get(0).isSelectedForMigration()); - Assertions.assertEquals("vmhvbvvcpwtqs", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals("pnhmzy", model.vmNics().get(0).testSubnetName()); - Assertions.assertEquals("fetev", model.vmNics().get(0).testStaticIpAddress()); - Assertions.assertEquals("xjwdylwxmvzjow", model.vmDisks().get(0).diskId()); - Assertions.assertEquals("geerclbl", model.vmDisks().get(0).targetDiskName()); - Assertions.assertEquals("hpwachyeu", model.vmDisks().get(0).isOSDisk()); - Assertions.assertEquals(LicenseType.NOT_SPECIFIED, model.licenseType()); - Assertions.assertEquals(SqlServerLicenseType.NOT_SPECIFIED, model.sqlServerLicenseType()); - Assertions.assertEquals("trtexegwm", model.performAutoResync()); - Assertions.assertEquals("ywiwhvycfjncind", model.targetVmTags().get("loqkajwjuri")); - Assertions.assertEquals("e", model.targetDiskTags().get("wacyyjmlxppdndzk")); - Assertions.assertEquals("sfhoxqlyo", model.targetNicTags().get("zyfbkmvldzmxojz")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareCbtUpdateMigrationItemInput model - = new VMwareCbtUpdateMigrationItemInput().withTargetVmName("igcfddofxnf") - .withTargetVmSize("jyyrqaedw") - .withTargetResourceGroupId("ocytjgoeayokrw") - .withTargetAvailabilitySetId("ihwpadhedbfobd") - .withTargetAvailabilityZone("vothmkhjaoz") - .withTargetProximityPlacementGroupId("wfcn") - .withTargetBootDiagnosticsStorageAccountId("bpoelhscmyhrhjv") - .withTargetNetworkId("fqbokndwp") - .withTestNetworkId("qwojoev") - .withVmNics(Arrays.asList( - new VMwareCbtNicInput().withNicId("fytdxmly") - .withIsPrimaryNic("zlyvapbkrbuog") - .withTargetSubnetName("dltlcu") - .withTargetStaticIpAddress("izij") - .withIsSelectedForMigration("ylzeohlpsftq") - .withTargetNicName("vmhvbvvcpwtqs") - .withTestSubnetName("pnhmzy") - .withTestStaticIpAddress("fetev"), - new VMwareCbtNicInput().withNicId("ntfknwacycsyo") - .withIsPrimaryNic("ctkhfh") - .withTargetSubnetName("atvcsxr") - .withTargetStaticIpAddress("nmizhv") - .withIsSelectedForMigration("hqqwcubl") - .withTargetNicName("hk") - .withTestSubnetName("obzgott") - .withTestStaticIpAddress("sadzighmmtb"), - new VMwareCbtNicInput().withNicId("dvucfvvra") - .withIsPrimaryNic("beurdeewl") - .withTargetSubnetName("xpcbwkdwjyjizn") - .withTargetStaticIpAddress("roo") - .withIsSelectedForMigration("ftaspmcr") - .withTargetNicName("huf") - .withTestSubnetName("n") - .withTestStaticIpAddress("hminuwqxungrobgw"))) - .withVmDisks(Arrays.asList( - new VMwareCbtUpdateDiskInput().withDiskId("xjwdylwxmvzjow") - .withTargetDiskName("geerclbl") - .withIsOSDisk("hpwachyeu"), - new VMwareCbtUpdateDiskInput().withDiskId("jwmvwryvdi") - .withTargetDiskName("ii") - .withIsOSDisk("pruccwme"))) - .withLicenseType(LicenseType.NOT_SPECIFIED) - .withSqlServerLicenseType(SqlServerLicenseType.NOT_SPECIFIED) - .withPerformAutoResync("trtexegwm") - .withTargetVmTags(mapOf("loqkajwjuri", "ywiwhvycfjncind", "anhz", "rsbcl", "zkz", "knjxizbaxdy")) - .withTargetDiskTags(mapOf("wacyyjmlxppdndzk", "e", "cizeqqfopvnopm", "evuiiuiibfkcjytq")) - .withTargetNicTags(mapOf("zyfbkmvldzmxojz", "sfhoxqlyo")); - model = BinaryData.fromObject(model).toObject(VMwareCbtUpdateMigrationItemInput.class); - Assertions.assertEquals("igcfddofxnf", model.targetVmName()); - Assertions.assertEquals("jyyrqaedw", model.targetVmSize()); - Assertions.assertEquals("ocytjgoeayokrw", model.targetResourceGroupId()); - Assertions.assertEquals("ihwpadhedbfobd", model.targetAvailabilitySetId()); - Assertions.assertEquals("vothmkhjaoz", model.targetAvailabilityZone()); - Assertions.assertEquals("wfcn", model.targetProximityPlacementGroupId()); - Assertions.assertEquals("bpoelhscmyhrhjv", model.targetBootDiagnosticsStorageAccountId()); - Assertions.assertEquals("fqbokndwp", model.targetNetworkId()); - Assertions.assertEquals("qwojoev", model.testNetworkId()); - Assertions.assertEquals("fytdxmly", model.vmNics().get(0).nicId()); - Assertions.assertEquals("zlyvapbkrbuog", model.vmNics().get(0).isPrimaryNic()); - Assertions.assertEquals("dltlcu", model.vmNics().get(0).targetSubnetName()); - Assertions.assertEquals("izij", model.vmNics().get(0).targetStaticIpAddress()); - Assertions.assertEquals("ylzeohlpsftq", model.vmNics().get(0).isSelectedForMigration()); - Assertions.assertEquals("vmhvbvvcpwtqs", model.vmNics().get(0).targetNicName()); - Assertions.assertEquals("pnhmzy", model.vmNics().get(0).testSubnetName()); - Assertions.assertEquals("fetev", model.vmNics().get(0).testStaticIpAddress()); - Assertions.assertEquals("xjwdylwxmvzjow", model.vmDisks().get(0).diskId()); - Assertions.assertEquals("geerclbl", model.vmDisks().get(0).targetDiskName()); - Assertions.assertEquals("hpwachyeu", model.vmDisks().get(0).isOSDisk()); - Assertions.assertEquals(LicenseType.NOT_SPECIFIED, model.licenseType()); - Assertions.assertEquals(SqlServerLicenseType.NOT_SPECIFIED, model.sqlServerLicenseType()); - Assertions.assertEquals("trtexegwm", model.performAutoResync()); - Assertions.assertEquals("ywiwhvycfjncind", model.targetVmTags().get("loqkajwjuri")); - Assertions.assertEquals("e", model.targetDiskTags().get("wacyyjmlxppdndzk")); - Assertions.assertEquals("sfhoxqlyo", model.targetNicTags().get("zyfbkmvldzmxojz")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareV2FabricCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareV2FabricCreationInputTests.java deleted file mode 100644 index ca45be8da265..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VMwareV2FabricCreationInputTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VMwareV2FabricCreationInput; -import org.junit.jupiter.api.Assertions; - -public final class VMwareV2FabricCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMwareV2FabricCreationInput model = BinaryData.fromString( - "{\"instanceType\":\"VMwareV2\",\"vmwareSiteId\":\"ptchdwyq\",\"physicalSiteId\":\"dqimlgbbfjm\",\"migrationSolutionId\":\"gjvxlhmpmhe\"}") - .toObject(VMwareV2FabricCreationInput.class); - Assertions.assertEquals("ptchdwyq", model.vmwareSiteId()); - Assertions.assertEquals("dqimlgbbfjm", model.physicalSiteId()); - Assertions.assertEquals("gjvxlhmpmhe", model.migrationSolutionId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMwareV2FabricCreationInput model = new VMwareV2FabricCreationInput().withVmwareSiteId("ptchdwyq") - .withPhysicalSiteId("dqimlgbbfjm") - .withMigrationSolutionId("gjvxlhmpmhe"); - model = BinaryData.fromObject(model).toObject(VMwareV2FabricCreationInput.class); - Assertions.assertEquals("ptchdwyq", model.vmwareSiteId()); - Assertions.assertEquals("dqimlgbbfjm", model.physicalSiteId()); - Assertions.assertEquals("gjvxlhmpmhe", model.migrationSolutionId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingCollectionTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingCollectionTests.java deleted file mode 100644 index bdbaf6014ddc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingCollectionTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultSettingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingCollection; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VaultSettingCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VaultSettingCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"migrationSolutionId\":\"v\",\"vmwareToAzureProviderType\":\"oakizvoai\"},\"location\":\"a\",\"id\":\"lnuwiguy\",\"name\":\"lykwphvxz\",\"type\":\"wxh\"},{\"properties\":{\"migrationSolutionId\":\"jtlkexaonwivkcqh\",\"vmwareToAzureProviderType\":\"hxknlccrmmkyupi\"},\"location\":\"byqjfkakfqfrkem\",\"id\":\"il\",\"name\":\"udxjascowv\",\"type\":\"djkpdxph\"},{\"properties\":{\"migrationSolutionId\":\"snmgzvyfi\",\"vmwareToAzureProviderType\":\"kzuqnwsith\"},\"location\":\"olyahluqwqulsut\",\"id\":\"jb\",\"name\":\"xykfhyq\",\"type\":\"zvqqugdrftbcvexr\"}],\"nextLink\":\"quowtljvfwhrea\"}") - .toObject(VaultSettingCollection.class); - Assertions.assertEquals("v", model.value().get(0).properties().migrationSolutionId()); - Assertions.assertEquals("oakizvoai", model.value().get(0).properties().vmwareToAzureProviderType()); - Assertions.assertEquals("a", model.value().get(0).location()); - Assertions.assertEquals("quowtljvfwhrea", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VaultSettingCollection model - = new VaultSettingCollection() - .withValue(Arrays.asList( - new VaultSettingInner().withProperties(new VaultSettingProperties().withMigrationSolutionId("v") - .withVmwareToAzureProviderType("oakizvoai")).withLocation("a"), - new VaultSettingInner() - .withProperties(new VaultSettingProperties().withMigrationSolutionId("jtlkexaonwivkcqh") - .withVmwareToAzureProviderType("hxknlccrmmkyupi")) - .withLocation("byqjfkakfqfrkem"), - new VaultSettingInner() - .withProperties(new VaultSettingProperties().withMigrationSolutionId("snmgzvyfi") - .withVmwareToAzureProviderType("kzuqnwsith")) - .withLocation("olyahluqwqulsut"))) - .withNextLink("quowtljvfwhrea"); - model = BinaryData.fromObject(model).toObject(VaultSettingCollection.class); - Assertions.assertEquals("v", model.value().get(0).properties().migrationSolutionId()); - Assertions.assertEquals("oakizvoai", model.value().get(0).properties().vmwareToAzureProviderType()); - Assertions.assertEquals("a", model.value().get(0).location()); - Assertions.assertEquals("quowtljvfwhrea", model.nextLink()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingCreationInputPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingCreationInputPropertiesTests.java deleted file mode 100644 index 8d950e920c6f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingCreationInputPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingCreationInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class VaultSettingCreationInputPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VaultSettingCreationInputProperties model = BinaryData - .fromString("{\"migrationSolutionId\":\"yxp\",\"vmwareToAzureProviderType\":\"tweialwvskbuhzac\"}") - .toObject(VaultSettingCreationInputProperties.class); - Assertions.assertEquals("yxp", model.migrationSolutionId()); - Assertions.assertEquals("tweialwvskbuhzac", model.vmwareToAzureProviderType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VaultSettingCreationInputProperties model - = new VaultSettingCreationInputProperties().withMigrationSolutionId("yxp") - .withVmwareToAzureProviderType("tweialwvskbuhzac"); - model = BinaryData.fromObject(model).toObject(VaultSettingCreationInputProperties.class); - Assertions.assertEquals("yxp", model.migrationSolutionId()); - Assertions.assertEquals("tweialwvskbuhzac", model.vmwareToAzureProviderType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingCreationInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingCreationInputTests.java deleted file mode 100644 index a81e009c7d85..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingCreationInputTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingCreationInput; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingCreationInputProperties; -import org.junit.jupiter.api.Assertions; - -public final class VaultSettingCreationInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VaultSettingCreationInput model = BinaryData - .fromString( - "{\"properties\":{\"migrationSolutionId\":\"ztrgdgxvcoq\",\"vmwareToAzureProviderType\":\"sw\"}}") - .toObject(VaultSettingCreationInput.class); - Assertions.assertEquals("ztrgdgxvcoq", model.properties().migrationSolutionId()); - Assertions.assertEquals("sw", model.properties().vmwareToAzureProviderType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VaultSettingCreationInput model = new VaultSettingCreationInput() - .withProperties(new VaultSettingCreationInputProperties().withMigrationSolutionId("ztrgdgxvcoq") - .withVmwareToAzureProviderType("sw")); - model = BinaryData.fromObject(model).toObject(VaultSettingCreationInput.class); - Assertions.assertEquals("ztrgdgxvcoq", model.properties().migrationSolutionId()); - Assertions.assertEquals("sw", model.properties().vmwareToAzureProviderType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingInnerTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingInnerTests.java deleted file mode 100644 index b9d60a441f26..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingInnerTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.VaultSettingInner; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingProperties; -import org.junit.jupiter.api.Assertions; - -public final class VaultSettingInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VaultSettingInner model = BinaryData.fromString( - "{\"properties\":{\"migrationSolutionId\":\"yxvrqtvbczsul\",\"vmwareToAzureProviderType\":\"gglmepjpfsey\"},\"location\":\"sa\",\"id\":\"gpszngafpg\",\"name\":\"lkvec\",\"type\":\"ujcngo\"}") - .toObject(VaultSettingInner.class); - Assertions.assertEquals("yxvrqtvbczsul", model.properties().migrationSolutionId()); - Assertions.assertEquals("gglmepjpfsey", model.properties().vmwareToAzureProviderType()); - Assertions.assertEquals("sa", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VaultSettingInner model = new VaultSettingInner() - .withProperties(new VaultSettingProperties().withMigrationSolutionId("yxvrqtvbczsul") - .withVmwareToAzureProviderType("gglmepjpfsey")) - .withLocation("sa"); - model = BinaryData.fromObject(model).toObject(VaultSettingInner.class); - Assertions.assertEquals("yxvrqtvbczsul", model.properties().migrationSolutionId()); - Assertions.assertEquals("gglmepjpfsey", model.properties().vmwareToAzureProviderType()); - Assertions.assertEquals("sa", model.location()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingPropertiesTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingPropertiesTests.java deleted file mode 100644 index 223ed0a82025..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VaultSettingPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VaultSettingProperties; -import org.junit.jupiter.api.Assertions; - -public final class VaultSettingPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VaultSettingProperties model = BinaryData - .fromString("{\"migrationSolutionId\":\"yedmzrgj\",\"vmwareToAzureProviderType\":\"knubnoitp\"}") - .toObject(VaultSettingProperties.class); - Assertions.assertEquals("yedmzrgj", model.migrationSolutionId()); - Assertions.assertEquals("knubnoitp", model.vmwareToAzureProviderType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VaultSettingProperties model = new VaultSettingProperties().withMigrationSolutionId("yedmzrgj") - .withVmwareToAzureProviderType("knubnoitp"); - model = BinaryData.fromObject(model).toObject(VaultSettingProperties.class); - Assertions.assertEquals("yedmzrgj", model.migrationSolutionId()); - Assertions.assertEquals("knubnoitp", model.vmwareToAzureProviderType()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VersionDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VersionDetailsTests.java deleted file mode 100644 index 47fb85e7f73f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VersionDetailsTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.AgentVersionStatus; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VersionDetails; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class VersionDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VersionDetails model = BinaryData.fromString( - "{\"version\":\"avehhrvkbunzo\",\"expiryDate\":\"2021-06-10T11:46:22Z\",\"status\":\"SecurityUpdateRequired\"}") - .toObject(VersionDetails.class); - Assertions.assertEquals("avehhrvkbunzo", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-10T11:46:22Z"), model.expiryDate()); - Assertions.assertEquals(AgentVersionStatus.SECURITY_UPDATE_REQUIRED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VersionDetails model = new VersionDetails().withVersion("avehhrvkbunzo") - .withExpiryDate(OffsetDateTime.parse("2021-06-10T11:46:22Z")) - .withStatus(AgentVersionStatus.SECURITY_UPDATE_REQUIRED); - model = BinaryData.fromObject(model).toObject(VersionDetails.class); - Assertions.assertEquals("avehhrvkbunzo", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-10T11:46:22Z"), model.expiryDate()); - Assertions.assertEquals(AgentVersionStatus.SECURITY_UPDATE_REQUIRED, model.status()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VirtualMachineTaskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VirtualMachineTaskDetailsTests.java deleted file mode 100644 index 232c55334405..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VirtualMachineTaskDetailsTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.JobEntity; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VirtualMachineTaskDetails; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineTaskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineTaskDetails model = BinaryData.fromString( - "{\"instanceType\":\"VirtualMachineTaskDetails\",\"skippedReason\":\"doaqipmnxclfrsb\",\"skippedReasonString\":\"nm\",\"jobTask\":{\"jobId\":\"vp\",\"jobFriendlyName\":\"fddtbfmekjcng\",\"targetObjectId\":\"xdvmaoyqxf\",\"targetObjectName\":\"yxzmx\",\"targetInstanceType\":\"ofxlttxo\",\"jobScenarioName\":\"tdnzujsjirkrpskc\"}}") - .toObject(VirtualMachineTaskDetails.class); - Assertions.assertEquals("vp", model.jobTask().jobId()); - Assertions.assertEquals("fddtbfmekjcng", model.jobTask().jobFriendlyName()); - Assertions.assertEquals("xdvmaoyqxf", model.jobTask().targetObjectId()); - Assertions.assertEquals("yxzmx", model.jobTask().targetObjectName()); - Assertions.assertEquals("ofxlttxo", model.jobTask().targetInstanceType()); - Assertions.assertEquals("tdnzujsjirkrpskc", model.jobTask().jobScenarioName()); - Assertions.assertEquals("doaqipmnxclfrsb", model.skippedReason()); - Assertions.assertEquals("nm", model.skippedReasonString()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineTaskDetails model = new VirtualMachineTaskDetails() - .withJobTask(new JobEntity().withJobId("vp") - .withJobFriendlyName("fddtbfmekjcng") - .withTargetObjectId("xdvmaoyqxf") - .withTargetObjectName("yxzmx") - .withTargetInstanceType("ofxlttxo") - .withJobScenarioName("tdnzujsjirkrpskc")) - .withSkippedReason("doaqipmnxclfrsb") - .withSkippedReasonString("nm"); - model = BinaryData.fromObject(model).toObject(VirtualMachineTaskDetails.class); - Assertions.assertEquals("vp", model.jobTask().jobId()); - Assertions.assertEquals("fddtbfmekjcng", model.jobTask().jobFriendlyName()); - Assertions.assertEquals("xdvmaoyqxf", model.jobTask().targetObjectId()); - Assertions.assertEquals("yxzmx", model.jobTask().targetObjectName()); - Assertions.assertEquals("ofxlttxo", model.jobTask().targetInstanceType()); - Assertions.assertEquals("tdnzujsjirkrpskc", model.jobTask().jobScenarioName()); - Assertions.assertEquals("doaqipmnxclfrsb", model.skippedReason()); - Assertions.assertEquals("nm", model.skippedReasonString()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmNicUpdatesTaskDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmNicUpdatesTaskDetailsTests.java deleted file mode 100644 index c88493ef00eb..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmNicUpdatesTaskDetailsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmNicUpdatesTaskDetails; -import org.junit.jupiter.api.Assertions; - -public final class VmNicUpdatesTaskDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmNicUpdatesTaskDetails model = BinaryData.fromString( - "{\"instanceType\":\"VmNicUpdatesTaskDetails\",\"vmId\":\"zertkounz\",\"nicId\":\"ywhubymfpopik\",\"name\":\"b\"}") - .toObject(VmNicUpdatesTaskDetails.class); - Assertions.assertEquals("zertkounz", model.vmId()); - Assertions.assertEquals("ywhubymfpopik", model.nicId()); - Assertions.assertEquals("b", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmNicUpdatesTaskDetails model - = new VmNicUpdatesTaskDetails().withVmId("zertkounz").withNicId("ywhubymfpopik").withName("b"); - model = BinaryData.fromObject(model).toObject(VmNicUpdatesTaskDetails.class); - Assertions.assertEquals("zertkounz", model.vmId()); - Assertions.assertEquals("ywhubymfpopik", model.nicId()); - Assertions.assertEquals("b", model.name()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmDetailsTests.java deleted file mode 100644 index 2ff2cdd66c3a..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmDetailsTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmmDetails; - -public final class VmmDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmmDetails model = BinaryData.fromString("{\"instanceType\":\"VMM\"}").toObject(VmmDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmmDetails model = new VmmDetails(); - model = BinaryData.fromObject(model).toObject(VmmDetails.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToAzureCreateNetworkMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToAzureCreateNetworkMappingInputTests.java deleted file mode 100644 index 9664fa0f4a6b..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToAzureCreateNetworkMappingInputTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmmToAzureCreateNetworkMappingInput; - -public final class VmmToAzureCreateNetworkMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmmToAzureCreateNetworkMappingInput model = BinaryData.fromString("{\"instanceType\":\"VmmToAzure\"}") - .toObject(VmmToAzureCreateNetworkMappingInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmmToAzureCreateNetworkMappingInput model = new VmmToAzureCreateNetworkMappingInput(); - model = BinaryData.fromObject(model).toObject(VmmToAzureCreateNetworkMappingInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToAzureNetworkMappingSettingsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToAzureNetworkMappingSettingsTests.java deleted file mode 100644 index 6b6b9e3820bc..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToAzureNetworkMappingSettingsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmmToAzureNetworkMappingSettings; - -public final class VmmToAzureNetworkMappingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmmToAzureNetworkMappingSettings model = BinaryData.fromString("{\"instanceType\":\"VmmToAzure\"}") - .toObject(VmmToAzureNetworkMappingSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmmToAzureNetworkMappingSettings model = new VmmToAzureNetworkMappingSettings(); - model = BinaryData.fromObject(model).toObject(VmmToAzureNetworkMappingSettings.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToAzureUpdateNetworkMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToAzureUpdateNetworkMappingInputTests.java deleted file mode 100644 index 41b47d8038d9..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToAzureUpdateNetworkMappingInputTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmmToAzureUpdateNetworkMappingInput; - -public final class VmmToAzureUpdateNetworkMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmmToAzureUpdateNetworkMappingInput model = BinaryData.fromString("{\"instanceType\":\"VmmToAzure\"}") - .toObject(VmmToAzureUpdateNetworkMappingInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmmToAzureUpdateNetworkMappingInput model = new VmmToAzureUpdateNetworkMappingInput(); - model = BinaryData.fromObject(model).toObject(VmmToAzureUpdateNetworkMappingInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToVmmCreateNetworkMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToVmmCreateNetworkMappingInputTests.java deleted file mode 100644 index 9f1b8b982e6d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToVmmCreateNetworkMappingInputTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmmToVmmCreateNetworkMappingInput; - -public final class VmmToVmmCreateNetworkMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmmToVmmCreateNetworkMappingInput model = BinaryData.fromString("{\"instanceType\":\"VmmToVmm\"}") - .toObject(VmmToVmmCreateNetworkMappingInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmmToVmmCreateNetworkMappingInput model = new VmmToVmmCreateNetworkMappingInput(); - model = BinaryData.fromObject(model).toObject(VmmToVmmCreateNetworkMappingInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToVmmNetworkMappingSettingsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToVmmNetworkMappingSettingsTests.java deleted file mode 100644 index 1d76370c367d..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToVmmNetworkMappingSettingsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmmToVmmNetworkMappingSettings; - -public final class VmmToVmmNetworkMappingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmmToVmmNetworkMappingSettings model - = BinaryData.fromString("{\"instanceType\":\"VmmToVmm\"}").toObject(VmmToVmmNetworkMappingSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmmToVmmNetworkMappingSettings model = new VmmToVmmNetworkMappingSettings(); - model = BinaryData.fromObject(model).toObject(VmmToVmmNetworkMappingSettings.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToVmmUpdateNetworkMappingInputTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToVmmUpdateNetworkMappingInputTests.java deleted file mode 100644 index cf52b66e2277..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmToVmmUpdateNetworkMappingInputTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmmToVmmUpdateNetworkMappingInput; - -public final class VmmToVmmUpdateNetworkMappingInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmmToVmmUpdateNetworkMappingInput model = BinaryData.fromString("{\"instanceType\":\"VmmToVmm\"}") - .toObject(VmmToVmmUpdateNetworkMappingInput.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmmToVmmUpdateNetworkMappingInput model = new VmmToVmmUpdateNetworkMappingInput(); - model = BinaryData.fromObject(model).toObject(VmmToVmmUpdateNetworkMappingInput.class); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmVirtualMachineDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmVirtualMachineDetailsTests.java deleted file mode 100644 index f6bf1f78790e..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmmVirtualMachineDetailsTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiskDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.OSDetails; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.PresenceStatus; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmmVirtualMachineDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VmmVirtualMachineDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmmVirtualMachineDetails model = BinaryData.fromString( - "{\"instanceType\":\"VmmVirtualMachine\",\"sourceItemId\":\"mmofbnivdqtkyk\",\"generation\":\"xnlsf\",\"osDetails\":{\"osType\":\"scaccptbz\",\"productType\":\"x\",\"osEdition\":\"xxicee\",\"oSVersion\":\"jwyuveox\",\"oSMajorVersion\":\"z\",\"oSMinorVersion\":\"ahdr\"},\"diskDetails\":[{\"maxSizeMB\":2901220119484364811,\"vhdType\":\"xbiv\",\"vhdId\":\"gxmbrygmwibiosiq\",\"vhdName\":\"kqfdqwdrtx\"}],\"hasPhysicalDisk\":\"NotPresent\",\"hasFibreChannelAdapter\":\"Unknown\",\"hasSharedVhd\":\"Present\",\"hyperVHostId\":\"co\"}") - .toObject(VmmVirtualMachineDetails.class); - Assertions.assertEquals("mmofbnivdqtkyk", model.sourceItemId()); - Assertions.assertEquals("xnlsf", model.generation()); - Assertions.assertEquals("scaccptbz", model.osDetails().osType()); - Assertions.assertEquals("x", model.osDetails().productType()); - Assertions.assertEquals("xxicee", model.osDetails().osEdition()); - Assertions.assertEquals("jwyuveox", model.osDetails().oSVersion()); - Assertions.assertEquals("z", model.osDetails().oSMajorVersion()); - Assertions.assertEquals("ahdr", model.osDetails().oSMinorVersion()); - Assertions.assertEquals(2901220119484364811L, model.diskDetails().get(0).maxSizeMB()); - Assertions.assertEquals("xbiv", model.diskDetails().get(0).vhdType()); - Assertions.assertEquals("gxmbrygmwibiosiq", model.diskDetails().get(0).vhdId()); - Assertions.assertEquals("kqfdqwdrtx", model.diskDetails().get(0).vhdName()); - Assertions.assertEquals(PresenceStatus.NOT_PRESENT, model.hasPhysicalDisk()); - Assertions.assertEquals(PresenceStatus.UNKNOWN, model.hasFibreChannelAdapter()); - Assertions.assertEquals(PresenceStatus.PRESENT, model.hasSharedVhd()); - Assertions.assertEquals("co", model.hyperVHostId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmmVirtualMachineDetails model = new VmmVirtualMachineDetails().withSourceItemId("mmofbnivdqtkyk") - .withGeneration("xnlsf") - .withOsDetails(new OSDetails().withOsType("scaccptbz") - .withProductType("x") - .withOsEdition("xxicee") - .withOSVersion("jwyuveox") - .withOSMajorVersion("z") - .withOSMinorVersion("ahdr")) - .withDiskDetails(Arrays.asList(new DiskDetails().withMaxSizeMB(2901220119484364811L) - .withVhdType("xbiv") - .withVhdId("gxmbrygmwibiosiq") - .withVhdName("kqfdqwdrtx"))) - .withHasPhysicalDisk(PresenceStatus.NOT_PRESENT) - .withHasFibreChannelAdapter(PresenceStatus.UNKNOWN) - .withHasSharedVhd(PresenceStatus.PRESENT) - .withHyperVHostId("co"); - model = BinaryData.fromObject(model).toObject(VmmVirtualMachineDetails.class); - Assertions.assertEquals("mmofbnivdqtkyk", model.sourceItemId()); - Assertions.assertEquals("xnlsf", model.generation()); - Assertions.assertEquals("scaccptbz", model.osDetails().osType()); - Assertions.assertEquals("x", model.osDetails().productType()); - Assertions.assertEquals("xxicee", model.osDetails().osEdition()); - Assertions.assertEquals("jwyuveox", model.osDetails().oSVersion()); - Assertions.assertEquals("z", model.osDetails().oSMajorVersion()); - Assertions.assertEquals("ahdr", model.osDetails().oSMinorVersion()); - Assertions.assertEquals(2901220119484364811L, model.diskDetails().get(0).maxSizeMB()); - Assertions.assertEquals("xbiv", model.diskDetails().get(0).vhdType()); - Assertions.assertEquals("gxmbrygmwibiosiq", model.diskDetails().get(0).vhdId()); - Assertions.assertEquals("kqfdqwdrtx", model.diskDetails().get(0).vhdName()); - Assertions.assertEquals(PresenceStatus.NOT_PRESENT, model.hasPhysicalDisk()); - Assertions.assertEquals(PresenceStatus.UNKNOWN, model.hasFibreChannelAdapter()); - Assertions.assertEquals(PresenceStatus.PRESENT, model.hasSharedVhd()); - Assertions.assertEquals("co", model.hyperVHostId()); - } -} diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmwareCbtPolicyDetailsTests.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmwareCbtPolicyDetailsTests.java deleted file mode 100644 index 021bfd4f337f..000000000000 --- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/test/java/com/azure/resourcemanager/recoveryservicessiterecovery/generated/VmwareCbtPolicyDetailsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicessiterecovery.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmwareCbtPolicyDetails; -import org.junit.jupiter.api.Assertions; - -public final class VmwareCbtPolicyDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmwareCbtPolicyDetails model = BinaryData.fromString( - "{\"instanceType\":\"VMwareCbt\",\"recoveryPointHistoryInMinutes\":565605624,\"appConsistentFrequencyInMinutes\":1535089718,\"crashConsistentFrequencyInMinutes\":1544555304}") - .toObject(VmwareCbtPolicyDetails.class); - Assertions.assertEquals(565605624, model.recoveryPointHistoryInMinutes()); - Assertions.assertEquals(1535089718, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(1544555304, model.crashConsistentFrequencyInMinutes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmwareCbtPolicyDetails model = new VmwareCbtPolicyDetails().withRecoveryPointHistoryInMinutes(565605624) - .withAppConsistentFrequencyInMinutes(1535089718) - .withCrashConsistentFrequencyInMinutes(1544555304); - model = BinaryData.fromObject(model).toObject(VmwareCbtPolicyDetails.class); - Assertions.assertEquals(565605624, model.recoveryPointHistoryInMinutes()); - Assertions.assertEquals(1535089718, model.appConsistentFrequencyInMinutes()); - Assertions.assertEquals(1544555304, model.crashConsistentFrequencyInMinutes()); - } -}